{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"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":"D33","name":"JS/npm Dependency Vulnerabilities","shortDescription":{"text":"JS/npm Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D33","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"]}},{"id":"D38","name":"OSV Dependency Vulnerabilities","shortDescription":{"text":"OSV Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D38","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"main.gatherUpdateInput (cyclomatic 73): main.gatherUpdateInput has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/bd/update_input.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"1795173938afbab5ee1be9626417ebf11c478b3174b32be04a6f52f07b130f40"}},{"ruleId":"D1","level":"warning","message":{"text":"doltTransaction.SearchIssues (cyclomatic 72): doltTransaction.SearchIssues has cyclomatic complexity 72 (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":"internal/storage/dolt/transaction.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6e7d4db56e2aa1549bc4b96725630884f809c72a34c7ff88307b3ba8bf54b98"}},{"ruleId":"D1","level":"warning","message":{"text":"main.gatherListInput (cyclomatic 66): main.gatherListInput 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":"cmd/bd/list_input.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ed102ff1a001d067b23dcb540c28a1f7e82ac6aaa43548e4fee461bf30aea8"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.FindBeadsDir (cyclomatic 66): beads.FindBeadsDir 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":"internal/beads/beads.go"},"region":{"startLine":757}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e72f3c3eae59e8833998b396c3355b440df449da730709b5202622de12db8fa"}},{"ruleId":"D1","level":"warning","message":{"text":"workapi.BuildListFilter (cyclomatic 65): workapi.BuildListFilter has cyclomatic complexity 65 (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":"internal/workapi/list.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec093a318ff75d53531b4d9af3360b3413057a78465c7bb41301d0cc3ff7a9ff"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.doPull (cyclomatic 64): Engine.doPull has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/tracker/engine.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8c2ed08f02c08debd7bf90be06771842fc0042e9601b457f607d45bd7ee9ae"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runInitProxiedServerTail (cyclomatic 60): main.runInitProxiedServerTail has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init_proxied_server.go"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd806aebace4f13ffa4d4e4b844b91d6c77251d4ec298e8e59f80cb673aa6f55"}},{"ruleId":"D1","level":"warning","message":{"text":"main.applyFixList (cyclomatic 57): main.applyFixList has cyclomatic complexity 57 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor_fix.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1e3da38c1f2f7499b89085d99cd7ed0aa62fc299c9ac27d1e4bdd203079bad9"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runLinearSync (cyclomatic 57): main.runLinearSync has cyclomatic complexity 57 (threshold 15). Of this number, 55 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":"cmd/bd/linear.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"2020a825a676faebf4b15443d9d87412c852e9539f3ed31407b441fef21a2b3b"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runADOSync (cyclomatic 56): main.runADOSync has cyclomatic complexity 56 (threshold 15). Of this number, 55 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/bd/ado.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b68b780fff5bdcd9921920ae254b0c79c998a43058c11857bee71517f3d8897"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.doPush (cyclomatic 56): Engine.doPush has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/tracker/engine.go"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4521725cc747f66a7db1c8bcb3fa63da96784d9c218c40e072a046d8e9b33af"}},{"ruleId":"D1","level":"warning","message":{"text":"sqlbuild.BuildIssueFilterClauses (cyclomatic 55): sqlbuild.BuildIssueFilterClauses has cyclomatic complexity 55 (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":"internal/storage/sqlbuild/filter.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0fca3594112ce0036b0321153818fd7b2ff3835d02da02b026011485ea8cbe"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runPurgeOrPrune (cyclomatic 53): main.runPurgeOrPrune has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/purge.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"c584706bcb78189e960aa1628af0109b304a78421f1d8350e02740a8271d4d40"}},{"ruleId":"D1","level":"warning","message":{"text":"main.gatherCreateInput (cyclomatic 52): main.gatherCreateInput 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":"cmd/bd/create_input.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6019582e4104b6de00ac5ce8892b77cc8c3367c5af0bf6fc639df39b4c0f461"}},{"ruleId":"D1","level":"warning","message":{"text":"main.validateGraphApplyPlan (cyclomatic 51): main.validateGraphApplyPlan 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/bd/graph_apply.go"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"231f0f7bcea60a4494a39827982eea4479ced430fc21e92c62f38ee679e89066"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.applyGraph (cyclomatic 50): issueUseCaseImpl.applyGraph 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":"internal/storage/domain/issue.go"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"f736cbd1a2fc34d9390a174095c394cc7fe0f9bf26a3cfed6da676d873af65f5"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runListCore (cyclomatic 49): main.runListCore 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":"cmd/bd/list.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"229d3aa87cd44e501025bc6feaae37185d35b330dc8c0d9a2b3f4e6dbcb868a9"}},{"ruleId":"D1","level":"warning","message":{"text":"doltserver.Start (cyclomatic 49): doltserver.Start 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":"internal/doltserver/doltserver.go"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"4930df2f9ae6d3d7457a6601bf23b846d96eb26c737a9ef745639040feac7850"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.BatchPush (cyclomatic 49): Tracker.BatchPush 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":"internal/linear/tracker.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7244f1074435918cb254d8f94237b6a3f1208d0f888c732665bfd3a3493d79"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.DeleteIssuesInTx (cyclomatic 49): issueops.DeleteIssuesInTx 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":"internal/storage/issueops/delete.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"4049f6b2b63c3bec1f9cbce56fa7e79768356a683f4ef47746724aacbbba58dd"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ScanIssueFrom (cyclomatic 49): issueops.ScanIssueFrom has cyclomatic complexity 49 (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":"internal/storage/issueops/scan.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4dc0b198803586d4cafc6dbae6841b18402a24f370329823c33d029329e136e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runDiagnostics (cyclomatic 48): main.runDiagnostics has cyclomatic complexity 48 (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/bd/doctor.go"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"a70a244bb3bfa0711c88969cd12f79384939a09185c2fb50eb4aa5ae8f249d62"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runSearchProxiedServer (cyclomatic 48): main.runSearchProxiedServer has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/bd/search_proxied_server.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b380a43783e2eab2f7245759d9b54dcb83bffba428fbe204edbc65986e61da1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.proxiedRenderIssue (cyclomatic 48): main.proxiedRenderIssue has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/bd/show_proxied_server.go"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"d46fa60b76c2f6e4816ff0bb797267585805afb16c86fcb1126a820587c8b876"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildUpdatePatch (cyclomatic 47): main.buildUpdatePatch 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":"cmd/bd/update.go"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44931dd3b24c8a66b57453acf4ce374aeb0afc9afb91be0711305fe546bccae"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runGCProxiedServer (cyclomatic 46): main.runGCProxiedServer has cyclomatic complexity 46 (threshold 15). Of this number, 40 points are the body\u0027s own statements and 6 belong to 5 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/bd/gc_proxied_server.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5037f835564f7eba83123ba03409b23e5585787b825e925de4cc3532992c669c"}},{"ruleId":"D1","level":"warning","message":{"text":"main.executeGraphApply (cyclomatic 46): main.executeGraphApply has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 4 of the 46 points are its own statements and the rest belongs to one function literal inside it that branches (line 927). 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/bd/graph_apply.go"},"region":{"startLine":914}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45bda838b23aabf5b85eb5ca0daa7537f6d1551b4d17bb20273e125b55d4d5d"}},{"ruleId":"D1","level":"warning","message":{"text":"main.analyzeMoleculeParallel (cyclomatic 46): main.analyzeMoleculeParallel has cyclomatic complexity 46 (threshold 15). Of this number, 44 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":"cmd/bd/mol_show.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ace365c748d7de7d5f6cc2cf93654cd09819c64a07dd1941c5a2aa61b67818f"}},{"ruleId":"D1","level":"warning","message":{"text":"dolt.newServerMode (cyclomatic 46): dolt.newServerMode has cyclomatic complexity 46 (threshold 15). Of this number, 45 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":"internal/storage/dolt/store.go"},"region":{"startLine":1558}}}],"partialFingerprints":{"codehealthFindingId/v1":"497869ae7cd16260736132aa7227b033f6b72f456156d9ef0ffcce8b33ae8066"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.ApplyUpdate (cyclomatic 46): issueUseCaseImpl.ApplyUpdate 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":"internal/storage/domain/issue.go"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"def5f25f1fe615ac58dc1b4c4f2f3a438e0ffdbda756014a1b15e572c56774a3"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ScanIssueLiteFrom (cyclomatic 46): issueops.ScanIssueLiteFrom has cyclomatic complexity 46 (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":"internal/storage/issueops/scan.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"4161e6b3558b410b174d8328956abe155dcf382443ff300a013e28c716e06af9"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runExportFromSource (cyclomatic 45): main.runExportFromSource has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/export.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"30309de568f0be67c1233c4e4cd56f452f8c0c53b4fa88286cfeb6f5fba30b2a"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.findDatabaseInTree (cyclomatic 45): beads.findDatabaseInTree has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/beads/beads.go"},"region":{"startLine":1122}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2d0d135d133b265d3f5b95d354435c224745d31e38d21985ab69c8eb84b73b"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.create (cyclomatic 45): issueUseCaseImpl.create has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/issue.go"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"25119dec6599a030af928f95f9de11845d7a85b731ae17c90fac37be12ea09f2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runInitProxiedServer (cyclomatic 44): main.runInitProxiedServer has cyclomatic complexity 44 (threshold 15). Of this number, 40 points are the body\u0027s own statements and 4 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":"cmd/bd/init_proxied_server.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8cd372285c234f68dc8acbea244d25b033ee4a1bcf633bfc8928cd4a997fb6d"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runFormulaShow (cyclomatic 43): main.runFormulaShow has cyclomatic complexity 43 (threshold 15). Of this number, 42 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/bd/formula.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"74fa9128c6a43332c42ffd11824c822c7c5baf536339d6fae3a0f2e5d0260d54"}},{"ruleId":"D1","level":"warning","message":{"text":"main.handleDoltMetadataUpdate (cyclomatic 43): main.handleDoltMetadataUpdate 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":"cmd/bd/migrate.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e463fe583b2ac782268ee502c60a381bf4736fe4aaeb503e585418d91616fcc"}},{"ruleId":"D1","level":"warning","message":{"text":"config.Initialize (cyclomatic 43): config.Initialize has cyclomatic complexity 43 (threshold 15). Of this number, 39 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":"internal/config/config.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd338bcb109aae853a044ccb790c61603334ff5615a8d52cfea89c1be1b0bb00"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.stopAndAcquire (cyclomatic 42): proxy.stopAndAcquire 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":"internal/storage/dbproxy/proxy/shutdown.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a55e88662501f3884c1bf821513754af52bd9646c8c74ec072e744fb56a7d9"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMolBurnProxiedServer (cyclomatic 41): main.runMolBurnProxiedServer has cyclomatic complexity 41 (threshold 15). Of this number, 37 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":"cmd/bd/mol_proxied_server.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"569bca6e0f126b5b337488f0ea3717be793c35d44f3d51cf2fbe60237648ddc9"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.addDependencyInTx (cyclomatic 40): issueops.addDependencyInTx 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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"af983faab1704176cf9361ee371d11fe3c21392c6f13c0bf57329e15706aff22"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runQueryProxiedServer (cyclomatic 39): main.runQueryProxiedServer has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/query_proxied_server.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"03be42c5d3fe4ede5b330cf614c355c813bbcc4ad9648deb283fcaaf9c163398"}},{"ruleId":"D1","level":"warning","message":{"text":"main.displayShowIssueReturn (cyclomatic 39): main.displayShowIssueReturn has cyclomatic complexity 39 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/show_display.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"27cc3b3b7c90fe830689cc04fe2c2f205e986a988b2049df474f5edd1df2ab21"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetBlockedIssuesInTx (cyclomatic 39): issueops.GetBlockedIssuesInTx has cyclomatic complexity 39 (threshold 15). Of this number, 38 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":"internal/storage/issueops/blocked.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd77ada03ec8510c01c8d7996df2f7e7fda088fd5689ed5dfd7db3fc482dac59"}},{"ruleId":"D1","level":"warning","message":{"text":"schema.MigrateUp (cyclomatic 39): schema.MigrateUp has cyclomatic complexity 39 (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":"internal/storage/schema/schema.go"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"2385a4e27db5db89e11a12ae520d3e5f5abe1f8480f76cf5bf85b80dcb337749"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCloseProxiedServer (cyclomatic 38): main.runCloseProxiedServer 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":"cmd/bd/close_proxied_server.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e20141fdb3baa926b37acfeb24b7ed30185c449a1629b43244341300676737d"}},{"ruleId":"D1","level":"warning","message":{"text":"Formula.Validate (cyclomatic 38): Formula.Validate 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":"internal/formula/types.go"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f26906ee0cf9ba8bb17939977b43fe4d014337a228dee5617beacb707538ad2"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ExecuteUpdate (cyclomatic 38): issueops.ExecuteUpdate 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":"internal/storage/issueops/execution.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5bb1885ba6b64315016758d37a27af0a06b4f280e1cf84436a37a8303cf857"}},{"ruleId":"D1","level":"warning","message":{"text":"ExternalDoltConfig.Validate (cyclomatic 37): ExternalDoltConfig.Validate has cyclomatic complexity 37 (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":"internal/configfile/external_dolt_config.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"9854df579f42d4452ac575182779331fc2d5a27df22355bee79a91700d88beba"}},{"ruleId":"D1","level":"warning","message":{"text":"issueSQLRepositoryImpl.Update (cyclomatic 37): issueSQLRepositoryImpl.Update has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/storage/domain/db/issue.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"a18031aafa8dd972e34c9c32dfcd368345cbc40da4980ecac31b666fc8dd5838"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.updateIssueInTx (cyclomatic 37): issueops.updateIssueInTx has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/storage/issueops/update.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab4465d0f310ad998400eca9135fbe3c6bd2db2a3591dc917c695d2d8a81704"}},{"ruleId":"D1","level":"warning","message":{"text":"versioncontrolops.TryAutoResolveMergeConflicts (cyclomatic 37): versioncontrolops.TryAutoResolveMergeConflicts has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5235ead52c1575b87e4ff447be00198c6bf4447ade1e5e99f398e8b6a202379"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.ResolvePartialID (cyclomatic 37): utils.ResolvePartialID has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/utils/id_parser.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd927b153dab3b811a6dacd69786cae0bc823b586b67cdac929f9cba58b47947"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMigrateFromProxiedServer (cyclomatic 36): main.runMigrateFromProxiedServer has cyclomatic complexity 36 (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/bd/migrate_dolt_mode.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"980456a366963acb977539271f2da01dbde31636efd546b7c3daeccee6e21ad8"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCreateProxiedSingle (cyclomatic 35): main.runCreateProxiedSingle has cyclomatic complexity 35 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 14 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/bd/create_proxied_server.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"db8966aaaa20b3b411ade507539cd0ec468ef0cef215a0f46391886ff3355a36"}},{"ruleId":"D1","level":"warning","message":{"text":"main.printDiagnostics (cyclomatic 35): main.printDiagnostics has cyclomatic complexity 35 (threshold 15). 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, separate the cases: extract each independent branch into its own 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/bd/doctor.go"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c66eb9f1f657f4e82fdcfb5be5aa4973baaa9e23d46ac7964ade1adc5263fb"}},{"ruleId":"D1","level":"warning","message":{"text":"main.getDescriptionFlag (cyclomatic 35): main.getDescriptionFlag 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/bd/flags.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"70804b043b80b7fb241a481918c4396fd090d2946fca876a7c3bc6032bcdd3aa"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runContributorWizard (cyclomatic 35): main.runContributorWizard 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/bd/init_contributor.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc3e216ecffa22a2ca718f55dbe8988a499fe6f0384002158dc8e4169acb17fe"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetNewlyUnblockedByCloseInTx (cyclomatic 35): issueops.GetNewlyUnblockedByCloseInTx 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"6839b553e373fa4a334742aec9b32e88dcae67ac0223343f118d966070110e9c"}},{"ruleId":"D1","level":"warning","message":{"text":"main.setDoltConfig (cyclomatic 34): main.setDoltConfig 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":"cmd/bd/dolt.go"},"region":{"startLine":2013}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b37f46139fc0061b0b8c6cf33d698bf3d3aedd30be2eec70210b7209ba6019"}},{"ruleId":"D1","level":"warning","message":{"text":"main.gatherReadyInput (cyclomatic 34): main.gatherReadyInput 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":"cmd/bd/ready_input.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"d050c2ca70021707d7b6f5a4fa51aff0f7c248104671065402e958ed70c706aa"}},{"ruleId":"D1","level":"warning","message":{"text":"main.topLevelStatementCount (cyclomatic 34): main.topLevelStatementCount has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/sql_proxied_server.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8f9bb9043a36be1ea19c717614050060eb9f3c46c009108e2d5fb9bb4e9169f"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.FindBeadsDirFrom (cyclomatic 34): beads.FindBeadsDirFrom 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":"internal/beads/beads.go"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"613c8050c768cc621fd0628e6ae306b706fee7d9f3ddd92e41c3e119b3adf4f6"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetEpicsEligibleForClosureInTx (cyclomatic 34): issueops.GetEpicsEligibleForClosureInTx 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":"internal/storage/issueops/epic_closure.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"c444190b443936b4640d0f7936585626a3b5751ec13db84a77eb653fbb9d4596"}},{"ruleId":"D1","level":"warning","message":{"text":"main.deleteBatch (cyclomatic 33): main.deleteBatch 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":"cmd/bd/delete.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac0064869422551c76835742049f2f36e3e698d6169fe7d8c00cea017316a47f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.checkExistingBeadsDataAt (cyclomatic 33): main.checkExistingBeadsDataAt 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":"cmd/bd/init.go"},"region":{"startLine":2268}}}],"partialFingerprints":{"codehealthFindingId/v1":"c71e02ee7b4890fa325f5727b24a0f5fab897f9faa1d5cb5fe4a00c4950546c9"}},{"ruleId":"D1","level":"warning","message":{"text":"main.detectStructuralIssues (cyclomatic 33): main.detectStructuralIssues has cyclomatic complexity 33 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 9 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/bd/swarm.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8ec7e7481b2207fe1a0f13d5185fa88ebce8c3f7db0dff1409007904bd07c55"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runSyncCommand (cyclomatic 33): main.runSyncCommand has cyclomatic complexity 33 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 5 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":"cmd/bd/sync.go"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e38fb6a81ea4f1c9bc85cb3524a6c173bb0527efcde06d900d29237b9fc4f88"}},{"ruleId":"D1","level":"warning","message":{"text":"proxyServer.ListenAndServe (cyclomatic 33): proxyServer.ListenAndServe has cyclomatic complexity 33 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 8 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":"internal/storage/dbproxy/proxy/server.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9329a898131aaee9010d1eee1cfa8136c7826fb13a71f31bfb602b27a2010d06"}},{"ruleId":"D1","level":"warning","message":{"text":"main.resolveAndCookFormulaWithVars (cyclomatic 32): main.resolveAndCookFormulaWithVars 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":"cmd/bd/cook.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"462edc0a28d37d221c1d49aed09fa4b6a2e1225f40e614f09c4e4062f4f06b52"}},{"ruleId":"D1","level":"warning","message":{"text":"main.burnMultipleMolecules (cyclomatic 32): main.burnMultipleMolecules 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":"cmd/bd/mol_burn.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ea35cb590cc6417236d6455875487ea4b98b0144501db4156f00abdac21bb35"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runRecipe (cyclomatic 32): main.runRecipe 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":"cmd/bd/setup.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"f143a43119e4643c9e0fee99e1762859914c52d5aa6421aaaed0f31ac2cf9253"}},{"ruleId":"D1","level":"warning","message":{"text":"main.formatIssueLongExtras (cyclomatic 32): main.formatIssueLongExtras has cyclomatic complexity 32 (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/bd/show_format.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"beb4b801db5252b31f04eec3bb8d74578f112d67213041c9a2413e50cb00dd5d"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.Init (cyclomatic 32): Tracker.Init 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":"internal/jira/tracker.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f75b301ae881c4cfd9c1c0a6f1fffc3ed7c37e46e251be3ddcc029f52109593"}},{"ruleId":"D1","level":"warning","message":{"text":"storage.ValidateMetadataSchema (cyclomatic 32): storage.ValidateMetadataSchema 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":"internal/storage/metadata.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"18cf5d65596566472823b0949bd94e1e99d0bf557b085bc016e261775a198b07"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.MoveIssuePersistenceInTx (cyclomatic 32): issueops.MoveIssuePersistenceInTx has cyclomatic complexity 32 (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":"internal/storage/issueops/persistence.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"a255d77c06282ba77fae2744a4c0635098ef419b467881e370198b0f3b130430"}},{"ruleId":"D1","level":"warning","message":{"text":"main.parseCountFilter (cyclomatic 31): main.parseCountFilter 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":"cmd/bd/count.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"2636dfa329ee3ccd7e36a67d35511f304b1a19152e78c25019fe33b5fadc5e55"}},{"ruleId":"D1","level":"warning","message":{"text":"worktreeRemovalPlan.observeRevalidation (cyclomatic 31): worktreeRemovalPlan.observeRevalidation 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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"c014eb4ab2901aaaae5ae6a375ebdcb8837fe23ad9e5d8cf058ca24116e7155d"}},{"ruleId":"D1","level":"warning","message":{"text":"worktreeremove.Prepare (cyclomatic 31): worktreeremove.Prepare 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":"internal/worktreeremove/policy.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"e657af0e56be41bb771e26852c68fa1778ef79248899e81875be8c5c987d473b"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runGateCheckProxiedServer (cyclomatic 30): main.runGateCheckProxiedServer has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 14 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/gate_proxied_server.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"73360bddd2347bbc9d45351cf6e50789bcc8e7937c985a047a50acd4b71a8a41"}},{"ruleId":"D1","level":"warning","message":{"text":"main.computeLayout (cyclomatic 30): main.computeLayout 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":"cmd/bd/graph.go"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"78b6b756d8b7b3cf81a5751080df9abde13fc4d0c7a5a0978dc03455d420f779"}},{"ruleId":"D1","level":"warning","message":{"text":"main.handleUpdateRepoID (cyclomatic 30): main.handleUpdateRepoID 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":"cmd/bd/migrate.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"940ba0a737a5f65e61ef950d493aa2f78f0db05c585f73e0326665e977271ab6"}},{"ruleId":"D1","level":"warning","message":{"text":"dependencySQLRepositoryImpl.Insert (cyclomatic 30): dependencySQLRepositoryImpl.Insert 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":"internal/storage/domain/db/dependency.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf40145cfd28fd874851a418dfcd5cdb676b516c62df94add81b61bc9ca584f"}},{"ruleId":"D1","level":"warning","message":{"text":"versioncontrolops.mergeIssuesConflictRow (cyclomatic 30): versioncontrolops.mergeIssuesConflictRow 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":"internal/storage/versioncontrolops/automerge.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5b9d0b3a82d9c9350d4d284af86a8227262b555593726598d73f3362ca3a1a"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runEditProxiedServer (cyclomatic 29): main.runEditProxiedServer 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, 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/bd/edit_proxied_server.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"135003a30cb017bf174c5ccb23681a06dc49912c28ee573c275c5ea29601fdb8"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runGitLabSync (cyclomatic 29): main.runGitLabSync 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, 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/bd/gitlab.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"d361e31949e51f1149d609029e47f768e9652b4b5836a222cd691f9ae8ae855c"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.checkYAMLConfigValues (cyclomatic 29): doctor.checkYAMLConfigValues 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/bd/doctor/config_values.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"587f13ccf72c00793955041217dd7db2635f0d5b04f548577b7efd5f350e37a9"}},{"ruleId":"D1","level":"warning","message":{"text":"dolt.applyConfigDefaults (cyclomatic 29): dolt.applyConfigDefaults 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":"internal/storage/dolt/store.go"},"region":{"startLine":1265}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb41ec6eec817c6121506fc6be0e07f2bc8dec20261d0167aa4fa6b54e1f8dd"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.deleteMany (cyclomatic 29): issueUseCaseImpl.deleteMany has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/issue_delete.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7438e5bdc6e7cae1d17e12e049d83a8805a11e41cd68b890c5fa5e35db8eb88"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runBatchOpUOW (cyclomatic 28): main.runBatchOpUOW 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":"cmd/bd/batch_proxied_server.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed62b32369343fd11c0e6c4ee2c729e4f8ed7b259dfa94197afe1ced8ca3ceb2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runRulesCompact (cyclomatic 28): main.runRulesCompact has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own 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/bd/rules.go"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b03d60f6ad38feb2188ca431f3ee406b2d79e27db521bb6795931cb3cdf5b6c"}},{"ruleId":"D1","level":"warning","message":{"text":"main.autoMigrateOnVersionBump (cyclomatic 28): main.autoMigrateOnVersionBump 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":"cmd/bd/version_tracking.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"a22d78521fb1c85a1ea297ada2c66a25d3e8ced2872a879e8358334c394264d6"}},{"ruleId":"D1","level":"warning","message":{"text":"setup.installClaude (cyclomatic 28): setup.installClaude 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":"cmd/bd/setup/claude.go"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a88f7740eaf2f36f6c14b735f7941975f3b39eaeee78faab51d98b90b148077"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.GetCreateDatabaseProxyServerEndpoint (cyclomatic 28): proxy.GetCreateDatabaseProxyServerEndpoint 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"01f9320a31c361bbf10bf2c91a35651dfda5862539e9e27022dbcbe1fd56bbca"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCompactProxiedServer (cyclomatic 27): main.runCompactProxiedServer has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 5 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/bd/compact_proxied_server.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"6495a777205a3da31499cdbe828aac71ff375f3207f912df02e3a9c7ed8cbd5f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.maybeAutoPush (cyclomatic 27): main.maybeAutoPush 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":"cmd/bd/dolt_autopush.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"221b65f51bcbb14502e29327382a772e5dac27d68c4bc7aef726d0491c29e3c6"}},{"ruleId":"D1","level":"warning","message":{"text":"main.maybeAutoExport (cyclomatic 27): main.maybeAutoExport 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/bd/export_auto.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cf357c366dfcb13ba89dfe026667ab3fb89c3fa8b847874ff43e84890524485"}},{"ruleId":"D1","level":"warning","message":{"text":"main.filterSubgraphOpen (cyclomatic 27): main.filterSubgraphOpen 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":"cmd/bd/graph.go"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"53c12a39b41efd9ecc118260664dc962bda307898cdc06e2618445f145e8f30b"}},{"ruleId":"D1","level":"warning","message":{"text":"main.filterStaleImportIssues (cyclomatic 27): main.filterStaleImportIssues 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":"cmd/bd/import_shared.go"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ffc724fb31acf966b907fcef2ea71eeb7fba93c6dba3bcdb3c3a1c202b535e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runPourProxiedServer (cyclomatic 27): main.runPourProxiedServer has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 52). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_proxied_server.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"35c64bf3cd08500eec941903000f9dc74e623fb4a2919621c0a07191d7d5bdaa"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runPour (cyclomatic 27): main.runPour 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":"cmd/bd/pour.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"78dc55db32432f16bd8b75829401bd5f47ef9b0412e64271ce6d7ffb9a1d87cf"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runPurgeOrPruneProxied (cyclomatic 27): main.runPurgeOrPruneProxied has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 53). 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/bd/purge_proxied_server.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"16dde071e0c86d097b020499e150b621d41f20a413a6677a734c1e77f706760f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runReadyProxiedExplain (cyclomatic 27): main.runReadyProxiedExplain 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/bd/ready_proxied_server.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c44f82752745e5bba76375f37cd5ea4e5461b737024835eb0260dfef7190b36"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runSetStateProxiedServer (cyclomatic 27): main.runSetStateProxiedServer has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/state_proxied_server.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd820b5003c6da40af0072d98fc296c6e93b83f513f7a9abdda15b07d546879"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ApplyMetadataPatch (cyclomatic 27): issueops.ApplyMetadataPatch 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":"internal/storage/issueops/aggregate.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf865733785eb6c0617a942e830d9abef7b3daa5a354114b0d141935213b467"}},{"ruleId":"D1","level":"warning","message":{"text":"main.installHooksWithOptions (cyclomatic 26): main.installHooksWithOptions 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/bd/hooks.go"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9b266bedf3193bad5e8d0775fe4d73323fa416e3d6f1206bc0fb29d61b8905"}},{"ruleId":"D1","level":"warning","message":{"text":"main.setupGlobalGitIgnore (cyclomatic 26): main.setupGlobalGitIgnore 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/bd/init_stealth.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"0112c6e56ead11764aeda7ad53968fa1dd5f3600b80955051c3c12ebbb2cc342"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.reconcileAuthoritativeServerMetadata (cyclomatic 26): fix.reconcileAuthoritativeServerMetadata 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/bd/doctor/fix/metadata.go"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"783cedcf82cd17f2e8dc89ab651cb44f00ee052ce43bfec68f185bbac16dd329"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.doRequest (cyclomatic 26): Client.doRequest 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":"internal/ado/client.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1d40d9b891857ca5a91ad70cbb9a2d0da3ac305d093311cd5fe7a56c316402"}},{"ruleId":"D1","level":"warning","message":{"text":"Condition.evaluateAggregate (cyclomatic 26): Condition.evaluateAggregate 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":"internal/formula/condition.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dcbf6444cf500d9ebf885186f39213db968232c2fbe1062c8c1d4106ba8b19e"}},{"ruleId":"D1","level":"warning","message":{"text":"dolt.applyResolvedConfig (cyclomatic 26): dolt.applyResolvedConfig 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":"internal/storage/dolt/open.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4bc8f15137c8f4eaaa5be6dda218e70b8f2908a05734ee14344b19a86ab3197"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.PersistDependenciesWithOptionsResult (cyclomatic 26): issueops.PersistDependenciesWithOptionsResult 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":"internal/storage/issueops/create.go"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"298dba7150f2d874f0db802538d46ea928e35274c2ee53818fd03ad50dc5d9fe"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ReconcileChildCounters (cyclomatic 26): issueops.ReconcileChildCounters 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":"internal/storage/issueops/create.go"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6aa89811c4fa0469cdf6065787ed977221197d8c4b131db9acc8965c803fa65"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.SearchIssuesWithCountsInTx (cyclomatic 26): issueops.SearchIssuesWithCountsInTx 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":"internal/storage/issueops/search_counts.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b7c89f51c6422f8289d8d3e540732911a04cd56a1a3663ecd86a9b9ec49455"}},{"ruleId":"D1","level":"warning","message":{"text":"versioncontrolops.SettleMerge (cyclomatic 26): versioncontrolops.SettleMerge 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":"internal/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c4d6899fedf6fb816512a5296ad4a02b4aaca2e0ed55654178dbe10ea4750e1"}},{"ruleId":"D1","level":"warning","message":{"text":"ui.SanitizeForTerminal (cyclomatic 26): ui.SanitizeForTerminal 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":"internal/ui/sanitize.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"03f1decac143974c41b40398f473ddf8e8703a73f65617fdb1e5f5ac200bd260"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCompactAll (cyclomatic 25): main.runCompactAll 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/bd/compact.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2d82e759f1974f8cc987e8546d82b881f0cdb03d6bf94b2b691b4c52802e589"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runDepTreeProxiedServer (cyclomatic 25): main.runDepTreeProxiedServer has cyclomatic complexity 25 (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/bd/dep_proxied_server.go"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"33ce5c72cc2e355745e8acf8e554f8e5d1ef40e49e05904cf363a490a6fe7cdb"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderRawSQLResult (cyclomatic 25): main.renderRawSQLResult 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/bd/sql_proxied_server.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"58dd87f955c70fd6f12a66cc762189ae65aef3e7999b33c5c3a61b4d4848d926"}},{"ruleId":"D1","level":"warning","message":{"text":"main.resolveBeadsDirForDBPath (cyclomatic 25): main.resolveBeadsDirForDBPath has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 6 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/bd/store_reopen.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"a945c42f2217ac6a982407736989cd54c84943d8ecf83a706b9d274ec3d39fff"}},{"ruleId":"D1","level":"warning","message":{"text":"doltserver.ResolvePhysicalRoots (cyclomatic 25): doltserver.ResolvePhysicalRoots 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":"internal/doltserver/physical_root.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf5c6ec3cdbf0d09a50a09b857e7f9afe5065e573a77f15c3be179962278743"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.doRequest (cyclomatic 25): Client.doRequest 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":"internal/jira/client.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e7790a5af69e15ce9b908836db04edc1cbebd9bbafe0aafd5e863a2cf02aa17"}},{"ruleId":"D1","level":"warning","message":{"text":"dependencyUseCaseImpl.AddDependencies (cyclomatic 25): dependencyUseCaseImpl.AddDependencies 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":"internal/storage/domain/dependency.go"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"9747d6371bea9d95a58e95bac7662f6aba8597ef3a08df98da40b43c594cc2a7"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.filterReadyWispsInTx (cyclomatic 25): issueops.filterReadyWispsInTx 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":"internal/storage/issueops/ready_work.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"2be51f468dbd23eb5037ff61501dfa2535c378bb99f380317d47f0e87dc5cc37"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runArtifactsCheck (cyclomatic 24): main.runArtifactsCheck 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":"cmd/bd/doctor_artifacts.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"478c52b960217354b329ab032597b5e351cdb3f79126263edbd1ff9884472785"}},{"ruleId":"D1","level":"warning","message":{"text":"main.autoConfigureForkContributor (cyclomatic 24): main.autoConfigureForkContributor 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":"cmd/bd/init_contributor.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2cedf7f6a80ecb802c3b5d8b297699cfcfc0440ad4853c8ab780cab16171d1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.findParentMolecules (cyclomatic 24): main.findParentMolecules 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":"cmd/bd/mol_current.go"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8cdeeb16888ffe59bae96c3c27cd61d2d68d4c3bc165eb9f681065189ad7d69"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runReadyExplain (cyclomatic 24): main.runReadyExplain 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":"cmd/bd/ready.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"02137831b0135f3d70d6ed00f399c412e9e7b74aa0114266308c35fadc22c4ab"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runWispCreateCore (cyclomatic 24): main.runWispCreateCore 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":"cmd/bd/wisp.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a02b5a3b6070786bd9974681ed3a70c1ca47bc3a60af5eda82f51b62180ebcc"}},{"ruleId":"D1","level":"warning","message":{"text":"main.prepareWorktreeRemoval (cyclomatic 24): main.prepareWorktreeRemoval 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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"04897d67a471e350d0fa3b9ad4244a4c07b1531dfe7138ee230435ec82c51ed6"}},{"ruleId":"D1","level":"warning","message":{"text":"formula.ApplyExpansions (cyclomatic 24): formula.ApplyExpansions 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":"internal/formula/expand.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"778b9786fad41bc88ffa08dc688fb60e1aec7ec804defdbb81025889ec056dab"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.spawnAndHandoff (cyclomatic 24): proxy.spawnAndHandoff has cyclomatic complexity 24 (threshold 15). 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, separate the cases: extract each independent branch into its own 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/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c03255f35d3db4852a1b6cb0665a16c733cf99b724e4c8c1d87c95beb7d4bc1"}},{"ruleId":"D1","level":"warning","message":{"text":"dolt.openServerConnection (cyclomatic 24): dolt.openServerConnection has cyclomatic complexity 24 (threshold 15). Of this number, 20 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":"internal/storage/dolt/store.go"},"region":{"startLine":2177}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a6d3eb953e408f23104c57af00308bde8f1cc6a21ebe30e2aa22e19fef7e75d"}},{"ruleId":"D1","level":"warning","message":{"text":"schema.checkRemoteMigrateGate (cyclomatic 24): schema.checkRemoteMigrateGate 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":"internal/storage/schema/remote_migrate_gate.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"6af239365b60e605ba543f6a1d85e91e5babf46951002864f1ce342c91f4fa53"}},{"ruleId":"D1","level":"warning","message":{"text":"sqlbuild.BuildReadyWorkWhere (cyclomatic 24): sqlbuild.BuildReadyWorkWhere 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":"internal/storage/sqlbuild/ready.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b2b6c59f83dda7d0a994f19e8fb6c71a413cb837c324acf3c4bd1346daa893"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runBatchOp (cyclomatic 23): main.runBatchOp 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/bd/batch.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"698d40e4f536137ce3c60dd948020c2fc953536edb7a9e44645b2765e73daf65"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCreateProxiedMarkdown (cyclomatic 23): main.runCreateProxiedMarkdown has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/create_proxied_server.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc34e7d6acb0fd060329c398e2f04e6c2a74409364d4e0a3b3c0d2f09dc8c65e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderDoltStopResult (cyclomatic 23): main.renderDoltStopResult 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/bd/dolt.go"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b53fcc93ed35f73822145b98b0040de6c6d54746144042083652cbc01b0ab17"}},{"ruleId":"D1","level":"warning","message":{"text":"main.loadGraphSubgraph (cyclomatic 23): main.loadGraphSubgraph 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/bd/graph.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"8854b130c7c4df555924e42f5c95a09be144524b50a26dc6de2575d6322cba06"}},{"ruleId":"D1","level":"warning","message":{"text":"main.dagMergeRune (cyclomatic 23): main.dagMergeRune has cyclomatic complexity 23 (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/bd/graph_visual.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"ede585803e487ede908e17e024339693dab1512c542236df61ad63e0c078fda2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.updateAgentFile (cyclomatic 23): main.updateAgentFile 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/bd/init_agent.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b04bd8f53209dc094f62f7c83cd841c60c3e099cdd593ba6587544b82c5e217"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runJiraSync (cyclomatic 23): main.runJiraSync 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":"cmd/bd/jira.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4226f33d8796d660d45fd1cdcd6973f77ad4516ce1e12fe5116dc2c35d648a2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMigrateToProxiedServer (cyclomatic 23): main.runMigrateToProxiedServer 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/bd/migrate_dolt_mode.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26cb46a406f81d118abdc8cd7d3bdbb45afc049637aa455fc78754ffd52b296"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMigratePersonal (cyclomatic 23): main.runMigratePersonal 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, separate the cases: extract each independent branch into its own 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/bd/migrate_personal.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"47758db2d6aeedd03f2c323bdb25fb121874c9572e4d85566a28ff0a563fcdcd"}},{"ruleId":"D1","level":"warning","message":{"text":"main.formatIssueMetadata (cyclomatic 23): main.formatIssueMetadata 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/bd/show_format.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"4430e11ce7fa76260ebe519743a92a26aa151853abead42a4b93c8937c590a83"}},{"ruleId":"D1","level":"warning","message":{"text":"formula.tokenize (cyclomatic 23): formula.tokenize 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":"internal/formula/range.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5dd57b375115bcf71f2512a0ebcd2440a716f9e46a6b502998eec01962b68f1"}},{"ruleId":"D1","level":"warning","message":{"text":"remotecache.validateSchemeURL (cyclomatic 23): remotecache.validateSchemeURL 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":"internal/remotecache/url.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c54fa00404a6163223bc03331633c7692250c2703140932de65687c67de02f5"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetDependencyCountsInTx (cyclomatic 23): issueops.GetDependencyCountsInTx 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"c38c90279bdc8f6ca2a28b008ccca800f7f842e7ed1bd7cda9a798d7ae2b1ad2"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.IsBlockedInTx (cyclomatic 23): issueops.IsBlockedInTx 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"f90e6cef251b2b5114120143f27d29dccdd1f0736516ca8eeee35dd5012d76ad"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.PromoteFromEphemeralInTx (cyclomatic 23): issueops.PromoteFromEphemeralInTx 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":"internal/storage/issueops/promote.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b261bb1414d8e69eabcea49a528c5412fa09b191a4365e775621232ff59fccd"}},{"ruleId":"D1","level":"warning","message":{"text":"Issue.ValidateWithCustom (cyclomatic 23): Issue.ValidateWithCustom 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":"internal/types/types.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"28126bf7677bd080b054e954937c3752937bfea0a9d04b938db8da2a6d534bbe"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.RunLifecycleCloseIsIdempotentAndKeepsTheFirstClose (cyclomatic 22): conformance.RunLifecycleCloseIsIdempotentAndKeepsTheFirstClose has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/lifecycle_close_reopen_contract.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"42756ef0b03d7499ee333d2f1e9d1b22d1534dca2df9202d2f0cacda18149af1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runPollutionCheck (cyclomatic 22): main.runPollutionCheck 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/bd/doctor_pollution.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c473b19554855a27a56d9246192c92b0db7fb6f5083d2340f73dc0a865d3af"}},{"ruleId":"D1","level":"warning","message":{"text":"main.exportToFile (cyclomatic 22): main.exportToFile 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":"cmd/bd/export_auto.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cc6b205f79535e3e10c38afc8e5b2fcda598ec2179c8cce57cac6f19d97acd4"}},{"ruleId":"D1","level":"warning","message":{"text":"main.preservePreexistingHooks (cyclomatic 22): main.preservePreexistingHooks 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/bd/hooks.go"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"c63d10c47029919b2dc4dce1e0ed39b3e77466f26d42c579126863fcf9245251"}},{"ruleId":"D1","level":"warning","message":{"text":"main.labelMutateProxied (cyclomatic 22): main.labelMutateProxied has cyclomatic complexity 22 (threshold 15). Of this number, 13 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":"cmd/bd/label_proxied_server.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6dcb8d3b8bdb7aae5e70e141148b8a1d4786f23f19aee9b9f0bce5244a2302"}},{"ruleId":"D1","level":"warning","message":{"text":"main.handleInspect (cyclomatic 22): main.handleInspect has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate.go"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"27c52bd5b1b7226685bcb79b152ff2c293bcfc1f485c64e2fad06c2b1391c523"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMolCurrentProxiedServer (cyclomatic 22): main.runMolCurrentProxiedServer 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/bd/mol_proxied_server.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f7f166290248a83ad5d0d45935626c895de8a61103899cee0e7b80cc14836d4"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runChecks (cyclomatic 22): main.runChecks has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/preflight.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6e844eaa783eea7f6d6854c0844e2fa3fa316aa09269bdff0f09ebed130038"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMoleculeReady (cyclomatic 22): main.runMoleculeReady 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/bd/ready.go"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"124210979c195ebecee9337f2ed9b13e5a503d382124537362810e24949f5fb4"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.DetectHashBasedIDs (cyclomatic 22): doctor.DetectHashBasedIDs 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/bd/doctor/integrity.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aaf5b496ebaa107bef48784bd2607304c26c5b3c3b90908349322137935eca4"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.isPathInSafeBoundary (cyclomatic 22): beads.isPathInSafeBoundary 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":"internal/beads/context.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce1bc6609554d154156180ab31346ff4d4bee3390964a6f63ddffc60203dfc96"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.doRequest (cyclomatic 22): Client.doRequest 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":"internal/gitlab/client.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ee0e01b8b26dfb608bdc76bfe41300fedfdf0f67936e6008b0a347875330d8"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.filterCreateIssuesMixedBucketDependencies (cyclomatic 22): issueops.filterCreateIssuesMixedBucketDependencies 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":"internal/storage/issueops/create.go"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa29992431a8d9e881876548bdb340a4afd7b399e08edbf1411a4cf16566af66"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.validatePublicCreateDependencies (cyclomatic 22): issueops.validatePublicCreateDependencies 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, separate the cases: extract each independent branch into its own 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/storage/issueops/public_create.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"5235206e815cb577ef4922eb341fc904abdfea3d20178446de9d5ae553cfcf0a"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.searchInTx (cyclomatic 22): issueops.searchInTx 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":"internal/storage/issueops/search.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"45e0d3b609f0076bafe654a28ea46ef2d7c73ad9a53b24389540526048d40d04"}},{"ruleId":"D1","level":"warning","message":{"text":"doltSQLProvider.initSchema (cyclomatic 22): doltSQLProvider.initSchema has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 216, 167). 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":"internal/storage/uow/dolt_sql_provider.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"24becdab384ceb1ac7aaf75c16e7229c32aa175f14351d1fa11681440704fc65"}},{"ruleId":"D1","level":"warning","message":{"text":"ui.shouldUseHyperlinks (cyclomatic 22): ui.shouldUseHyperlinks has cyclomatic complexity 22 (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":"internal/ui/terminal.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf004f5334ff9d6fde40018a08b77af5dd12487fb725062e9e3fb86029b356f3"}},{"ruleId":"D1","level":"warning","message":{"text":"main.pushADOLinks (cyclomatic 21): main.pushADOLinks 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/bd/ado.go"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a41f45e17864db2212fe6deaa671074610c2cbc96cd4f9d0277a045c865d9ae"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCompactDolt (cyclomatic 21): main.runCompactDolt 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/bd/compact.go"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"846491049f7c6cd60c6e9270676007c79d26a1f2d637045ccf97d17e703b85e2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.CreateIssueFromFormValues (cyclomatic 21): main.CreateIssueFromFormValues 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/bd/create_form.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"f742883fd6dbb1506ca1d13173e8590daf09ddceb1a6600ceb3c76ff8a516aa2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCreateProxiedGraph (cyclomatic 21): main.runCreateProxiedGraph has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: 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/bd/create_proxied_server.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d24837459df548bbcca64f6db018674ca4b5db36eb11b9f18fcf7e3900a512"}},{"ruleId":"D1","level":"warning","message":{"text":"main.assembleAllSubgraphs (cyclomatic 21): main.assembleAllSubgraphs 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":"cmd/bd/graph.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4ac27c7d59041b07fbc4923ec49a6faf8cc1ae729e00d56538db72366c91a6"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runLinearStatus (cyclomatic 21): main.runLinearStatus 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, 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/bd/linear.go"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"16fc1188941ea970e3b1ac05794ad3320668ced718f5db499501e7e225e32799"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMolBond (cyclomatic 21): main.runMolBond 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, 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/bd/mol_bond.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd526f57dec0b8e38899d8aaaeb869773f1ba9fafbd7592ae4fd23b3eb9f948"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runNotionSync (cyclomatic 21): main.runNotionSync 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, 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/bd/notion.go"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"a25725e08c9cdbb6ebee3f4037691f282cee35b56a7385109ccf5960d0262f42"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runUnclaimProxiedServer (cyclomatic 21): main.runUnclaimProxiedServer has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 10 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/bd/unclaim_proxied_server.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa0e01ff24ffa8e7a87869f5f855794aec079f5371a9e450e65d8209e0a15e15"}},{"ruleId":"D1","level":"warning","message":{"text":"main.findAbandonedWisps (cyclomatic 21): main.findAbandonedWisps 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/bd/wisp.go"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"95eae9210572c20d101de46c93c70ea6eaaf4f6722f89ff76bad7bb85f737de5"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runWispPurgeClosed (cyclomatic 21): main.runWispPurgeClosed 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/bd/wisp.go"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"56972f9525c4bf5119a9640e69982e910f09e01bcd360b7110cfff9e49def9d5"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.DatabaseVersionWithBdVersion (cyclomatic 21): fix.DatabaseVersionWithBdVersion 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/bd/doctor/fix/migrate.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06d6c80e12782a3f631026ad70f65a46ba50caa153c4568b8efa539967fce51"}},{"ruleId":"D1","level":"warning","message":{"text":"uowExportSource.LoadExportRelations (cyclomatic 21): uowExportSource.LoadExportRelations 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/bd/export_source.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc63fb3417ad17475c07087e49f78a8474a94b046195309eeb51a5bf692a7db"}},{"ruleId":"D1","level":"warning","message":{"text":"adoFieldMapper.IssueToBeads (cyclomatic 21): adoFieldMapper.IssueToBeads 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":"internal/ado/mapping.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"3017f405bf0a7d03b5cf84ef8567e5e51658ab7fb974644aba20b914019de366"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.doRequest (cyclomatic 21): Client.doRequest 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":"internal/github/client.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"af65144a2507231dd6d6e7487fdd344c65540e678cdc714b676a2c389d67e760"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.forkExecChild (cyclomatic 21): proxy.forkExecChild 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, 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e7d4535bf2348a8fac0bbab654d2f28bd13c200f85fe7c23348bbca11ef58f"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.readAndDial (cyclomatic 21): proxy.readAndDial 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1970297b3d465383bc59d154aab56ab6bd760ee41008b87f854030c94b16a10"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.reopenIssueInTx (cyclomatic 21): issueops.reopenIssueInTx 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":"internal/storage/issueops/reopen.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c7b790b25f70ca39c406939ac2a085bc289b09ef280db98ac5fbeb8f2f3f0e8"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.RunIssueOperationsUpdateAssigneeTransferFence (cyclomatic 20): conformance.RunIssueOperationsUpdateAssigneeTransferFence 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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc3ffa95f7b0a1143ffb5a2228b7ea5046fc26884291cbd47eeb1ead42346299"}},{"ruleId":"D1","level":"warning","message":{"text":"main.maybeAutoBackup (cyclomatic 20): main.maybeAutoBackup has cyclomatic complexity 20 (threshold 15). Of this number, 18 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":"cmd/bd/backup_auto.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a325efda25755bfb7afdd0b8f4182c8dbb5117552f3a18231ed880896b2cf5b"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMigrationValidation (cyclomatic 20): main.runMigrationValidation 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":"cmd/bd/doctor.go"},"region":{"startLine":1306}}}],"partialFingerprints":{"codehealthFindingId/v1":"663a0303fcc0920a60da6e6deec8b5cf46d7e1af2510b04e0ed980f94efae1fb"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runGitHubSync (cyclomatic 20): main.runGitHubSync has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/github.go"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8dd83605457c20fdec3a8ffe9f1c5b006155752c3622d7f168b3025d0612c88"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildLinearPullHooksForStore (cyclomatic 20): main.buildLinearPullHooksForStore 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":"cmd/bd/linear.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a1dedfa4e1724ae9383153aef2d99df9d8e48526b966e33630281c2a07c7174"}},{"ruleId":"D1","level":"warning","message":{"text":"main.orderSiblingsByDeps (cyclomatic 20): main.orderSiblingsByDeps 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/bd/list_tree_deps.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc69489af764481fe7d7af09e175b4e3d209bd8f9fdb05cb6ca2a681590c2658"}},{"ruleId":"D1","level":"warning","message":{"text":"main.findHookedMolecules (cyclomatic 20): main.findHookedMolecules 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/bd/mol_current.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3644ff61acd3ee95d0ac51e0d192a726368510d2cd4bc16de65d3bf2b6ed203"}},{"ruleId":"D1","level":"warning","message":{"text":"main.findGateReadyMolecules (cyclomatic 20): main.findGateReadyMolecules 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/bd/mol_ready_gated.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c4593e87e221f4be84d48d5a7d6beae94542fe17fa05d8ab85f258759925af"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runReadyProxiedMolecule (cyclomatic 20): main.runReadyProxiedMolecule 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/bd/ready_proxied_server.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"5993e43a6660b4bb05c515bb6f8b0fc36a33e7b6d24d32dda77558f7b43aaa34"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runShowProxiedThread (cyclomatic 20): main.runShowProxiedThread 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/bd/show_proxied_server.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"45620ef3fda1e791c31e2b603bc4ea5a6aef37602f19e6e86fa2b85d99d3c615"}},{"ruleId":"D1","level":"warning","message":{"text":"main.computeReadyFronts (cyclomatic 20): main.computeReadyFronts 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/bd/swarm.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"09fa1fef0f792aa9f3670e1e646fb43d4169f69cb552f89edbad777aae7e12a0"}},{"ruleId":"D1","level":"warning","message":{"text":"main.getSwarmStatus (cyclomatic 20): main.getSwarmStatus 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/bd/swarm.go"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"7892801b04b04768cd83f4d4578d1624944da51f5e24b8f3157bfddd39d975d3"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runSwarmStatusProxiedServer (cyclomatic 20): main.runSwarmStatusProxiedServer has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 111, 101). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/swarm_proxied_server.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4f4a1011aff76f5daee3e96919d76227710563db9e2ed2ccee9ba6fd28549c"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runWispPurgeClosedProxiedServer (cyclomatic 20): main.runWispPurgeClosedProxiedServer 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":"cmd/bd/wisp_proxied_server.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"c062dfc893120ebf52192f844171c5c95dad9aab0add3712ec2561b3c29ef21f"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.CheckPrecommitBdIntegration (cyclomatic 20): fix.CheckPrecommitBdIntegration 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/bd/doctor/fix/hooks.go"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a4802cb99f7f31c1e4ee565196f85b084f14bc404e44b4cbba5036491c31394"}},{"ruleId":"D1","level":"warning","message":{"text":"setup.installAgents (cyclomatic 20): setup.installAgents 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/bd/setup/agents.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"391832d6890d0bce6a1c1c98feccac61d7a01f81c3515d6c46e6abf67e2ed851"}},{"ruleId":"D1","level":"warning","message":{"text":"doltserver.DefaultConfig (cyclomatic 20): doltserver.DefaultConfig 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":"internal/doltserver/doltserver.go"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaad122fc0882902f3d3ee85e2096c7ce39f10415250f5f9409b512646d1f41b"}},{"ruleId":"D1","level":"warning","message":{"text":"doltserver.nomsDirLooksCorrupt (cyclomatic 20): doltserver.nomsDirLooksCorrupt 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":"internal/doltserver/manifest_recovery.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"c683981d8d55117dbf753ad77e1fefeaf6ca7c779cb1c4c6218150588e3491f3"}},{"ruleId":"D1","level":"warning","message":{"text":"linear.ResolveStateIDForBeadsStatus (cyclomatic 20): linear.ResolveStateIDForBeadsStatus 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":"internal/linear/mapping.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcfeaeebbff9b37f0d87ee81218ae063718150ec1078853947aa934a8e3ef6d7"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.ReconcileParents (cyclomatic 20): Tracker.ReconcileParents has cyclomatic complexity 20 (threshold 15). Of this number, 18 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":"internal/linear/parent_reconcile.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"8988d076c46cbd8670ad4a8a85a6493c359ae483fdf641d3eaf4f52490ab2e9d"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.cleanupOrphanBackend (cyclomatic 20): proxy.cleanupOrphanBackend 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1720d164e3a7a4ad60c6d1e9e97fadf435fc7726f781d90de1d23517165208"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.verifiedReadyClaim (cyclomatic 20): DoltStore.verifiedReadyClaim 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":"internal/storage/dolt/issues.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4c9a9ca1471f19cbc7622b05df495171df766c12403f32ff2fbbae0743d75d"}},{"ruleId":"D1","level":"warning","message":{"text":"bootstrapUseCaseImpl.BootstrapProject (cyclomatic 20): bootstrapUseCaseImpl.BootstrapProject 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":"internal/storage/domain/bootstrap.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c3226fdf5819acb83eb4011d86518a9eeb63c268fa1c03c6364c51637191556"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ClaimIssueInTx (cyclomatic 20): issueops.ClaimIssueInTx 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":"internal/storage/issueops/claim.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"537dcbd486ec21a9054f763dd141f0b35a6c0c85dc15a70b747fdc4ec3bda2f4"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ReclaimExpiredLeasesInTx (cyclomatic 20): issueops.ReclaimExpiredLeasesInTx 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":"internal/storage/issueops/lease.go"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a103a9090d69148205481f4b3b4b5c624e7cd4664836cd771af8260c407733"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetMoleculeProgressInTx (cyclomatic 20): issueops.GetMoleculeProgressInTx 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":"internal/storage/issueops/molecule.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"343c5159d7eb9dc4c0965023b1389639e311c396ddb2faf7e1d99742b415b88b"}},{"ruleId":"D1","level":"warning","message":{"text":"types.NormalizePersistenceMode (cyclomatic 20): types.NormalizePersistenceMode 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":"internal/types/types.go"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8700cec115825514a6db443b1f47a5651a3f23077c1d1f972a2e81910f8c22b"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.RunBatchCloserPerItemRefusalIsAResultAndSurvivorsCommit (cyclomatic 19): conformance.RunBatchCloserPerItemRefusalIsAResultAndSurvivorsCommit 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":"backend/conformance/batch_closer_contract.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"071e806b3b91e03bcd98e689ade395cbd0182b1b86df6543bf4cb969e97ddd2d"}},{"ruleId":"D1","level":"warning","message":{"text":"main.maybeAutoImportJSONL (cyclomatic 19): main.maybeAutoImportJSONL has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/auto_import_upgrade.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"421a827268bc86d16abb2c52cb2dd7f498ba315a2aaca7e1a50731e451fde59c"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runDepListProxiedServer (cyclomatic 19): main.runDepListProxiedServer 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/bd/dep_proxied_server.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac30a984842a651c9b396b771f701fcdfe8ed0fe247fab16113cba7240ef307"}},{"ruleId":"D1","level":"warning","message":{"text":"main.issueRecordsInJSONL (cyclomatic 19): main.issueRecordsInJSONL 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/bd/export_auto.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"77189578d07125b2f2b8f7221e20ffd1de1d13510c9e6e18ceb0a33b6937c450"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runFormulaSchemaShow (cyclomatic 19): main.runFormulaSchemaShow 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/bd/formula_schema.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"771560a2ec40f8e0c3b6f9a2976e2ddb40e663de92f1ebaf71e95e12bf524c74"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildDAGGutterGrid (cyclomatic 19): main.buildDAGGutterGrid 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/bd/graph_visual.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd05a68ede829a48301aee16440671654e76cf9306d66187bc5aa550b16312cc"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runLabelListAllProxiedServer (cyclomatic 19): main.runLabelListAllProxiedServer 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":"cmd/bd/label_proxied_server.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"2289013fdd9dcc2a013bdb48ef7f6804f8aa4e5c02c791ac33d96f43c844fde0"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderMolBondDryRun (cyclomatic 19): main.renderMolBondDryRun has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_bond.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db5d3cd77c9a208e223369043e18d66f0f9cdf7996bca20b1e8142a50a9d130"}},{"ruleId":"D1","level":"warning","message":{"text":"main.performReset (cyclomatic 19): main.performReset 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/bd/reset.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"be13aba4a379ab010fae2870df607e26bde612f62bf477a0f9032e4cce79832a"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runWispGC (cyclomatic 19): main.runWispGC has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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/bd/wisp.go"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"0af0bf421f629087bb1e1741998708356cfa7b1c08891357922b0af6f60dafe3"}},{"ruleId":"D1","level":"warning","message":{"text":"main.inspectWorktreeTarget (cyclomatic 19): main.inspectWorktreeTarget has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/worktree_cmd.go"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4a6d8fdb0f9c0dabe3a2e15cfdfa96c9b7e0096ee0fc7505257304b6b88169"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.FixMissingMetadata (cyclomatic 19): fix.FixMissingMetadata 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/bd/doctor/fix/metadata.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9da1219e224dcd90d9c62203c61acf23fe19d97c422e934cdf682b04e9a0ca6"}},{"ruleId":"D1","level":"warning","message":{"text":"config.validateYamlConfigValue (cyclomatic 19): config.validateYamlConfigValue 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":"internal/config/yaml_config.go"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"892f7d617aa9dacd925f33a3693480757764d23b21c42b9d87e5738188296957"}},{"ruleId":"D1","level":"warning","message":{"text":"reflectStructTag.lookup (cyclomatic 19): reflectStructTag.lookup 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":"internal/formula/schemagen/schemagen.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f88696f3fead5a67a7a1c159629d309597d89dc2af789e434d4fd84927c9bb3"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.executeOnce (cyclomatic 19): Client.executeOnce 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":"internal/linear/client.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"69500b2d220459bd35310e057b5eb232b455efc6652cac463bd8b9de653f66cc"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.commitWorkingSet (cyclomatic 19): DoltStore.commitWorkingSet 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":"internal/storage/dolt/store.go"},"region":{"startLine":2807}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffa0dd1ae45fc4d2703436f5e7c8fddd2231265f4aef4dc0b36ada68558adcd3"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.buildBatchCommitMessage (cyclomatic 19): DoltStore.buildBatchCommitMessage 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":"internal/storage/dolt/store.go"},"region":{"startLine":3063}}}],"partialFingerprints":{"codehealthFindingId/v1":"22097484859591340396db10fb83167e119e46a3c47250f5bbb077bb40693379"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.getWispsByIDs (cyclomatic 19): DoltStore.getWispsByIDs 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":"internal/storage/dolt/wisps.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2e81b3c2b83493a712f4ea9693bc6b0fef2ad0b05b2cbd620942376882e9136"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetIssuesByIDsInTx (cyclomatic 19): issueops.GetIssuesByIDsInTx 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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2d2cc2fb82fa3353858e0957ad0465ce72afcbed4b872c565f03874cac15974"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.DiffInTx (cyclomatic 19): issueops.DiffInTx 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":"internal/storage/issueops/diff.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"0227f8cc7a164ca565eef7351caa0c9a0e5a665ba44799f204c1177f30a90773"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.dependencyIssueResolver (cyclomatic 19): Engine.dependencyIssueResolver has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tracker/engine.go"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9257700b3aedcd0019cf81f111a28b87fc519b8615921ebc3c7b151255dceb"}},{"ruleId":"D1","level":"warning","message":{"text":"Gate.Acquire (cyclomatic 19): Gate.Acquire 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":"internal/workspacegate/gate.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e34f5477a241cee99c9b82e6c0408cc591ef446f3e625d77b611f8fcd87aee0"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.RunIssueOperationsUpdateClosePolicy (cyclomatic 18): conformance.RunIssueOperationsUpdateClosePolicy 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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"b266aaebdb1a84cd20e64d95bcd9ed2d794a22fa96bf24b7109151be7602282f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildADOPushHooks (cyclomatic 18): main.buildADOPushHooks has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ado.go"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac86c5a9ae0b8ecc3f3b0fc89fced48a5d22aa0c7d57356b46a90e677652013a"}},{"ruleId":"D1","level":"warning","message":{"text":"main.outputCookDryRun (cyclomatic 18): main.outputCookDryRun has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/cook.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fcd14d69e323bec3f4ba046572031eb1ef627ec6b7d1671c322aa6e920cfeed"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runDeferProxiedServer (cyclomatic 18): main.runDeferProxiedServer has cyclomatic complexity 18 (threshold 15). Of this number, 9 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":"cmd/bd/defer_proxied_server.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"531d74bb5cd95db326049e0c52c4fc0d48f0b75a9702d2b526998fa26eafa1c6"}},{"ruleId":"D1","level":"warning","message":{"text":"main.printAllChecks (cyclomatic 18): main.printAllChecks has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor.go"},"region":{"startLine":1243}}}],"partialFingerprints":{"codehealthFindingId/v1":"390e9388ca7bd0d8519c489291844c655164a842e60bc211dad698f873264926"}},{"ruleId":"D1","level":"warning","message":{"text":"main.showDoltConfig (cyclomatic 18): main.showDoltConfig has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dolt.go"},"region":{"startLine":1904}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3e47d82037654a52289b953ccd6dbb72b6053b83ac87509f3f99406e777022"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderGraphAllSubgraphs (cyclomatic 18): main.renderGraphAllSubgraphs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ebcb13584bef1d05979ccf3e8410c8ab37a23840a7b1ce4acca92f1e9baa66"}},{"ruleId":"D1","level":"warning","message":{"text":"main.loadAllGraphSubgraphs (cyclomatic 18): main.loadAllGraphSubgraphs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph.go"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"242fbca9d7dc2af7af7f949337cebd02cdbd05791e09b2600522154df21a330f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderGraphVisual (cyclomatic 18): main.renderGraphVisual has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph_visual.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c8d6365b19e0de68caef22b01b2840fdc9f83307fb99efee162972a9ab2684c"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runTeamWizard (cyclomatic 18): main.runTeamWizard has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init_team.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"26328e646beba63d20498c3183f4db845443d93ad28d9ce6fcc5b7e1c052d6ca"}},{"ruleId":"D1","level":"warning","message":{"text":"main.ensureLinearMilestoneEpic (cyclomatic 18): main.ensureLinearMilestoneEpic has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/linear.go"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"1509af6584dc148e6d3ecb7c3fd2d2e4bf46206fe915849d67d986a8161e9ed5"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderProxiedListText (cyclomatic 18): main.renderProxiedListText has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/list_proxied_server.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7c5ed33a47397d4816b2dc312062df256d0c7e23ed33c4a242d56d4701f3669"}},{"ruleId":"D1","level":"warning","message":{"text":"main.selectedNoDBBeadsDir (cyclomatic 18): main.selectedNoDBBeadsDir has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/main.go"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"722b1af0573cbdbd2ab72aea14fbdcacce3a7657c84090bd4ce4225ed7ab71d2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.handleToSeparateBranch (cyclomatic 18): main.handleToSeparateBranch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate.go"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"89e6a87c66fd8ef39f060cb82957caa4bfe33eae421a5b5f690cbfc5a4c9a8f2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMolBondProxiedServer (cyclomatic 18): main.runMolBondProxiedServer has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 402). 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/bd/mol_proxied_server.go"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"b89f33811f364e9ef5f2066b087cd2508c352f126ce5f11aa92defde09e44137"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runReadyProxiedList (cyclomatic 18): main.runReadyProxiedList has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ready_proxied_server.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e210ae20210ad985a71842b221348300af8c57c714fb72421ce54fd688920a"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runReopenProxiedServer (cyclomatic 18): main.runReopenProxiedServer 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":"cmd/bd/reopen_proxied_server.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7e1b28fde0d57ccc5addb06ff0823645eddff5674089d1580760c877b526bc"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runShip (cyclomatic 18): main.runShip has cyclomatic complexity 18 (threshold 15). Of this number, 17 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/bd/ship.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"23147431324504be0fb5e8777f6fe729dd13998c1bf08158e28ce2be0fec8a82"}},{"ruleId":"D1","level":"warning","message":{"text":"main.showMessageThread (cyclomatic 18): main.showMessageThread has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/show_thread.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f20547941cfdcb98e86f22146a10d1946e1f74be516fba08fdaa535b144d2e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.loadDescendants (cyclomatic 18): main.loadDescendants has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/template.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6f9f97e3d5715f08ad959f85c1687490c37ebb435dd0996e5ace6e1283ed48"}},{"ruleId":"D1","level":"warning","message":{"text":"main.applyUpdateProxiedAttempt (cyclomatic 18): main.applyUpdateProxiedAttempt has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/update_proxied_server.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d5a55d013139664a88723810b6b68a54666634a1fd3c825a1b73c7ff45265a"}},{"ruleId":"D1","level":"warning","message":{"text":"main.fingerprintWorktreeStatusPaths (cyclomatic 18): main.fingerprintWorktreeStatusPaths has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47eab78fea3ff404b9517b87cf0b0a867537eb935b1fb6cceb3dcf9bb3ba20c"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.CheckFreshClone (cyclomatic 18): doctor.CheckFreshClone has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/legacy.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7754c487f912de14d72befc93547df1f9005dac6395babeb362ca8b77cdbc25"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.RepoFingerprint (cyclomatic 18): fix.RepoFingerprint has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/repo_fingerprint.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"235330074994a76204125bc2268a010c4349f16cbfe2b829590cbc73a9901c2d"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.preferStableBranchWorktreeBeadsDir (cyclomatic 18): beads.preferStableBranchWorktreeBeadsDir has cyclomatic complexity 18 (threshold 15). Of this number, 17 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":"internal/beads/beads.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c336f83a1fad74fd8e8274fb4be156d52e734f59f6717bab7c50b7b50020210"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.canonicalizeGitURL (cyclomatic 18): beads.canonicalizeGitURL 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":"internal/beads/fingerprint.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"56c8f95165ef671fd7e14d00bd63a3f631a8b81f7e1ae6d09cfc51a0ab7d21dd"}},{"ruleId":"D1","level":"warning","message":{"text":"config.SetReposInYAML (cyclomatic 18): config.SetReposInYAML 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":"internal/config/repos.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8d1dca06733ecefe45d9da28358b7213913c36ba5d8dea286fcd918099d4ba"}},{"ruleId":"D1","level":"warning","message":{"text":"doltserver.FlushWorkingSet (cyclomatic 18): doltserver.FlushWorkingSet 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":"internal/doltserver/doltserver.go"},"region":{"startLine":1542}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b3abf434263bb798a85a401c5f240a08b611b56211640fdd171db32ce217c93"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.PushEpicMilestones (cyclomatic 18): Tracker.PushEpicMilestones 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":"internal/gitlab/links.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb8ba4f369690132a40503dca43b6eafb6fb22b87f43ddcd1ee6348e1d72bcab"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.pushOne (cyclomatic 18): Tracker.pushOne 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":"internal/notion/tracker.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"d347194d5c0d8d7b7b0105ff55082ab65801795de313b2596d366b50f6d54fba"}},{"ruleId":"D1","level":"warning","message":{"text":"dolt.isRetryableError (cyclomatic 18): dolt.isRetryableError 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":"internal/storage/dolt/store.go"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a4f97c005c1a792d4e2f8257e93fdb04974f82b9022598a4c85d0e1163b2f8"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.GetMoleculeProgress (cyclomatic 18): DoltStore.GetMoleculeProgress 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":"internal/storage/dolt/queries.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b58519bc147312829a457e93d34335168e61236dc560d9c5bfabf17e13f47b"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.pushToRemote (cyclomatic 18): DoltStore.pushToRemote has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 6 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":"internal/storage/dolt/store.go"},"region":{"startLine":3529}}}],"partialFingerprints":{"codehealthFindingId/v1":"330e74d23d1ee1f76ccd59ce308c0f45109d2d2ebf4ea73ec1b551ca9dd0acd3"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetMoleculeLastActivityInTx (cyclomatic 18): issueops.GetMoleculeLastActivityInTx 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":"internal/storage/issueops/compaction.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a48cbc10a5b16610a5990f17f5c9c8e67ca22a5e88ae2c7ac721dabd50cd85"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ResolveCustomConfigInTx (cyclomatic 18): issueops.ResolveCustomConfigInTx 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":"internal/storage/issueops/config_helpers.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcd3a07ad4b6a69b3480b9c77521470285900c7e3bbb6f034454f5840d9167f6"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.CreateIssueInTxWithResult (cyclomatic 18): issueops.CreateIssueInTxWithResult 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":"internal/storage/issueops/create.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d7c0cc71d93d2ecf6da64c7274b09698347ff1604d973a13124c607d2585d5d"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ExecuteCreate (cyclomatic 18): issueops.ExecuteCreate 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":"internal/storage/issueops/execution.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e10211331643b24178b91db70bd101da3b648d1b1c91392e6c7168ff86d3240"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.getChildrenOfDeferredParentsInTx (cyclomatic 18): issueops.getChildrenOfDeferredParentsInTx 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":"internal/storage/issueops/ready_work.go"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdf74a7c0dd148189f5370c9848c01e9d354b19a25ae413630fdf92902295543"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.GetReadyWorkWithCountsInTx (cyclomatic 18): issueops.GetReadyWorkWithCountsInTx 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":"internal/storage/issueops/ready_work_counts.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"a496c27d1a8a1e6814259dc84053d5939bef0551851c2ea9f90cb4564cee5eae"}},{"ruleId":"D1","level":"warning","message":{"text":"uow.validateMetadataPatch (cyclomatic 18): uow.validateMetadataPatch 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":"internal/storage/uow/issue_operations.go"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b8cc68e16ad6c31f73eaa7ce15e8756bab8fee25347e501016f92ff3297a00"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.RunIssueOperationsRequestValuesAreNotMutated (cyclomatic 17): conformance.RunIssueOperationsRequestValuesAreNotMutated 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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":1340}}}],"partialFingerprints":{"codehealthFindingId/v1":"371d17f7b566511ba7417629bfc9854287fb276cf9b95dbcc93db09924051c51"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.testImportIssueComment (cyclomatic 17): conformance.testImportIssueComment has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/portable.go"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ec81656aedf43e22f1435eaf1f44f4b332923659eb8166f57688b3103a84da"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.testReclaimScoped (cyclomatic 17): conformance.testReclaimScoped 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":"backend/conformance/reclaim_scope.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"824ded5ef8861b9eabd5d7905be9fc3687cf800cf85481012b4cc2961cf30bdf"}},{"ruleId":"D1","level":"warning","message":{"text":"main.newBackupStatusCommand (cyclomatic 17): main.newBackupStatusCommand 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 57). 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/bd/backup.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2fa067e4888a609fe15b93cb39c5528818868d08c647057ee2a7d9578074524"}},{"ruleId":"D1","level":"warning","message":{"text":"main.detectBootstrapAction (cyclomatic 17): main.detectBootstrapAction 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/bd/bootstrap.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"410e94bd1370d0e27f5fc934a4d3631f2eb7bb6b80117a29dc415efec090a688"}},{"ruleId":"D1","level":"warning","message":{"text":"main.showConfigYAMLOverrides (cyclomatic 17): main.showConfigYAMLOverrides 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/bd/config.go"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f06fd7a70ea2700661d0b88a8388abb5fd9cd787c8b2e7714151fa2bfabcaf6"}},{"ruleId":"D1","level":"warning","message":{"text":"main.loadAndResolveFormula (cyclomatic 17): main.loadAndResolveFormula 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/bd/cook.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"d93e59613cd9b4ecd9fc404c3bc0c07ba12da7e46cebc52f1f1ebedeedc714f1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.collectDependencies (cyclomatic 17): main.collectDependencies 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/bd/cook.go"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd8fcfcfd9a83d944d2986fc0d49d6685b15ca5328f24dd461137f52e9ec58da"}},{"ruleId":"D1","level":"warning","message":{"text":"main.readBulkDepEdges (cyclomatic 17): main.readBulkDepEdges 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/bd/dep.go"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"52017d69a0087deda7bf522cdb99d2d7e663db4383dc999ec83aeb5ee5cd2e8f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.testDoltConnection (cyclomatic 17): main.testDoltConnection 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/bd/dolt.go"},"region":{"startLine":2167}}}],"partialFingerprints":{"codehealthFindingId/v1":"422e1b6d9ec04cf8513cd55be3b559d7e4bb9328449393442d063755fabf0eb1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.outputDuplicates (cyclomatic 17): main.outputDuplicates 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/bd/duplicates.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"069a7367bc372934c57a167046d34d7aeb5365e523c946641e64df3cb9f2df75"}},{"ruleId":"D1","level":"warning","message":{"text":"main.analyzeWithAI (cyclomatic 17): main.analyzeWithAI 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/bd/find_duplicates.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc049f81dec40b22f4e6f991f2cd0a7a7616c45e13b3542f880fac313b11088"}},{"ruleId":"D1","level":"warning","message":{"text":"main.uninstallHooks (cyclomatic 17): main.uninstallHooks 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/bd/hooks.go"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bd1d4c00062727a11515a8f57305ab06980f39a215f9b153359d428255a577a"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runImportRecordsClassic (cyclomatic 17): main.runImportRecordsClassic 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/bd/import.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde12a6639dd901433ba575d68bd0c3c17dd237da873d18c0f2bb22c6bef34a4"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runImportRecordsProxied (cyclomatic 17): main.runImportRecordsProxied 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":"cmd/bd/import_proxied_server.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"29679909f3e54a6f7a618dc3b6f06b4c8199dfd0b3cfea6029893a82544dab26"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runLabelPropagateProxiedServer (cyclomatic 17): main.runLabelPropagateProxiedServer has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: 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/bd/label_proxied_server.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"757ab0031d6335759074ffa62bd36ca598206ef5cb8793d2c64ad1fdb3eb635f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildLinearPushHooks (cyclomatic 17): main.buildLinearPushHooks 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 4 function literals inside it that branch (lines 789, 767, 781, \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":"cmd/bd/linear.go"},"region":{"startLine":749}}}],"partialFingerprints":{"codehealthFindingId/v1":"6831dd12fa0f2e6151ebec96c48ff7a8a1153f8542c75c94f270f21134d38156"}},{"ruleId":"D1","level":"warning","message":{"text":"main.distillSubgraph (cyclomatic 17): main.distillSubgraph 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/bd/mol_distill.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"7763f6ac029f5a07087acf2ebcbfe7f666b5456a552b9e6bcc6788663671938d"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runNotionStatus (cyclomatic 17): main.runNotionStatus 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/bd/notion.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ac3797c9f6957cc858898463611ac8f28b7955cc816290723c3e6a9ae0bb855"}},{"ruleId":"D1","level":"warning","message":{"text":"main.repairPrefixes (cyclomatic 17): main.repairPrefixes 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":"cmd/bd/rename_prefix.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3f9d6d65296790d0dcd6dc610b816d29cbe2847b4efd640a6040515ef96a3d1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.FindMergeCandidates (cyclomatic 17): main.FindMergeCandidates 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, 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/bd/rules.go"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd1697e102908a1c26f60f3461ec10c1fc13575fb18bb7ff9f7df6b225cb5a7"}},{"ruleId":"D1","level":"warning","message":{"text":"main.analyzeEpicForSwarm (cyclomatic 17): main.analyzeEpicForSwarm 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/bd/swarm.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b26a8aa3f675b44f59f31bfde62b55ec51d787eddfe77eb2f025bcf32d920f0"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderSwarmStatus (cyclomatic 17): main.renderSwarmStatus 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/bd/swarm.go"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d56f3e44b94c1ad97063950ca51667ed36034c1ead39c7e0c0d73d4d7f97633"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runSwarmValidateProxiedServer (cyclomatic 17): main.runSwarmValidateProxiedServer has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 44, 32). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/swarm_proxied_server.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"42398a9dcc30a9df9e4b2cecf7e9ae2087cdeca623546ba353963d71d3ef555e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.resolveRegisteredWorktree (cyclomatic 17): main.resolveRegisteredWorktree 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/bd/worktree_cmd.go"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"25037a1763b257a902723ad0a3b62b8eb1eb20ebe45396ef72edbb2b594356f2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.resolveExplicitWorktreeComparator (cyclomatic 17): main.resolveExplicitWorktreeComparator 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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1652}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d910a19133d9377b029c004f4223f9d9609a462bc4c7754f37208e41672921f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runWorktreeRemovalOrchestration (cyclomatic 17): main.runWorktreeRemovalOrchestration 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/bd/worktree_remove_cmd.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"075062d594510067f9630c4ad2f4bd7d51cf648762f80362365daa14c56d0cec"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.CheckLegacyCLIRemotes (cyclomatic 17): doctor.CheckLegacyCLIRemotes 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/bd/doctor/federation.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff8389b2a30cb8c5b0bf7296f7a11f790136905b2306acc892fa80dd88608c06"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.findUnknownTypesInHydratedIssues (cyclomatic 17): doctor.findUnknownTypesInHydratedIssues 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/bd/doctor/multirepo.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"24de0a3e4cce40d8fc8471dc8496692ca2d8dfbc2fe9bcece7af214a521d6e24"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.FixProjectIdentity (cyclomatic 17): fix.FixProjectIdentity 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":"cmd/bd/doctor/fix/metadata.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"04e395ac3c13c706ba4c02208f74bbde4c7ae384b52bd3b753d21ad07e2e8db8"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.Permissions (cyclomatic 17): fix.Permissions 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/bd/doctor/fix/permissions.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4e53da1d8df0e916801d03f2d19b4fb3c93fbd60bdb41fb3d48d08a16e2c18"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.OrphanedDependencies (cyclomatic 17): fix.OrphanedDependencies 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/bd/doctor/fix/validation.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8daf1443abb40c536be74cb88d9a18655feca35de6f5250c7b1c339cecb04a7c"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.ChildParentDependencies (cyclomatic 17): fix.ChildParentDependencies 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/bd/doctor/fix/validation.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4065fcbd007d8e135e3149a5afa498c559195538ef3eb51a0878d3ad36eb4962"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.CrossTableDuplicates (cyclomatic 17): fix.CrossTableDuplicates 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/bd/doctor/fix/validation.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c8d6d114ab997d73f4ebfdee353b48f8d7baa34157a1fdb283ecd743445e37"}},{"ruleId":"D1","level":"warning","message":{"text":"setup.removeClaude (cyclomatic 17): setup.removeClaude 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/bd/setup/claude.go"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"a296f762c598550751e701f8040fc92044ae4d1cb8ee2a80932db221ea70aaa1"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.findLocalBeadsDir (cyclomatic 17): beads.findLocalBeadsDir 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":"internal/beads/beads.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"242b0a3e2d80a86ffa0c88080d5de185642bc8c52924e2ba089c23596fb26cb5"}},{"ruleId":"D1","level":"warning","message":{"text":"formula.applyAdviceWithGuard (cyclomatic 17): formula.applyAdviceWithGuard 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":"internal/formula/advice.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd679fdda186a02c846f6bd8026bdeefde7675f5f8f6df181d6a5501444aaed"}},{"ruleId":"D1","level":"warning","message":{"text":"formula.expandLoopWithVars (cyclomatic 17): formula.expandLoopWithVars 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":"internal/formula/controlflow.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c4985ba15dd098a11c4850710f934d9e1c07217f095399ee5ea3019843b297"}},{"ruleId":"D1","level":"warning","message":{"text":"Lexer.NextToken (cyclomatic 17): Lexer.NextToken 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":"internal/query/lexer.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"879d6723667bc44e8c1cbdd3abac55edee070ca0594227486355d266a8d66163"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.inspectAndStopUnverifiedPID (cyclomatic 17): proxy.inspectAndStopUnverifiedPID 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":"internal/storage/dbproxy/proxy/force_stop.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"422dabd9db3828469f3c4de18bdd23c07ef26d625d442ad16173c57887b1f1e0"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.settleMergeInTx (cyclomatic 17): DoltStore.settleMergeInTx 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":"internal/storage/dolt/store.go"},"region":{"startLine":3809}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37d65a467585e9d643651f67b982cdec0b03c5cdeb22843b9f739c71de73a5c"}},{"ruleId":"D1","level":"warning","message":{"text":"issueSQLRepositoryImpl.Claim (cyclomatic 17): issueSQLRepositoryImpl.Claim 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":"internal/storage/domain/db/issue.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"0776ec7639529f56d0d6f1286ca59eedba426c7bde92708be545b031dccdbdf7"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.previewDelete (cyclomatic 17): issueUseCaseImpl.previewDelete 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":"internal/storage/domain/issue_delete.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc9c78684e8b9a9e52b160e4a15b457eae6f943b03da4f29c3881d871f9aefe2"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.collectConnectedIssues (cyclomatic 17): issueUseCaseImpl.collectConnectedIssues has cyclomatic complexity 17 (threshold 15). Of this number, 12 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":"internal/storage/domain/issue_delete.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"98ce667767cfc644ec3a44aa8db74283022d821252a2d14f26565efc51ca31d2"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ApplyLabelPatch (cyclomatic 17): issueops.ApplyLabelPatch 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":"internal/storage/issueops/aggregate.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67fa1e9869e679fd754c1f6732c8afbc9574c789366dd73af94005a4805b26d"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.searchTableInTxT (cyclomatic 17): issueops.searchTableInTxT 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":"internal/storage/issueops/search.go"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"25943d2a649a9c0a8aed76047ba4217be68a03e9181cc8af88b655df4499093c"}},{"ruleId":"D1","level":"warning","message":{"text":"schema.rekeyAuxRowTable (cyclomatic 17): schema.rekeyAuxRowTable 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":"internal/storage/schema/aux_row_id_backfill.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"99fc0bde6c28ab3c8caf2a3cd06d01d776e5393af031ecaffe8f0618c1fd652e"}},{"ruleId":"D1","level":"warning","message":{"text":"versioncontrolops.resolveOneConflictRow (cyclomatic 17): versioncontrolops.resolveOneConflictRow 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":"internal/storage/versioncontrolops/conflicts.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c088ea10d6d9c197e2b31f482414d7247c202ea8aa0e230c60bb0dad91ebd01"}},{"ruleId":"D1","level":"warning","message":{"text":"versioncontrolops.MergeWithStrategy (cyclomatic 17): versioncontrolops.MergeWithStrategy 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":"internal/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d438899cbf87f8ccdbd56f51bd688e5bc84ffd44d2fbd5e02aaf6e45955a5b6"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.Sync (cyclomatic 17): Engine.Sync 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":"internal/tracker/engine.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5711a9db0423e3f8527bc5a783c969b26299385e4dba45234b97532d08eed30"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.fetchPrelinkedIssues (cyclomatic 17): Engine.fetchPrelinkedIssues 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":"internal/tracker/engine.go"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6a3dc27ba9f3ddf35ce5940051656f122ddf6279f2fedc198c5566fea68dc6"}},{"ruleId":"D1","level":"warning","message":{"text":"Issue.ValidateForImport (cyclomatic 17): Issue.ValidateForImport 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":"internal/types/types.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e32444e1e8b9947b58e5b6566d3540f092094911eb5366cfbca888e387eb02"}},{"ruleId":"D1","level":"warning","message":{"text":"conformance.RunIssueOperationsUpdateLabelPatchValueRules (cyclomatic 16): conformance.RunIssueOperationsUpdateLabelPatchValueRules 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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9987e1d5882cf0b3ebbbd2ef1def5ab4d45fd02c15689eacad0203cfda4e922"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildADOPullHooks (cyclomatic 16): main.buildADOPullHooks has cyclomatic complexity 16 (threshold 15). Of this number, 8 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":"cmd/bd/ado.go"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc441c9708002c463bf1898184f62b435cabb2c1edc4d16f913e509b9b539de2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCompactAnalyze (cyclomatic 16): main.runCompactAnalyze 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/bd/compact.go"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2091a56b5c656f4af100d0e932dba4f9cea23a1c7f59e8338608c8feb1fd883"}},{"ruleId":"D1","level":"warning","message":{"text":"main.checkRemoteDrift (cyclomatic 16): main.checkRemoteDrift 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/bd/config_drift.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"166de8f618c5bb7353245d205e51338f0f34e1ef884a855cfc58be510d480431"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runCook (cyclomatic 16): main.runCook 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, 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/bd/cook.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceedefb5dce697828c4df2b39143b908778681f12a4d5ca3c52a0ce2ebbe4b90"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runUndeferProxiedServer (cyclomatic 16): main.runUndeferProxiedServer has cyclomatic complexity 16 (threshold 15). Of this number, 9 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":"cmd/bd/defer_proxied_server.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"e98d38f6cf153e269490435dbd0a6d1de6f8f8a250a947d6e05720b60c0748d5"}},{"ruleId":"D1","level":"warning","message":{"text":"main.updateTextReferencesInIssues (cyclomatic 16): main.updateTextReferencesInIssues 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/bd/delete.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"1584ef0121ca572d5faaf5ee0c63dc93f2d78744f84f39736a08262f7290fe10"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runFormulaList (cyclomatic 16): main.runFormulaList 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/bd/formula.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cbda7c700408c41c75644e9c383fe33947e307ec2f86cff89409972bdd7c6fe"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderGraph (cyclomatic 16): main.renderGraph 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/bd/graph.go"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca4dec8c722b43e2a2bdc77dd715c366f4a121188af357890fc18400388dfe12"}},{"ruleId":"D1","level":"warning","message":{"text":"main.detectUnknownGraphFields (cyclomatic 16): main.detectUnknownGraphFields 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/bd/graph_apply.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc6bd2c5757f336117da96e0b70c10d9fe89f5c2592ad807d3a6330cff26a790"}},{"ruleId":"D1","level":"warning","message":{"text":"main.validateGraphApplyNodeFields (cyclomatic 16): main.validateGraphApplyNodeFields 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/bd/graph_apply.go"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1bee91c65de00fe73cfb873d25b5f9899df5e4998d0d321c4b38973bee0e574"}},{"ruleId":"D1","level":"warning","message":{"text":"main.fixHuskyHookLayout (cyclomatic 16): main.fixHuskyHookLayout 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/bd/hooks.go"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"25054f4e2effd5c5f11a217f87b083e4a806ae0cc209588f54f87fc28e8abc21"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runImportInner (cyclomatic 16): main.runImportInner 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/bd/import.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef791e15fe73347ae00e08abf5d00cadb45bea31866415578d9745509004905"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runJiraStatus (cyclomatic 16): main.runJiraStatus 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, 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/bd/jira.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"81c680100432deea25bf1e9de4bd73dd7c00db724658e65d24bcb8ae72618f9e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runListProxiedWatch (cyclomatic 16): main.runListProxiedWatch has cyclomatic complexity 16 (threshold 15). Of this number, 9 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":"cmd/bd/list_proxied_server.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e34535c75bccdb0f93eb586ed0af3a74b0f9a5455c2b703b313bc333133edd1"}},{"ruleId":"D1","level":"warning","message":{"text":"main.buildIssueTreeWithDeps (cyclomatic 16): main.buildIssueTreeWithDeps 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/bd/list_tree.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce7f5f3b8cafa709b0cd5ac6a3e919472ab80ad6e4e3425ab0889db3dd7348c0"}},{"ruleId":"D1","level":"warning","message":{"text":"main.createIssuesFromMarkdown (cyclomatic 16): main.createIssuesFromMarkdown 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/bd/markdown.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"93300ad99b59159712e91e5e0a44fa7732b4c60c049174eb0f587502756100c5"}},{"ruleId":"D1","level":"warning","message":{"text":"main.handleSchemaMigrate (cyclomatic 16): main.handleSchemaMigrate 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/bd/migrate.go"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"1869593796a8646cc79e87a8f59d9c77a6900355cd6c02347eca797fc202a26d"}},{"ruleId":"D1","level":"warning","message":{"text":"main.executeMigrateIssues (cyclomatic 16): main.executeMigrateIssues 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/bd/migrate_issues.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a3903e3c8cee17dfae248856710cd3d9e72e2b848959f472a4c02e0ecd2867"}},{"ruleId":"D1","level":"warning","message":{"text":"main.expandMigrationSet (cyclomatic 16): main.expandMigrationSet 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/bd/migrate_issues.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3d023555cb508ecda275c141e2bcf9893bde792d950d604c2840095dd61c8df"}},{"ruleId":"D1","level":"warning","message":{"text":"main.burnWispMolecule (cyclomatic 16): main.burnWispMolecule 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/bd/mol_burn.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e03290fdef1a88b5bfdb63570fdbc9c01f457d1ba9d8c2afe8ced9aeddb0666"}},{"ruleId":"D1","level":"warning","message":{"text":"main.subgraphToFormula (cyclomatic 16): main.subgraphToFormula 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/bd/mol_distill.go"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e989c7b4675bf542657e0df094f64b55204e7024697936cd91ccaa44855db67"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runMolSquashProxiedServer (cyclomatic 16): main.runMolSquashProxiedServer has cyclomatic complexity 16 (threshold 15). 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, separate the cases: extract each independent branch into its own 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/bd/mol_proxied_server.go"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92823eddc3e72e364f7071ba1b6e8f1cc6f9e60ff2ed46ce49dd78c0a0080ae"}},{"ruleId":"D1","level":"warning","message":{"text":"main.renderOnboardInstructions (cyclomatic 16): main.renderOnboardInstructions 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/bd/onboard.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"249f61197fea022dc056a7d7241c7e13775aa231542114cf8a85d2e7e056b8a2"}},{"ruleId":"D1","level":"warning","message":{"text":"main.extractAllDirectives (cyclomatic 16): main.extractAllDirectives 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/bd/rules.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f212179a327c5dc56fa0ea67eb2d47ef33abcef7832acda0b3c1a949fe84cbc"}},{"ruleId":"D1","level":"warning","message":{"text":"main.showIssueChildren (cyclomatic 16): main.showIssueChildren has cyclomatic complexity 16 (threshold 15). 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, separate the cases: extract each independent branch into its own 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/bd/show_children.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"85c643d09e399270203633d95b517d93acc6616634e3cb8a341425f49924f4c4"}},{"ruleId":"D1","level":"warning","message":{"text":"main.showIssueRefs (cyclomatic 16): main.showIssueRefs 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/bd/show_refs.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb7ac05c64b19b52b74286bc666d45ded8b56db9c5949d4c20abe11d40d131bd"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runSyncLoop (cyclomatic 16): main.runSyncLoop 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/bd/sync.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f3fd54b4ed00dd3e160f6427e879c5a708cfc3a946ea732b6a59ff567eaee28"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runGitLabPush (cyclomatic 16): main.runGitLabPush has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/sync_push_pull.go"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ed7ba7b7358c545d394b768dd08113a9365c795a241fc8d32569e728b93a61e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.cloneSubgraphInto (cyclomatic 16): main.cloneSubgraphInto 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/bd/template.go"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2d82248f0b4d40fd27f33faac0f54c8831655db6655f6fab70987ee973fa75f"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runWispGCProxiedServer (cyclomatic 16): main.runWispGCProxiedServer 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, 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/bd/wisp_proxied_server.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"a738aa33c684bbfd1fb0399568db6b5d40cc1b90a3ab165095565306b2a216d5"}},{"ruleId":"D1","level":"warning","message":{"text":"main.addToGitignore (cyclomatic 16): main.addToGitignore 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/bd/worktree_cmd.go"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc181b69cc25a3eceb1f8fe4146a41c2772c9c2fbeac55d6f7c01f7db2016a8"}},{"ruleId":"D1","level":"warning","message":{"text":"main.readStableRegularFile (cyclomatic 16): main.readStableRegularFile 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/bd/worktree_cmd.go"},"region":{"startLine":2145}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1406c1701db1be670a6bb5e8e1f33f278706e0550b327780181ed6e329fbe01"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.CheckFederationRemotesAPI (cyclomatic 16): doctor.CheckFederationRemotesAPI 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/bd/doctor/federation.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef4b0478a1de1b466ddf683674f6003a91ccc55c03c5c20b300827c47a154d0e"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.CheckGitUpstream (cyclomatic 16): doctor.CheckGitUpstream 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/bd/doctor/git.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"7159ce7da67744b8fb5a44775789159ac57992d99bebe6cf051bcc2a588ffc68"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.classifyHookMigration (cyclomatic 16): doctor.classifyHookMigration has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/hooks_migration.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c313ddca17fcd14aa44538d5a1908c4325334815d52ce32c6c974a448ca460"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.CheckMigrationCompletion (cyclomatic 16): doctor.CheckMigrationCompletion 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/bd/doctor/migration_validation.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"576b286af5d94a495d05f810227ac211c4b0f6762e5a18e1fbb948129752b1d1"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.repairDependencyKeys (cyclomatic 16): fix.repairDependencyKeys 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/bd/doctor/fix/dep_keys.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"894a3152480343463ace4823653518b8db74dd36bbba21d690ac4e28c1bb34f9"}},{"ruleId":"D1","level":"warning","message":{"text":"fix.StaleLockFiles (cyclomatic 16): fix.StaleLockFiles 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/bd/doctor/fix/locks.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2e7744f18d1477a87724eab2e8f4042801c2f6f3555e10f110ac04ba4de4dc3"}},{"ruleId":"D1","level":"warning","message":{"text":"LinkResolver.PushLinks (cyclomatic 16): LinkResolver.PushLinks 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/ado/links.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b210dd4897ed0c4c55b6775e6e1d76ecbbcdb54e9e9972f08484de364342fc2"}},{"ruleId":"D1","level":"warning","message":{"text":"beads.FindAllDatabases (cyclomatic 16): beads.FindAllDatabases 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/beads/beads.go"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"8caa2846684761a340588d416a0dc0121e4584d0d2a80f0665f5c296283ecb17"}},{"ruleId":"D1","level":"warning","message":{"text":"formula.validateVarValue (cyclomatic 16): formula.validateVarValue 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/formula/parser.go"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8290f06761325e7002b18182ca45e94cba346d49690f583fa070a198badd624"}},{"ruleId":"D1","level":"warning","message":{"text":"linear.GenerateIssueIDs (cyclomatic 16): linear.GenerateIssueIDs 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/linear/mapping.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"c63cff8e7c71b094a1df142cf80a82eb9476bf0b0c95e5d535c9220c3c20bf80"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.Init (cyclomatic 16): Tracker.Init 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/linear/tracker.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"66b18e7cc3126004fd53f9015e79309747dc3a80e1d18397d1e422f5bce036d3"}},{"ruleId":"D1","level":"warning","message":{"text":"Loader.LoadAll (cyclomatic 16): Loader.LoadAll 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/molecules/molecules.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d25694f7dcf3dea1698d69f6bf30171d9e0e585295a0dcac4398f0d52b4d95d"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.doRequest (cyclomatic 16): Client.doRequest 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":"internal/notion/client.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aa495338b8f7281229e2782639912cf5fb1eb458a73e8932333d4251e5289cc"}},{"ruleId":"D1","level":"warning","message":{"text":"Tracker.executeBatchPush (cyclomatic 16): Tracker.executeBatchPush 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":"internal/notion/tracker.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aac4acf481ed5866a5b4fb9045cdb15d7b6376f634149b21f80ac436fd12486"}},{"ruleId":"D1","level":"warning","message":{"text":"DoltStore.DeleteIssues (cyclomatic 16): DoltStore.DeleteIssues has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own 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/storage/dolt/issues.go"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"9723b81515d5efc98b5dc52d4a9433d526ceb991833a7d62680331f9db14324d"}},{"ruleId":"D1","level":"warning","message":{"text":"doltTransaction.AddDependencyWithOptions (cyclomatic 16): doltTransaction.AddDependencyWithOptions 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":"internal/storage/dolt/transaction.go"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"45aea71e57a5b9abe9fbb9b848031b60c748443cbcba10822e732d836aa98bae"}},{"ruleId":"D1","level":"warning","message":{"text":"beadsDirFSUseCaseImpl.InitializeBeadsDir (cyclomatic 16): beadsDirFSUseCaseImpl.InitializeBeadsDir 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":"internal/storage/domain/beads.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac4021716883e2305248199774fc22d7d14bb310ea0e35e383195488512265f2"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.validatePlannedBlockingPaths (cyclomatic 16): issueUseCaseImpl.validatePlannedBlockingPaths 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/storage/domain/issue.go"},"region":{"startLine":1315}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6163d0c8f610609cd3680cb73f2d316ac2b24ef434cd69a83c8069566c8ffc7"}},{"ruleId":"D1","level":"warning","message":{"text":"issueUseCaseImpl.rewriteTextReferences (cyclomatic 16): issueUseCaseImpl.rewriteTextReferences 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/storage/domain/issue_delete.go"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d7e9ef8d086009b5d88bcf7e55a03d429ee296bd3b42a93039d3bec262c48c2"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.ValidateUpdateRequest (cyclomatic 16): issueops.ValidateUpdateRequest 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/storage/issueops/aggregate.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d73fc0d8979ce1f91b3436d5a211381e18a48af70b0a92b625c70ac1ee17e9"}},{"ruleId":"D1","level":"warning","message":{"text":"issueops.BuildBatchCommitMessage (cyclomatic 16): issueops.BuildBatchCommitMessage 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/storage/issueops/commit_pending.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"b895ce9b8f6491e3d833428c15ec53e4154d955618725636311447c2a785e26c"}},{"ruleId":"D1","level":"warning","message":{"text":"schema.runMigrations (cyclomatic 16): schema.runMigrations 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/storage/schema/schema.go"},"region":{"startLine":1375}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbf2c84a03bf901be1fe9d6d10e9c07d36cee591c46a77c8b667675ababa89b"}},{"ruleId":"D1","level":"warning","message":{"text":"uow.updateSpec (cyclomatic 16): uow.updateSpec 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/storage/uow/issue_operations.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"9904e09d781efaa0e8169a3ca01bed48fdab17a676d5614fb5b7bc253767465d"}},{"ruleId":"D1","level":"warning","message":{"text":"versioncontrolops.buildConflictRow (cyclomatic 16): versioncontrolops.buildConflictRow 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/storage/versioncontrolops/conflicts.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f9fbc28b98464a5af3500842584f80d5946d8106bbd0ab84dd0bea3b13859e"}},{"ruleId":"D1","level":"warning","message":{"text":"Engine.shouldPushIssue (cyclomatic 16): Engine.shouldPushIssue 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/tracker/engine.go"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c630b761ba42ac638b44ff3c31c09741e35814dc08a0f8546a29b5c2f88c828"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runADOSync (cognitive 141): main.runADOSync has cognitive complexity 141 (threshold 15). Drivers by points: if/else 117, loops 16, boolean chains 7, match/switch 1 (nesting depth added 83). Of this number, 140 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/bd/ado.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b1be5abbd13f773cb29aff4b9dc705433e1223a0330cfaf2402fd1665250b1"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.doPush (cognitive 137): Engine.doPush has cognitive complexity 137 (threshold 15). Drivers by points: if/else 115, loops 13, boolean chains 9 (nesting depth added 79). To reduce it, split the body into named stages: move each independent step or branch into 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/tracker/engine.go"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f257fb64d18a5c63e90a4189776db0bd752f11534b4c612566504ff9a5a867"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.FindBeadsDir (cognitive 136): beads.FindBeadsDir has cognitive complexity 136 (threshold 15). Drivers by points: if/else 113, boolean chains 20, loops 3 (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":"internal/beads/beads.go"},"region":{"startLine":757}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e7ad1ba7a9c816de6afd4ade149b70a996a53386ec0cdce35833dcd542d0947"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.doPull (cognitive 132): Engine.doPull has cognitive complexity 132 (threshold 15). Drivers by points: if/else 114, boolean chains 12, loops 6 (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":"internal/tracker/engine.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"16fbc3a93ce9988a40fc1f744b8d700c1d7d3e2d2d1417f8b6468bc5dbcc875b"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.stopAndAcquire (cognitive 122): proxy.stopAndAcquire has cognitive complexity 122 (threshold 15). Drivers by points: if/else 116, boolean chains 3, match/switch 2, loops 1 (nesting depth added 84). To reduce it, split the body into named stages: move each independent step or branch into 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/storage/dbproxy/proxy/shutdown.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6cfa0d0fc2e8f53802ff96e40cec434fc0f95db6ba2eb1aceafb1f60ea7f30"}},{"ruleId":"D2","level":"warning","message":{"text":"main.validateGraphApplyPlan (cognitive 107): main.validateGraphApplyPlan has cognitive complexity 107 (threshold 15). Drivers by points: if/else 82, loops 13, boolean chains 12 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into 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/bd/graph_apply.go"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1d76f55a47e5e9ed7d6082f9f843945e0dcbe72baf2cb716fd2b462c7a6f43f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.gatherUpdateInput (cognitive 105): main.gatherUpdateInput has cognitive complexity 105 (threshold 15). Drivers by points: if/else 94, boolean chains 11 (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":"cmd/bd/update_input.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d45f2367c8f46b0efc543dbb36ebf95c38cd83525961dffcfaabcb27943f225"}},{"ruleId":"D2","level":"warning","message":{"text":"main.analyzeMoleculeParallel (cognitive 104): main.analyzeMoleculeParallel has cognitive complexity 104 (threshold 15). Drivers by points: if/else 57, loops 39, boolean chains 6, match/switch 2 (nesting depth added 62). Of this number, 100 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":"cmd/bd/mol_show.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"a634dc18d377485a40c4b8f1cc5bc23c0832f207aed89ac5160dbadf4feaddfb"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.DeleteIssuesInTx (cognitive 104): issueops.DeleteIssuesInTx has cognitive complexity 104 (threshold 15). Drivers by points: if/else 77, loops 25, boolean chains 2 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into 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/storage/issueops/delete.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"970925571b355e57191764975e41bf869519aa9caacd2f8ab9e4df901b8da4a1"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.applyGraph (cognitive 103): issueUseCaseImpl.applyGraph has cognitive complexity 103 (threshold 15). Drivers by points: if/else 86, loops 13, boolean chains 4 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into 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/storage/domain/issue.go"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87771e8556bf120f49381a23181ec5758c82be112434452e6aeb0749585a76d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runInitProxiedServerTail (cognitive 102): main.runInitProxiedServerTail has cognitive complexity 102 (threshold 15). Drivers by points: if/else 80, boolean chains 18, match/switch 4 (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":"cmd/bd/init_proxied_server.go"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"87bd0d4ebcb0edacc04df3e5f0f4c0965c4179949a14b1846cf9ca44c8d97197"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runPurgeOrPrune (cognitive 101): main.runPurgeOrPrune has cognitive complexity 101 (threshold 15). Drivers by points: if/else 89, loops 10, boolean chains 2 (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/bd/purge.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bbc322f01779becbc9e3b80200d75e06f344d7927ed14717bcfbe473883928"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.BatchPush (cognitive 101): Tracker.BatchPush has cognitive complexity 101 (threshold 15). Drivers by points: if/else 72, loops 24, boolean chains 5 (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":"internal/linear/tracker.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb44cb21ae3be04064933679818e8ef967377133ea7b5532af0ccd8c42b6acdb"}},{"ruleId":"D2","level":"warning","message":{"text":"main.handleDoltMetadataUpdate (cognitive 96): main.handleDoltMetadataUpdate has cognitive complexity 96 (threshold 15). Drivers by points: if/else 92, boolean chains 4 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into 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/bd/migrate.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"7de85dd762ebd0f553854ef6f3ff74a35060d50adb05313abac0b5493db2fb97"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printDiagnostics (cognitive 95): main.printDiagnostics has cognitive complexity 95 (threshold 15). Drivers by points: if/else 67, loops 22, boolean chains 4, match/switch 2 (nesting depth added 58). Of this number, 87 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/bd/doctor.go"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"14a56110bd8abbe92f4e9af2898777daf62f2c0f85322e14fd1838659c04c31c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.executeGraphApply (cognitive 94): main.executeGraphApply has cognitive complexity 94 (threshold 15). Drivers by points: if/else 77, loops 14, boolean chains 3 (nesting depth added 48). Most of this is not in the body itself: 3 of the 94 points are its own statements and the rest belongs to one function literal inside it that branches (line 927). 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/bd/graph_apply.go"},"region":{"startLine":914}}}],"partialFingerprints":{"codehealthFindingId/v1":"e368e0401f3ac911fb2f3c2b01e11bb0ca5745d6f4ec67d2479269ec46fca470"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.newServerMode (cognitive 94): dolt.newServerMode has cognitive complexity 94 (threshold 15). Drivers by points: if/else 85, boolean chains 9 (nesting depth added 46). Of this number, 93 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":"internal/storage/dolt/store.go"},"region":{"startLine":1558}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe02dcf9a67ec8cbaa729cc64d09fc2b448946766e4567dbb049f5e8675b3610"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runFormulaShow (cognitive 92): main.runFormulaShow has cognitive complexity 92 (threshold 15). Drivers by points: if/else 67, loops 24, boolean chains 1 (nesting depth added 52). Of this number, 91 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/bd/formula.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9084baf388662969db6f08c05af65ea03baa5454c6de5834489a1f57e395c2d"}},{"ruleId":"D2","level":"warning","message":{"text":"doltserver.Start (cognitive 92): doltserver.Start has cognitive complexity 92 (threshold 15). Drivers by points: if/else 87, boolean chains 4, loops 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into 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/doltserver/doltserver.go"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6a19fbe48ddbc908127ed33ac9e056c16a231f59475a9128ff2760315882fb"}},{"ruleId":"D2","level":"warning","message":{"text":"doltTransaction.SearchIssues (cognitive 91): doltTransaction.SearchIssues has cognitive complexity 91 (threshold 15). Drivers by points: if/else 73, loops 16, boolean chains 2 (nesting depth added 16). 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":"internal/storage/dolt/transaction.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"2642d61b8d5d9c3d88206300d565807bdf2cb9bb6486f19f993ae61d3b4ca7d5"}},{"ruleId":"D2","level":"warning","message":{"text":"main.proxiedRenderIssue (cognitive 90): main.proxiedRenderIssue has cognitive complexity 90 (threshold 15). Drivers by points: if/else 48, loops 35, match/switch 6, boolean chains 1 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into 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/bd/show_proxied_server.go"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8698eedcb0d05036ebc2ea2f33552f3fd82f073ec9829a050971fe9f47ee893"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.ApplyUpdate (cognitive 90): issueUseCaseImpl.ApplyUpdate has cognitive complexity 90 (threshold 15). Drivers by points: if/else 86, boolean chains 4 (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":"internal/storage/domain/issue.go"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"2680315c37979d37b7abbd35191bcd7cb43b6272da316944c636d05bd9bd5540"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runGCProxiedServer (cognitive 88): main.runGCProxiedServer has cognitive complexity 88 (threshold 15). Drivers by points: if/else 79, loops 6, match/switch 3 (nesting depth added 40). Of this number, 75 points are the body\u0027s own statements and 13 belong to 5 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/bd/gc_proxied_server.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"907c61444def60c0e7f38612b1674dcd40c01792132b612ea30d9aecccbb840e"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.findDatabaseInTree (cognitive 88): beads.findDatabaseInTree has cognitive complexity 88 (threshold 15). Drivers by points: if/else 74, boolean chains 13, loops 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/beads/beads.go"},"region":{"startLine":1122}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb35df0195ea5c9e698fef574ba511519072f84a87f57b5cab7b4b02744c935e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMolBurnProxiedServer (cognitive 87): main.runMolBurnProxiedServer has cognitive complexity 87 (threshold 15). Drivers by points: if/else 64, loops 19, boolean chains 4 (nesting depth added 45). Of this number, 79 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":"cmd/bd/mol_proxied_server.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"685cc9a7190386330eb4e0525d541f2b0427f6690d58268e6c34504b73dd253d"}},{"ruleId":"D2","level":"warning","message":{"text":"config.Initialize (cognitive 85): config.Initialize has cognitive complexity 85 (threshold 15). Drivers by points: if/else 69, loops 9, boolean chains 7 (nesting depth added 43). Of this number, 78 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":"internal/config/config.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b7b4037f308f4b8c1d2e8a53f302fb8088f89618d4efd5efdb682497d1928f2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runListCore (cognitive 84): main.runListCore has cognitive complexity 84 (threshold 15). Drivers by points: if/else 72, loops 7, boolean chains 5 (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":"cmd/bd/list.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"730d2b338f863bb18ca1d4dcdce0e280813b624771e9a7d624c3448a5814a982"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runLinearSync (cognitive 81): main.runLinearSync has cognitive complexity 81 (threshold 15). Drivers by points: if/else 67, boolean chains 10, loops 4 (nesting depth added 26). Of this number, 78 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":"cmd/bd/linear.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"14607a12a601a7d37a81961d54058c9f7b9e9dfcea4d8d2a64cffdc1732c7180"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.PersistDependenciesWithOptionsResult (cognitive 77): issueops.PersistDependenciesWithOptionsResult has cognitive complexity 77 (threshold 15). Drivers by points: if/else 70, loops 6, boolean chains 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into 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/storage/issueops/create.go"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2777cd0f7d3ac7ffbb3c9d45b1befcf0378efbd57147fbfd07b76026bd01613"}},{"ruleId":"D2","level":"warning","message":{"text":"Formula.Validate (cognitive 74): Formula.Validate has cognitive complexity 74 (threshold 15). Drivers by points: if/else 57, loops 11, boolean chains 6 (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":"internal/formula/types.go"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"756cb4a13ca2195cd85edde9cb09ffb0a775d48861b8a691df9361ccafb8e49a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runExportFromSource (cognitive 73): main.runExportFromSource has cognitive complexity 73 (threshold 15). Drivers by points: if/else 55, loops 12, boolean chains 6 (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/bd/export.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f2b4dae24b4fd2aa1ad8f4b94e4036aa6123405950ae9bdfe644e45c0db459"}},{"ruleId":"D2","level":"warning","message":{"text":"main.gatherListInput (cognitive 73): main.gatherListInput has cognitive complexity 73 (threshold 15). Drivers by points: if/else 60, boolean chains 8, match/switch 3, 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":"cmd/bd/list_input.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"6afa675a2be3ee69c9f82fbab971882e9f2bedc3daed171e176b12d17b0848c2"}},{"ruleId":"D2","level":"warning","message":{"text":"workapi.BuildListFilter (cognitive 73): workapi.BuildListFilter has cognitive complexity 73 (threshold 15). Drivers by points: if/else 57, boolean chains 9, loops 7 (nesting depth added 12). 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":"internal/workapi/list.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7495250dc205b49b2cf2c56b52f5f297d65a7415681fb183813e54481edb8f6"}},{"ruleId":"D2","level":"warning","message":{"text":"storage.ValidateMetadataSchema (cognitive 72): storage.ValidateMetadataSchema has cognitive complexity 72 (threshold 15). Drivers by points: if/else 59, boolean chains 6, loops 5, match/switch 2 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into 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/storage/metadata.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"24c66d9f797bc3573d0224223dc0b311953bdc1fc86e0a271a05f730b10e68af"}},{"ruleId":"D2","level":"warning","message":{"text":"sqlbuild.BuildIssueFilterClauses (cognitive 71): sqlbuild.BuildIssueFilterClauses has cognitive complexity 71 (threshold 15). Drivers by points: if/else 56, loops 15 (nesting depth added 13). 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":"internal/storage/sqlbuild/filter.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"500ff9d9b90be3591fa0965e27769e345ce96b25a9ac2b99bbf0db2e009fb7cb"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.create (cognitive 70): issueUseCaseImpl.create has cognitive complexity 70 (threshold 15). Drivers by points: if/else 53, loops 11, boolean chains 3, match/switch 3 (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":"internal/storage/domain/issue.go"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"cddee87a05390c1bc4d399c20cbb4dc9ec24647089ca2a626f285ec448edf317"}},{"ruleId":"D2","level":"warning","message":{"text":"main.gatherCreateInput (cognitive 69): main.gatherCreateInput has cognitive complexity 69 (threshold 15). Drivers by points: if/else 61, boolean chains 8 (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/bd/create_input.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c041dda2aeb7749b228413903a3ae4b2187ea7078e225fcd84a8dd0d8c9aab"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkYAMLConfigValues (cognitive 69): doctor.checkYAMLConfigValues has cognitive complexity 69 (threshold 15). Drivers by points: if/else 55, loops 8, boolean chains 6 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/config_values.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eddc332b634832a1feda3238ce1d5a19a3288b526c0de78c582f818c859c5fa"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetBlockedIssuesInTx (cognitive 68): issueops.GetBlockedIssuesInTx has cognitive complexity 68 (threshold 15). Drivers by points: if/else 45, loops 19, boolean chains 4 (nesting depth added 31). Of this number, 67 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":"internal/storage/issueops/blocked.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36437965ecf8178f2d1ea947427bb6e231218f1d63fae06988eb7910951cd19"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetEpicsEligibleForClosureInTx (cognitive 68): issueops.GetEpicsEligibleForClosureInTx has cognitive complexity 68 (threshold 15). Drivers by points: if/else 44, loops 20, boolean chains 4 (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":"internal/storage/issueops/epic_closure.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"862fd0d5be11250264ad61bae63e67d5d6dba1db777265fa4421e769d4728bdf"}},{"ruleId":"D2","level":"warning","message":{"text":"main.burnMultipleMolecules (cognitive 66): main.burnMultipleMolecules has cognitive complexity 66 (threshold 15). Drivers by points: if/else 47, loops 16, boolean chains 3 (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":"cmd/bd/mol_burn.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f00d97b77f026abcfcc223df6d7eae9eb67b16437d7e4ef284909ce4ba1db3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runSearchProxiedServer (cognitive 66): main.runSearchProxiedServer has cognitive complexity 66 (threshold 15). Drivers by points: if/else 62, boolean chains 2, loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/search_proxied_server.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"89ddb767ff7bfe733acaf9bff437cce714434b3d6c23bbd2dca435fa77b454a5"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.TryAutoResolveMergeConflicts (cognitive 66): versioncontrolops.TryAutoResolveMergeConflicts has cognitive complexity 66 (threshold 15). Drivers by points: if/else 58, match/switch 4, loops 3, boolean chains 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":"internal/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"23dff5c3ba66af0b32a25442bdc09ef5998fdb38264dd1a3b1cd8fd861971e9b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.deleteBatch (cognitive 65): main.deleteBatch has cognitive complexity 65 (threshold 15). Drivers by points: if/else 53, loops 9, boolean chains 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/delete.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5543d9022e3fb1db0613f1f46722474c695e6f4a37146d265d86ca06f259cb7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.checkExistingBeadsDataAt (cognitive 65): main.checkExistingBeadsDataAt has cognitive complexity 65 (threshold 15). Drivers by points: if/else 54, boolean chains 8, loops 3 (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":"cmd/bd/init.go"},"region":{"startLine":2268}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ee98d3a62e86167e10d2e62ae5db946246ff66904633d7a7ca16428d5b56d7d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetNewlyUnblockedByCloseInTx (cognitive 64): issueops.GetNewlyUnblockedByCloseInTx has cognitive complexity 64 (threshold 15). Drivers by points: if/else 41, loops 19, boolean chains 4 (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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d1c8eefa377a3c896b970684983d57e9ccbf804c5c48a6310e50a50aafb8a35"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runDiagnostics (cognitive 63): main.runDiagnostics has cognitive complexity 63 (threshold 15). Drivers by points: if/else 48, boolean chains 9, loops 6 (nesting depth added 13). 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/bd/doctor.go"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68e23cf544984334cf6e15762c397df5a3d3a8f4fe1f02221d223d08eeba767"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.installClaude (cognitive 61): setup.installClaude has cognitive complexity 61 (threshold 15). Drivers by points: if/else 52, loops 8, 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":"cmd/bd/setup/claude.go"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"767dacfd278fd94b14ea4e52e5e53c01fee0aa7411e71b44ffb8b573df6ea01c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.displayShowIssueReturn (cognitive 60): main.displayShowIssueReturn has cognitive complexity 60 (threshold 15). Drivers by points: loops 29, if/else 24, match/switch 6, boolean chains 1 (nesting depth added 28). 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/bd/show_display.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"6425cc72a328e6ba60a0ebf87cb05e2eed3d71d511e9254b99f9f0c6bfdbb560"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.Init (cognitive 60): Tracker.Init has cognitive complexity 60 (threshold 15). Drivers by points: if/else 45, loops 8, boolean chains 7 (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":"internal/jira/tracker.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fa500b44d072e0650dab52ee52a8ea48c4188b8068284720959d51cc04b883"}},{"ruleId":"D2","level":"warning","message":{"text":"main.computeLayout (cognitive 59): main.computeLayout has cognitive complexity 59 (threshold 15). Drivers by points: if/else 35, loops 22, boolean chains 2 (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":"cmd/bd/graph.go"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"190d0d78acb5ac6fd67f81e21c80f15785911352f39dc08bbae13cbb2d26abd2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runRulesCompact (cognitive 59): main.runRulesCompact has cognitive complexity 59 (threshold 15). Drivers by points: if/else 46, loops 12, boolean chains 1 (nesting depth added 30). 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":"cmd/bd/rules.go"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"a48f02d80a927534708d4132731607ddcf968a26773acdd313638e25dc74b0d3"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.Update (cognitive 59): issueSQLRepositoryImpl.Update has cognitive complexity 59 (threshold 15). Drivers by points: if/else 54, boolean chains 3, loops 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":"internal/storage/domain/db/issue.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"8531c955c7b7f43e50c4914fd20d986c5650ac644223f7e9326372a69d679d47"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.ResolvePartialID (cognitive 59): utils.ResolvePartialID has cognitive complexity 59 (threshold 15). Drivers by points: if/else 46, boolean chains 7, loops 6 (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":"internal/utils/id_parser.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f7a0e940a62612b1191057f42c7f7fea0f9f6a48e137ac7756b369be598497d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runQueryProxiedServer (cognitive 57): main.runQueryProxiedServer has cognitive complexity 57 (threshold 15). Drivers by points: if/else 42, boolean chains 10, loops 5 (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/bd/query_proxied_server.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"e84999292ded5aa7e6e573f64fc511b98c82201d128926197b176e17d677283a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runContributorWizard (cognitive 56): main.runContributorWizard has cognitive complexity 56 (threshold 15). Drivers by points: if/else 53, boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init_contributor.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc2da10b26e20ed9cd8926147cc69a411c42a734554981214d9291fedb13ccd3"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.updateIssueInTx (cognitive 56): issueops.updateIssueInTx has cognitive complexity 56 (threshold 15). Drivers by points: if/else 46, boolean chains 5, match/switch 4, 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":"internal/storage/issueops/update.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec0ec3f4332a4cf63b11f71db0d8c261b5742b89dadbda8f3d60456b2c8a305"}},{"ruleId":"D2","level":"warning","message":{"text":"main.loadGraphSubgraph (cognitive 55): main.loadGraphSubgraph has cognitive complexity 55 (threshold 15). Drivers by points: if/else 45, loops 8, boolean chains 2 (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":"cmd/bd/graph.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"df39d7e15997a7de9630fd1d52670d30225539f586a580184524e3099b870867"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.DetectHashBasedIDs (cognitive 55): doctor.DetectHashBasedIDs has cognitive complexity 55 (threshold 15). Drivers by points: if/else 36, loops 16, boolean chains 3 (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":"cmd/bd/doctor/integrity.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"781a5d9006783736d653df82b6ba09279d793dceb1026819b6797b71423949be"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetDependencyCountsInTx (cognitive 55): issueops.GetDependencyCountsInTx has cognitive complexity 55 (threshold 15). Drivers by points: if/else 41, loops 12, 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"6180fe105cef34628a37d38b2fad25ae974145f2cb1ee40119647279b34cc3f2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.getDescriptionFlag (cognitive 54): main.getDescriptionFlag has cognitive complexity 54 (threshold 15). Drivers by points: if/else 42, loops 8, boolean chains 4 (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/bd/flags.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"809439b7a7949b8a07ed75a2e430e02d481b0260cc6db962ede53747df121e1f"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.addDependencyInTx (cognitive 54): issueops.addDependencyInTx has cognitive complexity 54 (threshold 15). Drivers by points: if/else 49, boolean chains 4, match/switch 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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e84b223948c1c2e6d7f11c9849829e7290f1c21ee00be5e2522c80dd2482e82"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCreateProxiedSingle (cognitive 53): main.runCreateProxiedSingle has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, boolean chains 4, match/switch 1 (nesting depth added 19). Of this number, 36 points are the body\u0027s own statements and 17 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/bd/create_proxied_server.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"62762e1088d5888ea9368928b68a465aa46a877f838488821d1c723539fbb2f4"}},{"ruleId":"D2","level":"warning","message":{"text":"main.installHooksWithOptions (cognitive 53): main.installHooksWithOptions has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, 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":"cmd/bd/hooks.go"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"a34506d6f166fa1126422c1975686198a61eb45c3af9d506b6c8eae3092c290b"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetIssuesByIDsInTx (cognitive 53): issueops.GetIssuesByIDsInTx has cognitive complexity 53 (threshold 15). Drivers by points: if/else 40, loops 13 (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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2510820020ce32d4f1c196e3627e4bcf4277b6c6d8aaa749709dc33a446d25"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveAndCookFormulaWithVars (cognitive 52): main.resolveAndCookFormulaWithVars has cognitive complexity 52 (threshold 15). Drivers by points: if/else 35, loops 11, boolean chains 6 (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/bd/cook.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d88ef7f7078cec717c03ed4bb90ff1b9d3c5dd3b1449275ec37b7ea83846d4"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.doRequest (cognitive 52): Client.doRequest has cognitive complexity 52 (threshold 15). Drivers by points: if/else 39, match/switch 9, boolean chains 3, loops 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":"internal/ado/client.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"453daab71888e85f908e6f07dfa8ecc2a5bdad09111ea33dd14616577327505c"}},{"ruleId":"D2","level":"warning","message":{"text":"ui.SanitizeForTerminal (cognitive 52): ui.SanitizeForTerminal has cognitive complexity 52 (threshold 15). Drivers by points: if/else 36, loops 9, boolean chains 7 (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":"internal/ui/sanitize.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd970abc0d5bf2a32ddac7addad1970a20470b45cd02c3d370952a1034f10001"}},{"ruleId":"D2","level":"warning","message":{"text":"main.filterSubgraphOpen (cognitive 51): main.filterSubgraphOpen has cognitive complexity 51 (threshold 15). Drivers by points: if/else 35, loops 13, boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph.go"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"a711596c80e7d0b4640400c2e038fe09686eaa987ebf0952f1c763461a76987d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.topLevelStatementCount (cognitive 51): main.topLevelStatementCount has cognitive complexity 51 (threshold 15). Drivers by points: if/else 25, loops 15, boolean chains 9, 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/bd/sql_proxied_server.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"716b9a8f088288b6fb9220c0066374ba494ac470652c4ca0c912f3e9bf1a2bd0"}},{"ruleId":"D2","level":"warning","message":{"text":"dependencyUseCaseImpl.AddDependencies (cognitive 51): dependencyUseCaseImpl.AddDependencies has cognitive complexity 51 (threshold 15). Drivers by points: if/else 43, loops 6, boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/dependency.go"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ff380e1476fdbd935e06d8bf559466831c0fb59bb378748aa981300b654edd"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.filterCreateIssuesMixedBucketDependencies (cognitive 50): issueops.filterCreateIssuesMixedBucketDependencies has cognitive complexity 50 (threshold 15). Drivers by points: if/else 44, loops 4, boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/create.go"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"c578d9fd2b747162767a347a52aaed438b775a54523f92f1f16fbd7ece3687fb"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ExecuteUpdate (cognitive 50): issueops.ExecuteUpdate has cognitive complexity 50 (threshold 15). Drivers by points: if/else 46, boolean chains 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":"internal/storage/issueops/execution.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1311e5c3e71e35839fce924ea9e45432b9d143a4f63766982f5ec041502d80"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCloseProxiedServer (cognitive 49): main.runCloseProxiedServer has cognitive complexity 49 (threshold 15). Drivers by points: if/else 34, loops 8, boolean chains 5, 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/bd/close_proxied_server.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a3080837090681745b3aef9efc25aa51f5ab8e21f6d9f7d8898621637b27668"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runInitProxiedServer (cognitive 49): main.runInitProxiedServer has cognitive complexity 49 (threshold 15). Drivers by points: if/else 40, boolean chains 9 (nesting depth added 6). Of this number, 44 points are the body\u0027s own statements and 5 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/bd/init_proxied_server.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"d55530d11db6e2ba99611abf10634e816e0a44476eaddd4eb335c6e2ae48ca9e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findHookedMolecules (cognitive 49): main.findHookedMolecules has cognitive complexity 49 (threshold 15). Drivers by points: if/else 39, loops 8, boolean chains 2 (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":"cmd/bd/mol_current.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"acae8ae89dae0cc40a4619aa79d83cb40bbd38eed9b980ad11fc002baff36e5d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ApplyMetadataPatch (cognitive 49): issueops.ApplyMetadataPatch has cognitive complexity 49 (threshold 15). Drivers by points: if/else 37, loops 9, boolean chains 3 (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":"internal/storage/issueops/aggregate.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1d6d37bf6cbace2bd5aa3c3a3f94ad8736aaee10fc97aed4e65b39feeafe71"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runBatchOpUOW (cognitive 48): main.runBatchOpUOW has cognitive complexity 48 (threshold 15). Drivers by points: if/else 47, match/switch 1 (nesting depth added 22). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/batch_proxied_server.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"6abf98aa3a365142e8359ff5eacbfef77e19b35935fbc347695ddfcd877903cd"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCompactAll (cognitive 47): main.runCompactAll has cognitive complexity 47 (threshold 15). Drivers by points: if/else 38, loops 9 (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/bd/compact.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b273c6867c4e0d3b7ac1e70d895857b8c53f72449e129b648416ef3b520ca2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.computeReadyFronts (cognitive 47): main.computeReadyFronts has cognitive complexity 47 (threshold 15). Drivers by points: if/else 33, loops 14 (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/bd/swarm.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"239c9c708f4bcd81194d4bdf1104ebac15ef9528b480794e65906ffb5b1523e9"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.FindBeadsDirFrom (cognitive 47): beads.FindBeadsDirFrom has cognitive complexity 47 (threshold 15). Drivers by points: if/else 35, boolean chains 11, 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":"internal/beads/beads.go"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b52bf8c55f13c424b18c276ea85ec31d135b24dd0577cf4a04265a835d9117"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.filterReadyWispsInTx (cognitive 47): issueops.filterReadyWispsInTx has cognitive complexity 47 (threshold 15). Drivers by points: if/else 33, loops 13, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/ready_work.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"bde45485b8a6824eadc948e6bfc28b7f16f0fa61ce72cb958d8e9d1662fbbd3d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ScanIssueFrom (cognitive 47): issueops.ScanIssueFrom has cognitive complexity 47 (threshold 15). Drivers by points: if/else 41, boolean chains 6. 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":"internal/storage/issueops/scan.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"8005bbf83b1f0444a2d99443a9411aa76900910937010600129a57791749fde7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMigrateFromProxiedServer (cognitive 46): main.runMigrateFromProxiedServer has cognitive complexity 46 (threshold 15). Drivers by points: if/else 39, loops 4, boolean chains 3 (nesting depth added 10). 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/bd/migrate_dolt_mode.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"883682973098ea87d945a610639dbfe53dfbe1fbd4b94d17c9b693d60feb8991"}},{"ruleId":"D2","level":"warning","message":{"text":"main.detectStructuralIssues (cognitive 46): main.detectStructuralIssues has cognitive complexity 46 (threshold 15). Drivers by points: if/else 34, loops 10, boolean chains 2 (nesting depth added 17). Of this number, 33 points are the body\u0027s own statements and 13 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/bd/swarm.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"233b8bf7cc5ded7ec612c1cd5a394d15d96c80694c8c1385181e59f2ae1c7a6b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.updateTextReferencesInIssues (cognitive 45): main.updateTextReferencesInIssues has cognitive complexity 45 (threshold 15). Drivers by points: if/else 39, boolean chains 3, loops 3 (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":"cmd/bd/delete.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"857694f6da488bc33a9a82a0f70ac3bbbf72b225524c935409cd4b57fe2a478e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.setDoltConfig (cognitive 45): main.setDoltConfig has cognitive complexity 45 (threshold 15). Drivers by points: if/else 40, boolean chains 4, 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":"cmd/bd/dolt.go"},"region":{"startLine":2013}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6bf6bfe83066fd03459011583579aa9da0d1ad734156e682da24d6c7774e025"}},{"ruleId":"D2","level":"warning","message":{"text":"main.exportToFile (cognitive 45): main.exportToFile has cognitive complexity 45 (threshold 15). Drivers by points: if/else 33, loops 12 (nesting depth added 24). Of this number, 44 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/export_auto.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"26154bba9f69ce25650f4470497f84e29cba3b8b401269df97ad028fca6d4e5c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.filterStaleImportIssues (cognitive 45): main.filterStaleImportIssues has cognitive complexity 45 (threshold 15). Drivers by points: if/else 35, loops 7, boolean chains 3 (nesting depth added 18). Of this number, 43 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/bd/import_shared.go"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"8816da7ed43d18b7e7665dcd3cfc1738bd5f9a5edac7cc38544e8e2385c64322"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderRawSQLResult (cognitive 45): main.renderRawSQLResult has cognitive complexity 45 (threshold 15). Drivers by points: if/else 25, loops 20 (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/bd/sql_proxied_server.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc05baa2c0f8c2013c782ba613e44380a65eb0333d1ba41b199f82acbb877866"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildUpdatePatch (cognitive 45): main.buildUpdatePatch has cognitive complexity 45 (threshold 15). Drivers by points: if/else 38, boolean chains 3, match/switch 3, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/update.go"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"29bdfc0e7da1930347fa2784ca5268c07895035bc100637ab3680905aedabd4f"}},{"ruleId":"D2","level":"warning","message":{"text":"doltserver.DefaultConfig (cognitive 45): doltserver.DefaultConfig has cognitive complexity 45 (threshold 15). Drivers by points: if/else 37, loops 5, boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/doltserver/doltserver.go"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1fe9d9650fb07d1125af3b3c1e707e845865eedd6c07f34b20f3965a637f6e6"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.SettleMerge (cognitive 45): versioncontrolops.SettleMerge has cognitive complexity 45 (threshold 15). Drivers by points: if/else 38, boolean chains 3, loops 3, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc27652f9af30c105b152cd34bbf3ed29f323d6cc826185587b8e6cc8dd1732d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.assembleAllSubgraphs (cognitive 44): main.assembleAllSubgraphs has cognitive complexity 44 (threshold 15). Drivers by points: if/else 28, loops 14, boolean chains 2 (nesting depth added 24). Of this number, 43 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/bd/graph.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"f83cbc1d9a6ff32421038eeaa6ce6217dc4dcf9f7950dbb66d7e3568c986ac13"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.removeClaude (cognitive 44): setup.removeClaude has cognitive complexity 44 (threshold 15). Drivers by points: if/else 36, loops 8 (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":"cmd/bd/setup/claude.go"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"e00e92117d1f4cae82626826264b5b96572b60713c077944bccc5a01362678f4"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.GetCreateDatabaseProxyServerEndpoint (cognitive 44): proxy.GetCreateDatabaseProxyServerEndpoint has cognitive complexity 44 (threshold 15). Drivers by points: if/else 34, match/switch 7, boolean chains 2, loops 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f3a112382828d24c294f50952d78a98404876427d7ef8dd93667cea4b17afb"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ScanIssueLiteFrom (cognitive 44): issueops.ScanIssueLiteFrom has cognitive complexity 44 (threshold 15). Drivers by points: if/else 39, boolean chains 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":"internal/storage/issueops/scan.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"b85f290dedc88eb1b75974075878a6ef13f2cec60aaf8151dd502c2e809dc9ab"}},{"ruleId":"D2","level":"warning","message":{"text":"main.loadAllGraphSubgraphs (cognitive 43): main.loadAllGraphSubgraphs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 36, loops 5, 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":"cmd/bd/graph.go"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce2b9477c013d5d20d7e7aa9d6add2bc5eb311148311f2fc366117fed27be7f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.handleUpdateRepoID (cognitive 43): main.handleUpdateRepoID has cognitive complexity 43 (threshold 15). Drivers by points: if/else 38, boolean chains 5 (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/bd/migrate.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"5315d4d7108971fc8ea41616774a68b486922dd6910d405ca28043ee37fe184b"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.doRequest (cognitive 43): Client.doRequest has cognitive complexity 43 (threshold 15). Drivers by points: if/else 38, boolean chains 2, match/switch 2, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/github/client.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"600ce1b2d187a0cd93512a56d542dcc74d4d3325919bd49ea467f98630a11a88"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ReconcileChildCounters (cognitive 43): issueops.ReconcileChildCounters has cognitive complexity 43 (threshold 15). Drivers by points: if/else 35, loops 5, boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/create.go"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0aafaf9839e138f5e09bbcbfca48536f2823cb715f67176061bd5a0af08eb2d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.detectUnknownGraphFields (cognitive 42): main.detectUnknownGraphFields has cognitive complexity 42 (threshold 15). Drivers by points: if/else 35, loops 6, 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":"cmd/bd/graph_apply.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"b691c707bee841bcae3a209a66a4c6323876260e432ef5a7f2d4b960c599c523"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findParentMolecules (cognitive 42): main.findParentMolecules has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22, loops 18, 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":"cmd/bd/mol_current.go"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd94b2bbb1e2ca228767448a295f1dfe8dceeec0a48362d041fc31fb44d234ac"}},{"ruleId":"D2","level":"warning","message":{"text":"main.gatherReadyInput (cognitive 42): main.gatherReadyInput has cognitive complexity 42 (threshold 15). Drivers by points: if/else 30, boolean chains 10, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ready_input.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3de3a63aad9b330f67bf8797909fb6bc236839609da00ed162724bf409484ac"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runRecipe (cognitive 42): main.runRecipe has cognitive complexity 42 (threshold 15). Drivers by points: if/else 28, loops 11, boolean chains 2, match/switch 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":"cmd/bd/setup.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"b024fff3c2fe08894aa53c3e4cd01d2936f49be4e08ce7cf18df02b4b9fbb936"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.applyAdviceWithGuard (cognitive 42): formula.applyAdviceWithGuard has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25, loops 17 (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":"internal/formula/advice.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa12e550469a731344fc789283c22718d6e31ec325de1c887784da5aa46ab96d"}},{"ruleId":"D2","level":"warning","message":{"text":"Condition.evaluateAggregate (cognitive 42): Condition.evaluateAggregate has cognitive complexity 42 (threshold 15). Drivers by points: if/else 30, loops 8, boolean chains 2, match/switch 2 (nesting depth added 22). 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":"internal/formula/condition.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"59072a5eec3e430f1bb704a16f55e7a0538223e433ba02a2962477f34dbd997b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.pushADOLinks (cognitive 41): main.pushADOLinks has cognitive complexity 41 (threshold 15). Drivers by points: if/else 34, loops 6, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ado.go"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81673aba2640b2099eb6be6da678f6694073eecac7450cf535cc4f67bbe0f51"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildDAGGutterGrid (cognitive 41): main.buildDAGGutterGrid has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21, loops 19, 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":"cmd/bd/graph_visual.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"0906f4e616ee9f5bab11d732402815189da9468e355a089e8ec5ae905810da4c"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.ApplyExpansions (cognitive 41): formula.ApplyExpansions has cognitive complexity 41 (threshold 15). Drivers by points: if/else 32, loops 6, boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/formula/expand.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"8803cbd71ff54caff85af90891915f0a3b275788872efb95c139e679fc84c794"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.doRequest (cognitive 41): Client.doRequest has cognitive complexity 41 (threshold 15). Drivers by points: if/else 33, match/switch 5, 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":"internal/jira/client.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ed9e89a3777df920e2a5bcd56545bf38152e6cbbd8cdedc679925a7dadb18b0"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.getWispsByIDs (cognitive 41): DoltStore.getWispsByIDs has cognitive complexity 41 (threshold 15). Drivers by points: if/else 30, loops 11 (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":"internal/storage/dolt/wisps.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"34be185283dd346e70af39c310275a0cd32cc47c849a6bf835f40a002fdb700f"}},{"ruleId":"D2","level":"warning","message":{"text":"schema.MigrateUp (cognitive 41): schema.MigrateUp has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36, boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/schema/schema.go"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa44ffa10fd6949010b12b84c220a3360d1f12e621743dc1f594c36667e64730"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.mergeIssuesConflictRow (cognitive 41): versioncontrolops.mergeIssuesConflictRow has cognitive complexity 41 (threshold 15). Drivers by points: if/else 28, boolean chains 7, loops 4, 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":"internal/storage/versioncontrolops/automerge.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f3d115c3c63eca1ba5480f05169f595d5fa9fd82b1261aadf5a650ee168a14a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runArtifactsCheck (cognitive 40): main.runArtifactsCheck has cognitive complexity 40 (threshold 15). Drivers by points: if/else 28, loops 11, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor_artifacts.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca6c99e682ef3eabba0698403d7793734401dd87f0d56d3922e4a2c343739d4"}},{"ruleId":"D2","level":"warning","message":{"text":"main.setupGlobalGitIgnore (cognitive 40): main.setupGlobalGitIgnore has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init_stealth.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b25d4ce2170cd5b6e83031ee7ae2867cd35ef24cbb614d49f544d0ca2287058"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runPourProxiedServer (cognitive 40): main.runPourProxiedServer has cognitive complexity 40 (threshold 15). Drivers by points: if/else 34, loops 6 (nesting depth added 14). Most of this is not in the body itself: 8 of the 40 points are its own statements and the rest belongs to one function literal inside it that branches (line 52). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_proxied_server.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"adc38bd7962f455a79fe361e064a2a0ad81efe558b9874c369ee6acab701f556"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runPour (cognitive 40): main.runPour has cognitive complexity 40 (threshold 15). Drivers by points: if/else 34, loops 6 (nesting depth added 14). 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":"cmd/bd/pour.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa9decb8785e44f7c2293a3a3610ea9bb3ec6d07641588f0c4a843679343c0e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runSyncCommand (cognitive 40): main.runSyncCommand has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, boolean chains 4, match/switch 1 (nesting depth added 10). Of this number, 34 points are the body\u0027s own statements and 6 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":"cmd/bd/sync.go"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ab693943f80ee56bbd5119ab7303d26b904fa602bccb2bd7adeb7883459836a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWispCreateCore (cognitive 40): main.runWispCreateCore has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, loops 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":"cmd/bd/wisp.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"db001fa503f92ac79232ae6d48b3daa24f4580eb2761958222a3950169bfd644"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.applyConfigDefaults (cognitive 40): dolt.applyConfigDefaults has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/store.go"},"region":{"startLine":1265}}}],"partialFingerprints":{"codehealthFindingId/v1":"68d61363583d43f0ffb8857e77ae34c8f7ac211c5d2380f13e76547963afeddf"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runGateCheckProxiedServer (cognitive 39): main.runGateCheckProxiedServer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 29, boolean chains 5, loops 5 (nesting depth added 10). Of this number, 18 points are the body\u0027s own statements and 21 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/bd/gate_proxied_server.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bb0c220f7ab8a441acf626cd6d36d58eb485fe21b4d93b9883821c4fff71e7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.updateAgentFile (cognitive 39): main.updateAgentFile has cognitive complexity 39 (threshold 15). Drivers by points: if/else 37, boolean chains 2 (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/bd/init_agent.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c49ef58a8588e4ad9b675dc34ee95bdde84a9111106ff4036c5bf1bb728301"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMoleculeReady (cognitive 39): main.runMoleculeReady has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26, loops 10, boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ready.go"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"f833fe52db1a313865d277bb2204c1347ee96b8f3af65b2124ec9373b3ab923d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runSetStateProxiedServer (cognitive 39): main.runSetStateProxiedServer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 38, loops 1 (nesting depth added 9). Most of this is not in the body itself: 10 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/state_proxied_server.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"118864574d0a9bb057a870dbb5f20a8483d27b9537ec93fded30d827999b179e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderSwarmStatus (cognitive 39): main.renderSwarmStatus has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21, loops 18 (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":"cmd/bd/swarm.go"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"3653a1f6477acbda24eae5e6bceb4073309d980e8fc4bfa65b502ce05b6c610f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findAbandonedWisps (cognitive 39): main.findAbandonedWisps has cognitive complexity 39 (threshold 15). Drivers by points: if/else 27, loops 11, 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":"cmd/bd/wisp.go"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"fedbc3d0143f6baa32cfc9224b2f8f8e2f0707e67c1fb713c89eff44cd9adfdb"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.spawnAndHandoff (cognitive 39): proxy.spawnAndHandoff has cognitive complexity 39 (threshold 15). Drivers by points: if/else 35, match/switch 2, boolean chains 1, loops 1 (nesting depth added 18). Of this number, 37 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"de01d67183346710b8df6fd0fa4580d3a12fe1a2f22dfdb4c3aea8ac80438c92"}},{"ruleId":"D2","level":"warning","message":{"text":"dependencySQLRepositoryImpl.Insert (cognitive 39): dependencySQLRepositoryImpl.Insert has cognitive complexity 39 (threshold 15). Drivers by points: if/else 36, 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":"internal/storage/domain/db/dependency.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc85592d158c81baf258c54f302bec237f5823c52408d45d61a36c7d5be6a9d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.DiffInTx (cognitive 39): issueops.DiffInTx has cognitive complexity 39 (threshold 15). Drivers by points: if/else 36, boolean chains 2, 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":"internal/storage/issueops/diff.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c6c8f37455f28e1d6982365a32610b0c5c6304b01a67a0fb785ab9ead97c340"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetMoleculeProgressInTx (cognitive 39): issueops.GetMoleculeProgressInTx has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24, loops 11, match/switch 3, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/molecule.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d834ae7688f25289210db0e7088fb41927f71be413bd0e35865aa3fec6ca5e"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.searchInTx (cognitive 39): issueops.searchInTx has cognitive complexity 39 (threshold 15). Drivers by points: if/else 29, loops 6, boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/search.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"daae6263381c1f7f5e4c9a97d21eecb3d52559d48cf87c1f9adced3330e33fae"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.dependencyCycleNodes (cognitive 38): doctor.dependencyCycleNodes has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30, loops 6, boolean chains 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":"cmd/bd/doctor/integrity.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d3025f14b3ba60af9cdba05bef4c11a2e1165c9231c9324c73850d6917d67e"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.doRequest (cognitive 38): Client.doRequest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, match/switch 3, 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":"internal/gitlab/client.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1074dc97b5388203de2515330f068cdd1d66c4f265569e7e362caf73f658fe7"}},{"ruleId":"D2","level":"warning","message":{"text":"proxyServer.ListenAndServe (cognitive 38): proxyServer.ListenAndServe has cognitive complexity 38 (threshold 15). Drivers by points: if/else 31, boolean chains 3, match/switch 3, loops 1 (nesting depth added 8). Of this number, 27 points are the body\u0027s own statements and 11 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dbproxy/proxy/server.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"14d3955e460038d135a3cfa78e7b39749df781375ac7f9a6bc19647a04f4d52c"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.MoveIssuePersistenceInTx (cognitive 38): issueops.MoveIssuePersistenceInTx has cognitive complexity 38 (threshold 15). Drivers by points: if/else 29, loops 5, boolean chains 4 (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":"internal/storage/issueops/persistence.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7feef9adc981a786e3348d848f7018824be31c6b04f70cf42104b2feaf58574"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.getChildrenOfDeferredParentsInTx (cognitive 38): issueops.getChildrenOfDeferredParentsInTx has cognitive complexity 38 (threshold 15). Drivers by points: if/else 28, loops 7, 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":"internal/storage/issueops/ready_work.go"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5aa448b28a281a70eff1ab679a3e572089454fe8b7b1bbc1ebfe160c35d4b6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parseCountFilter (cognitive 37): main.parseCountFilter has cognitive complexity 37 (threshold 15). Drivers by points: if/else 36, boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/count.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a35bc3d5dbc806b34ca913d0a9cba31ddc4a560fda8624e17c76b2a757dcd5"}},{"ruleId":"D2","level":"warning","message":{"text":"main.applyFixList (cognitive 37): main.applyFixList has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28, loops 4, boolean chains 3, 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":"cmd/bd/doctor_fix.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc24e19f384f475b91a0a1d4c2f4f9730b8173b788489e5c0a75a081143f192"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runReadyProxiedExplain (cognitive 37): main.runReadyProxiedExplain has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20, loops 17 (nesting depth added 10). 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/bd/ready_proxied_server.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c7d64238104a3c7413f78b96cd044f28f5faa16df06fad088b3a78ee4be029"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runReadyProxiedMolecule (cognitive 37): main.runReadyProxiedMolecule has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24, loops 10, boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ready_proxied_server.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b260b141d7ff6697fb0f61fd7d9b85fdb7b546a356a642920f84c0ef4600a87"}},{"ruleId":"D2","level":"warning","message":{"text":"main.getSwarmStatus (cognitive 37): main.getSwarmStatus has cognitive complexity 37 (threshold 15). Drivers by points: if/else 25, loops 8, boolean chains 2, match/switch 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":"cmd/bd/swarm.go"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4c0adcd1e4fa201c568ef41577bfeb5880541c60146515be0360b0e4c8e98b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runUnclaimProxiedServer (cognitive 37): main.runUnclaimProxiedServer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 33, loops 4 (nesting depth added 15). Of this number, 16 points are the body\u0027s own statements and 21 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/bd/unclaim_proxied_server.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"09cbc59e91a8c8ebdf82d42d3f9e4f67579b38a6d042bafd514b4ea03c50cbf4"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.StaleLockFiles (cognitive 37): fix.StaleLockFiles has cognitive complexity 37 (threshold 15). Drivers by points: if/else 35, loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/locks.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b75b8d72d3bc44d309b760e4a179c26c29d2f0d6904339219d99c7fe430ef9"}},{"ruleId":"D2","level":"warning","message":{"text":"doltserver.ResolvePhysicalRoots (cognitive 37): doltserver.ResolvePhysicalRoots has cognitive complexity 37 (threshold 15). Drivers by points: if/else 32, boolean chains 4, match/switch 1 (nesting depth added 15). Of this number, 36 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":"internal/doltserver/physical_root.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d48ae83866a81671d14b2a2a5ce927ad3a5645a8bdd586a3210338f3cfa6c9"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.IsBlockedInTx (cognitive 37): issueops.IsBlockedInTx has cognitive complexity 37 (threshold 15). Drivers by points: if/else 27, loops 6, boolean chains 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"5deb4ee07041f202b1b91745856cb61c53708bb852bfe25e6b30e37a8e820bf3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.showDoltConfig (cognitive 36): main.showDoltConfig has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, 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":"cmd/bd/dolt.go"},"region":{"startLine":1904}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d68aa0698055b0006a546b7efd301e7190e7b22862a381306379949adff5852"}},{"ruleId":"D2","level":"warning","message":{"text":"main.uninstallHooks (cognitive 36): main.uninstallHooks has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, boolean chains 2, 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":"cmd/bd/hooks.go"},"region":{"startLine":1288}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb4c5185aee14725f8abb10d46f36b9cf2478fe3e60218060c0f89e555850f69"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runPurgeOrPruneProxied (cognitive 36): main.runPurgeOrPruneProxied has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26, loops 7, boolean chains 2, match/switch 1 (nesting depth added 12). Most of this is not in the body itself: 5 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 53). 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/bd/purge_proxied_server.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"835fe30699c8b3181bafabbd21075509098bbf93012d853836db452561894b2f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.extractAllDirectives (cognitive 36): main.extractAllDirectives has cognitive complexity 36 (threshold 15). Drivers by points: if/else 32, 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":"cmd/bd/rules.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"5972bf6f203f8a8906c5a2c0fa6f23c552c48196d7f71b22d416ddb91908cd82"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckMigrationCompletion (cognitive 36): doctor.CheckMigrationCompletion has cognitive complexity 36 (threshold 15). Drivers by points: if/else 36 (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/bd/doctor/migration_validation.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f0006e4719ec7284f05af656f537e4341263e9e8106a663da07596a4f6304f0"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.CheckPrecommitBdIntegration (cognitive 36): fix.CheckPrecommitBdIntegration has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, loops 8 (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/bd/doctor/fix/hooks.go"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"b34ec4292791d0c31953c9528b356943514457eb5a0b57d9391758b6093ce9af"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.DatabaseVersionWithBdVersion (cognitive 36): fix.DatabaseVersionWithBdVersion has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, 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":"cmd/bd/doctor/fix/migrate.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a20a5d755a1c1647168b34bfc239c201d91d76d59c9735c85f6e55a025394b"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.FindAllDatabases (cognitive 36): beads.FindAllDatabases has cognitive complexity 36 (threshold 15). Drivers by points: if/else 31, boolean chains 4, 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":"internal/beads/beads.go"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"68cb5d64652292f7850028b72ba2d47c9b3447fa6fe871fa35d2e347270bb9d0"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.rewriteTextReferences (cognitive 36): issueUseCaseImpl.rewriteTextReferences has cognitive complexity 36 (threshold 15). Drivers by points: if/else 30, boolean chains 3, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/issue_delete.go"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b099a31505db0b4114897f570814dcebafb687d6ce361e59e1d582631cf9771"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.SearchIssuesWithCountsInTx (cognitive 36): issueops.SearchIssuesWithCountsInTx has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, boolean chains 5, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/search_counts.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb0ff3e0838e516854e95a1334572ddb651171a2f5490d26b264cb7d41a927c4"}},{"ruleId":"D2","level":"warning","message":{"text":"doltSQLProvider.initSchema (cognitive 36): doltSQLProvider.initSchema has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, match/switch 2 (nesting depth added 16). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 216, 167). 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":"internal/storage/uow/dolt_sql_provider.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3cb4c6954dd0f9dbceaa800b93531779ee891088ddecfb87e9c414e766087b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runBatchOp (cognitive 35): main.runBatchOp has cognitive complexity 35 (threshold 15). Drivers by points: if/else 34, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/batch.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ee57023b9d19d4d5a6f6a1cc0bc1ed19af6092282222fb67d69fb6d51ef8d9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.formatIssueLongExtras (cognitive 35): main.formatIssueLongExtras has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, 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":"cmd/bd/show_format.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e1f6f086b192da079e323dfe1e19a0a58b6c4abad21a76ee75b8d580178f8f"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.tokenize (cognitive 35): formula.tokenize has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19, loops 8, boolean chains 6, match/switch 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/formula/range.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f0a62e293225d7667848dd0a167700a575f505c5ecc4cc4dc0c7e7fe246f71"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.executeOnce (cognitive 35): Client.executeOnce has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27, loops 4, match/switch 3, 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":"internal/linear/client.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"dadcfb899a10acde6af74116cbcf46c6290bb607af427713b44553412e2b7ad7"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.GetMoleculeProgress (cognitive 35): DoltStore.GetMoleculeProgress has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23, loops 8, match/switch 3, 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":"internal/storage/dolt/queries.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"a274610f94bb0f85a882636443557fa7a81caa2181b3f3ebb6939e233490074f"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.queryBlocksInfo (cognitive 35): issueops.queryBlocksInfo has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, loops 8, 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"6afc78522ae159cac33aadaaf3794d86b61901c17b3128d39fd3138c25579042"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCompactProxiedServer (cognitive 34): main.runCompactProxiedServer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, loops 3 (nesting depth added 6). 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: 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/bd/compact_proxied_server.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df92e4ff40454563b72895e2030d2540bf9e265934ddcbafd606a33114f059d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runPollutionCheck (cognitive 34): main.runPollutionCheck has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20, loops 14 (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/bd/doctor_pollution.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"df81954b11e3b273477def196b54f280c8c41dd02be6b36af7e047412335853a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.maybeAutoPush (cognitive 34): main.maybeAutoPush has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, boolean chains 5 (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/bd/dolt_autopush.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"a34ce10cf3f8636b7c3cbf4e0fd0719bf55fb475c4a37bd5fd67cf460c02b8fe"}},{"ruleId":"D2","level":"warning","message":{"text":"main.autoConfigureForkContributor (cognitive 34): main.autoConfigureForkContributor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, 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":"cmd/bd/init_contributor.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f69cd01388a5e6803f6fe3b30dfd446eab15591b6cace9884b4c68adaa0e33"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMolCurrentProxiedServer (cognitive 34): main.runMolCurrentProxiedServer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, boolean chains 3, 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":"cmd/bd/mol_proxied_server.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ba36441432be20a9f6f0b08b49af101cd274860510666246bc62c6b647eb71"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runReadyExplain (cognitive 34): main.runReadyExplain has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19, loops 15 (nesting depth added 10). 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/bd/ready.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"30be786c1bb06a84fcf25e74949cd578f020ff9f31474974af5b444c1a85fba9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.analyzeEpicForSwarm (cognitive 34): main.analyzeEpicForSwarm has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, loops 5, boolean chains 2 (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/bd/swarm.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a1f7f3e4a51f92389d466299d25f5b0edfcaffe79898ebbe1b532ab134eef4"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.reconcileAuthoritativeServerMetadata (cognitive 34): fix.reconcileAuthoritativeServerMetadata has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, loops 6, boolean chains 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":"cmd/bd/doctor/fix/metadata.go"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"a963266a2264f16bfe49c8262b3eeec89b549a77381f5403df70cef4d3940af1"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.expandLoopWithVars (cognitive 34): formula.expandLoopWithVars has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, loops 4 (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":"internal/formula/controlflow.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"062c76027a5a78d437c19463795606b1eb15765b6314b9e840785d39778b226d"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.findParentEpicMilestone (cognitive 34): Tracker.findParentEpicMilestone has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, loops 3, 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":"internal/gitlab/tracker.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"7551928a38b4384f719075bae073753c0ba0c78d8647ae0cd1a90f09c6f7bb8e"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.ReconcileParents (cognitive 34): Tracker.ReconcileParents has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, boolean chains 2, loops 1 (nesting depth added 15). Of this number, 32 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linear/parent_reconcile.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c61f573782a830cb144ee5028e37759d2a6c135c3136f4b779ff73dc84fd7b"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.DetectCyclesInTx (cognitive 34): issueops.DetectCyclesInTx has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25, loops 9 (nesting depth added 21). Most of this is not in the body itself: 4 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 28). 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":"internal/storage/issueops/cycles.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"eacf62b87d7705fc4aec832f9fe71b8ca92632eeb95c44888d66783852f7e79f"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.resolveIssuesFieldMerge (cognitive 34): versioncontrolops.resolveIssuesFieldMerge has cognitive complexity 34 (threshold 15). Drivers by points: if/else 28, loops 4, 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":"internal/storage/versioncontrolops/automerge.go"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"73188fa9b990e2dc5f1cdc0d3e9028c9d1d25512599b1f91f1f5ccf2455693c1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCreateProxiedMarkdown (cognitive 33): main.runCreateProxiedMarkdown has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, loops 6, boolean chains 2 (nesting depth added 10). Of this number, 22 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":"cmd/bd/create_proxied_server.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"04579a4e954994e02fbd5bdb23b48d472824409e940f701da2978889ff6a7417"}},{"ruleId":"D2","level":"warning","message":{"text":"main.outputDuplicates (cognitive 33): main.outputDuplicates has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23, loops 8, 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":"cmd/bd/duplicates.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"06d7a91725fe68d9ac3af6d6cad26917343e96b8b5ac6dece872d4e00a2220e8"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMigrateToProxiedServer (cognitive 33): main.runMigrateToProxiedServer has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate_dolt_mode.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b1656e35c411e6838f73d815cc2c3a07eff15284493270f15bfb7ff75c6d3b2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.loadDescendants (cognitive 33): main.loadDescendants has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, loops 5, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/template.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"df9138e918da54fce8dd35ce59f289a647c7ce281a762193da755e958dae29db"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.Permissions (cognitive 33): fix.Permissions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 32, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/permissions.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"36b9223c10f89b5e06b69890927d65c95ab31728f5d6aab2c1542af172af67ab"}},{"ruleId":"D2","level":"warning","message":{"text":"uowExportSource.LoadExportRelations (cognitive 33): uowExportSource.LoadExportRelations has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, loops 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/export_source.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"f406a4f9b32c2737a215cac8fccb0991a9088d55039db406658898efc5b9a185"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.openServerConnection (cognitive 33): dolt.openServerConnection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, boolean chains 4, match/switch 2 (nesting depth added 10). Of this number, 29 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":"internal/storage/dolt/store.go"},"region":{"startLine":2177}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd4795d96b9f864716a66ed0d029cb9ca8742bcca0e78f3701eec787f143c5b"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.verifiedReadyClaim (cognitive 33): DoltStore.verifiedReadyClaim has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, boolean chains 6, 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":"internal/storage/dolt/issues.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fdee6954c308be80b978a0f253a858aa7d96cd296814c5c2b38c00fe7f183bb"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCompactDolt (cognitive 32): main.runCompactDolt has cognitive complexity 32 (threshold 15). Drivers by points: if/else 31, 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":"cmd/bd/compact.go"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f26c3306ca9c23aeb2f3793624bc67a1e1e74129bceeeba6006048239f89991"}},{"ruleId":"D2","level":"warning","message":{"text":"main.CreateIssueFromFormValues (cognitive 32): main.CreateIssueFromFormValues has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, boolean chains 2, 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/bd/create_form.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"12fc4915da04743c24d4df94b2da05486a6c5e4f8060432c92cddbcb4631761d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.labelMutateProxied (cognitive 32): main.labelMutateProxied has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17, loops 11, match/switch 3, boolean chains 1 (nesting depth added 13). Of this number, 18 points are the body\u0027s own statements and 14 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/bd/label_proxied_server.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f1fa94d83e29f7d8e2e51d7a1c449d965c6134f16d56f781ab6ad52b97c16c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildLinearPullHooksForStore (cognitive 32): main.buildLinearPullHooksForStore has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24, boolean chains 5, loops 3 (nesting depth added 14). Of this number, 20 points are the body\u0027s own statements and 12 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/bd/linear.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"6707525fc31513206c12af02f251684b7ff3203fd9f821bddc6f2a6d03fe3e7f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildIssueTreeWithDeps (cognitive 32): main.buildIssueTreeWithDeps has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22, loops 9, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/list_tree.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fd0adfcf37f65b33cffe90305fc03bcea32421920bc83c4a9ac4bedc5db7170"}},{"ruleId":"D2","level":"warning","message":{"text":"main.performReset (cognitive 32): main.performReset has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, loops 3, 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":"cmd/bd/reset.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"19dbc1d1b19a81ad0e1cdd520f9ec5c4dad172a1cdb4ccf57ca6b33f038b448f"}},{"ruleId":"D2","level":"warning","message":{"text":"worktreeRemovalPlan.observeRevalidation (cognitive 32): worktreeRemovalPlan.observeRevalidation has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, boolean chains 5 (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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"66b086c4ca58f33b0577ea25e6045a8d1844a388b64095c627b8824c735af34b"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.applyResolvedConfig (cognitive 32): dolt.applyResolvedConfig has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/open.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae0a836df66a7f1293cf17a92a66c4d0874188aaf473eed762c56e28e5a7461"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.deleteMany (cognitive 32): issueUseCaseImpl.deleteMany has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/issue_delete.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"95c080a3a067a0b4f0972eac98ee850c6dc4d55868021f5afd242275d287479f"}},{"ruleId":"D2","level":"warning","message":{"text":"sqlbuild.BuildReadyWorkWhere (cognitive 32): sqlbuild.BuildReadyWorkWhere has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, loops 10, match/switch 1 (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":"internal/storage/sqlbuild/ready.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"de00f2abcb76694fb7d534345f1f3c1565fccd29b72102da0544ddaad28f54f2"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.dependencyIssueResolver (cognitive 32): Engine.dependencyIssueResolver has cognitive complexity 32 (threshold 15). Drivers by points: if/else 30, boolean chains 1, loops 1 (nesting depth added 14). Of this number, 19 points are the body\u0027s own statements and 13 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":"internal/tracker/engine.go"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba397717c63aaab2a1ad21439ba2c097249c193d9e9aabbafb45dbe7d0d73d3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.outputCookDryRun (cognitive 31): main.outputCookDryRun has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, loops 6, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/cook.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef07511512d8d9213954fee0e49354e5cc8fbb6e32530a990b65ab0da10dc5fc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.issueRecordsInJSONL (cognitive 31): main.issueRecordsInJSONL has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, 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":"cmd/bd/export_auto.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6863a8f0e84923aa9fa6ec67d7bf51ff15f3894d70a0fd0c29ec10f670da39c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.convertAllFormulas (cognitive 31): main.convertAllFormulas has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/formula.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b70993c232c480b108f0b7b0395a7d6040da93a7feba9d5f95a167e7127606"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runGitLabSync (cognitive 31): main.runGitLabSync has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, boolean chains 3, match/switch 1 (nesting depth added 4). 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, 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/bd/gitlab.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"500e96e49c958bf409fd9fe7af038df5d9fcede823f534e363e992f98a478068"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderGraphVisual (cognitive 31): main.renderGraphVisual has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, loops 7, 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":"cmd/bd/graph_visual.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3af6c5def41fad2c47567ef54d48a83cbda918367978e8f6331d0b7a8ad2cc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.orderSiblingsByDeps (cognitive 31): main.orderSiblingsByDeps has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18, loops 10, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/list_tree_deps.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"445714f93bb39fcebe877b8337f2020fafebfaf4e9c332faaa874541f190b6fd"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runShowProxiedThread (cognitive 31): main.runShowProxiedThread has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19, loops 10, 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":"cmd/bd/show_proxied_server.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccda23f6d73cfc29e77e37f7b6c34a43b8ee6942d8ee6a1e6642a1234a7bf270"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveBeadsDirForDBPath (cognitive 31): main.resolveBeadsDirForDBPath has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, boolean chains 7, loops 2 (nesting depth added 7). Of this number, 24 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":"cmd/bd/store_reopen.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"409e04effa90bee01ab135fb6489b8277d8e1d5882ac7b262a84f85abbb31b58"}},{"ruleId":"D2","level":"warning","message":{"text":"main.autoMigrateOnVersionBump (cognitive 31): main.autoMigrateOnVersionBump has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, boolean chains 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/version_tracking.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"41197fc5644c47086018133fc04b62a48aab13f1a7e92d7376f747c4dac31402"}},{"ruleId":"D2","level":"warning","message":{"text":"doltserver.nomsDirLooksCorrupt (cognitive 31): doltserver.nomsDirLooksCorrupt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, boolean chains 3, 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":"internal/doltserver/manifest_recovery.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"da094b3dd441ff42fa428e47ab5cf1ed245cfe0db45a82ec06d055d3470247a0"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.validatePublicCreateDependencies (cognitive 31): issueops.validatePublicCreateDependencies has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, boolean chains 5, loops 2 (nesting depth added 11). Of this number, 29 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":"internal/storage/issueops/public_create.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcbe6975ff3498baa4c4beb6ed56d0a5c640cd2988d9a05c7d9547502f70c563"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildADOPullHooks (cognitive 30): main.buildADOPullHooks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, boolean chains 3 (nesting depth added 15). Most of this is not in the body itself: 9 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 901, 883). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ado.go"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ffc3d3bbf408b9c2a3a72f9744e3662edc35ec9a3e3039d17ebdcbccee7fb61"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runDeferProxiedServer (cognitive 30): main.runDeferProxiedServer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 4 (nesting depth added 12). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 43). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/defer_proxied_server.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"577bd2ed597d0c6267accd8c489a11f9139a346f910fd0d4a81eb59e9f30785c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.testDoltConnection (cognitive 30): main.testDoltConnection has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, boolean chains 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/bd/dolt.go"},"region":{"startLine":2167}}}],"partialFingerprints":{"codehealthFindingId/v1":"f561d703b9a06379a01568bb1e297d031bb8eff980153dadf714de2c86bd4908"}},{"ruleId":"D2","level":"warning","message":{"text":"main.maybeAutoExport (cognitive 30): main.maybeAutoExport has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 4 (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/bd/export_auto.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef902539a6445f88898348450f9e085487868dcba3eed805d0455f6a296d58d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.handleToSeparateBranch (cognitive 30): main.handleToSeparateBranch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 29, 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":"cmd/bd/migrate.go"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"14dc41bf6cd30ebd7348255f3aa39062d34606cffeb5e6b7f7ae51430549cc9d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.subgraphToFormula (cognitive 30): main.subgraphToFormula has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, loops 10, boolean chains 1 (nesting depth added 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 into named stages: move each independent step or branch into 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/bd/mol_distill.go"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f72747e3aa70224c2ce6dcc9c6e67b92b58d17263ab0fd8021a371b9a3d456"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findGateReadyMolecules (cognitive 30): main.findGateReadyMolecules has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, loops 10, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_ready_gated.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"77677db97010d74c2f8162c72e80ee591734868a47395fee4122ea9f743b132f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runChecks (cognitive 30): main.runChecks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 5, boolean chains 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/preflight.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfaf97b7f2df4a8c1ed75f2f77d25834530542fed1093ccf19ed9a7b560cac49"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckHooksQuick (cognitive 30): doctor.CheckHooksQuick has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 3, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/quick.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d067f8addef8e970bf88a4cbda77a890837fb29fac1361d9f0010d635337008"}},{"ruleId":"D2","level":"warning","message":{"text":"adoFieldMapper.IssueToBeads (cognitive 30): adoFieldMapper.IssueToBeads has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, boolean chains 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":"internal/ado/mapping.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"56034fab51c565b02e713a6c0e72726f601d62be77d5557c0b63b04ab8ce2d1c"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ResolveCustomConfigInTx (cognitive 30): issueops.ResolveCustomConfigInTx has cognitive complexity 30 (threshold 15). Drivers by points: if/else 29, 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":"internal/storage/issueops/config_helpers.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea035b5b4d6c14c505d1474357b285205c4044af568960d0f18096571f737443"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.FindAllDependentsInTx (cognitive 30): issueops.FindAllDependentsInTx has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 7, 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":"internal/storage/issueops/delete.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38e2caf5d43e939902a217d0d34c148586f205e1fe3bbe519fb8b2b8fdb33d0"}},{"ruleId":"D2","level":"warning","message":{"text":"schema.checkRemoteMigrateGate (cognitive 30): schema.checkRemoteMigrateGate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 2, match/switch 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":"internal/storage/schema/remote_migrate_gate.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"384dcda0dbe92abdfbb7ad7b4b1c5a96baef18e6b2832f290b4219b2baff4624"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunBatchCloserPerItemRefusalIsAResultAndSurvivorsCommit (cognitive 29): conformance.RunBatchCloserPerItemRefusalIsAResultAndSurvivorsCommit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, 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":"backend/conformance/batch_closer_contract.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04f2dcb04baa5d65e3bbe40a3365930096a3004c29ced8dff3b23ffbd632777"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCompactAnalyze (cognitive 29): main.runCompactAnalyze has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, loops 5, 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":"cmd/bd/compact.go"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"a811a9e32c33de1d24cbe3f84a995c2dede1060d29b68b4aaa4953916ebb2286"}},{"ruleId":"D2","level":"warning","message":{"text":"main.showConfigYAMLOverrides (cognitive 29): main.showConfigYAMLOverrides has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 7 (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/bd/config.go"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"4990e688fc18b00bf693aaa4c47d1ff3fad6a5d4b844d8a27fc69a7f214b6fdd"}},{"ruleId":"D2","level":"warning","message":{"text":"main.collectDependencies (cognitive 29): main.collectDependencies has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, 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":"cmd/bd/cook.go"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc385950b5f6947491a8ca350df70bc835bc71bb6f422160c77fa36853d467e4"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMigratePersonal (cognitive 29): main.runMigratePersonal has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, loops 5, boolean chains 1 (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into 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/bd/migrate_personal.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"49e80de35af50275a3dc415a87fabb15143b798dc449f00e6feb62aabc4f4e64"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runReadyProxiedList (cognitive 29): main.runReadyProxiedList has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, boolean chains 4, 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":"cmd/bd/ready_proxied_server.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"b33acf09c9015c47e6367a306804e18336c7899e3e9f7d2cce6a3411d2ab4e84"}},{"ruleId":"D2","level":"warning","message":{"text":"main.showMessageThread (cognitive 29): main.showMessageThread has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, loops 10, 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":"cmd/bd/show_thread.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cc07d1755f2ca0682dd1f3c9b849a7fa29dd29a60ee36e0d8cdab50351f7aa5"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.FixMissingMetadata (cognitive 29): fix.FixMissingMetadata has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/metadata.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"02cfb5f0bbbd91d7dd3678dacb460077d24ab22c60eaca26393c0aa0fcc04b56"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.installAgents (cognitive 29): setup.installAgents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 5 (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/bd/setup/agents.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca6fc78afaf564a6d3d7475e56cc703f3aa63f37af6a11736644b470e45b57f"}},{"ruleId":"D2","level":"warning","message":{"text":"Loader.LoadAll (cognitive 29): Loader.LoadAll has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/molecules/molecules.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a327d4acd07b16e553c94d3101040c1e34d782535e94f7f21dbbf23dccbbcc6"}},{"ruleId":"D2","level":"warning","message":{"text":"bootstrapUseCaseImpl.BootstrapProject (cognitive 29): bootstrapUseCaseImpl.BootstrapProject has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, 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":"internal/storage/domain/bootstrap.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"8121845cef43227ab759b746d773ad0d4d9feb6d8b88ca3d52601cc3b7bcdab2"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.queryBlockedByInfo (cognitive 29): issueops.queryBlockedByInfo has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, loops 7, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca4914400bfbff7ee928943cbf2efd9ec47be2f1eedf5e0c869a565ad2f0f3dc"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.loadStatusByIDInTx (cognitive 29): issueops.loadStatusByIDInTx has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 6, 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ebbf7c35314e067ff999b95852130abc82b991b7f15a29a86a633f4cbc6c5e"}},{"ruleId":"D2","level":"warning","message":{"text":"schema.runMigrations (cognitive 29): schema.runMigrations has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, 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":"internal/storage/schema/schema.go"},"region":{"startLine":1375}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5e1019cc5fb26dfedcf236964cd415b31ff38bcc4c4bec168f08f6f969c71d4"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunUnsupportedContract (cognitive 28): conformance.RunUnsupportedContract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, loops 6 (nesting depth added 14). Most of this is not in the body itself: 2 of the 28 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":"backend/conformance/conformance.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"4724f585a998bf6bcd9094b6ffc4eaf44c705a2798d6565f8fac232c1f1ac3d2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runDepTreeProxiedServer (cognitive 28): main.runDepTreeProxiedServer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, match/switch 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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/bd/dep_proxied_server.go"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01863a6cb29eb5280c5dbb6a957305f1f9ebc1552440480978a5263ff0351f8"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printAllChecks (cognitive 28): main.printAllChecks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15, match/switch 6, loops 5, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor.go"},"region":{"startLine":1243}}}],"partialFingerprints":{"codehealthFindingId/v1":"45324b17a25807be5e280f422de4c6776bf607d6304050e54b60b7f1b40b4f27"}},{"ruleId":"D2","level":"warning","message":{"text":"main.writeObsidianExport (cognitive 28): main.writeObsidianExport has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, loops 8 (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/bd/export_obsidian.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"277457b6c9421b52ea569a28abf7882688a087e1d406cae00185d749d4df3524"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runFormulaSchemaShow (cognitive 28): main.runFormulaSchemaShow has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 9, 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/bd/formula_schema.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb0a96bf5476059deb3d7696891442416b1a1a6e3eb2fc4a35350899f29f4cca"}},{"ruleId":"D2","level":"warning","message":{"text":"main.preservePreexistingHooks (cognitive 28): main.preservePreexistingHooks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, boolean chains 4, 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/bd/hooks.go"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"725238d9f24a0ad67094db8261e3b22612eb46476ad5b2fbe80772add7797203"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parseJSONLFile (cognitive 28): main.parseJSONLFile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/import_shared.go"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e3161011e840ac7774adb3819c42791513d76741e09dfdf1c7493612ad652b9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runTeamWizard (cognitive 28): main.runTeamWizard has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, 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":"cmd/bd/init_team.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"625489b069f49c803fd2df9a91df0ac77d0d13efa51ec0e13ac8cdbfc11768c3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.handleInspect (cognitive 28): main.handleInspect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 3 (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/bd/migrate.go"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b11ff4438d9abba3ad0daee232de20c58515beaf7e25d593ed08c336dc434d2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.showIssueRefs (cognitive 28): main.showIssueRefs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 8, boolean chains 1 (nesting depth added 13). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/show_refs.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"878438c1ffb654cd5f0c52e256f48903fe606a6c67560643602faa5f0e27a872"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runSwarmStatusProxiedServer (cognitive 28): main.runSwarmStatusProxiedServer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 4, loops 2 (nesting depth added 8). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 111, 101). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/swarm_proxied_server.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26df41ff2f1db0b9834596197c564192def6ff7cd43e215698672ee56c16c28"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runSyncLoop (cognitive 28): main.runSyncLoop has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/sync.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe10980d519612fc0d5d0322491c9d1550d0aae71f38b3db2bbee96ed6a4b46f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.prepareWorktreeRemoval (cognitive 28): main.prepareWorktreeRemoval has cognitive complexity 28 (threshold 15). Drivers by points: if/else 28 (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/bd/worktree_cmd.go"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bfe06eedede6fd9d06406e5f77ed72a023ee350addf6e9bd7ad60e8ebfe1ea6"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.commitWorkingSet (cognitive 28): DoltStore.commitWorkingSet 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":"internal/storage/dolt/store.go"},"region":{"startLine":2807}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c78d0bc1c2d839bb8f4ab50cd15b1403fb5e8bb17be6109ec0d0ec0f9f5d8d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.findExternalDependentsBatchedInTx (cognitive 28): issueops.findExternalDependentsBatchedInTx has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, loops 7, 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":"internal/storage/issueops/delete.go"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7498cbd4341efdb309830c683818b95d77d2b563f2e660dbaad0accd59ef120"}},{"ruleId":"D2","level":"warning","message":{"text":"schema.rekeyAuxRowTable (cognitive 28): schema.rekeyAuxRowTable has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17, loops 11 (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":"internal/storage/schema/aux_row_id_backfill.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9872718538191a36fc75db54ddbc0ce22b51c58aceb35484507c2fb0bdf40fe"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.fetchPrelinkedIssues (cognitive 28): Engine.fetchPrelinkedIssues has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, 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":"internal/tracker/engine.go"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"8110f0b2762db616f5f41cd2e6b4d6a3bc376301c3197d7bca4b284288470a58"}},{"ruleId":"D2","level":"warning","message":{"text":"main.validateBulkDepEdges (cognitive 27): main.validateBulkDepEdges has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, loops 6, 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":"cmd/bd/dep.go"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a2b49ab27323dbcf81a90fcb2c6b2713419315c3a03f72b8d8b643a32471a1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderDoltStopResult (cognitive 27): main.renderDoltStopResult has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, match/switch 4, boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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/bd/dolt.go"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"e76e117adec6493853d99bcae0b0757ec4cbeecbf532e03aa5dbb184b65673b4"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parseImportRecords (cognitive 27): main.parseImportRecords has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/import.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbd3ec96a4f45b51033d8e9c0b5656c5508c08a44889cdd8a7fb16c16becd36a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runJiraSync (cognitive 27): main.runJiraSync has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, loops 2, boolean chains 1 (nesting depth added 4). 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: 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/bd/jira.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea2354a9e8ec3d9486fe3ec5168fe22a2a093a23a7d1d9280752b951b776bd84"}},{"ruleId":"D2","level":"warning","message":{"text":"main.ensureLinearMilestoneEpic (cognitive 27): main.ensureLinearMilestoneEpic has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, 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/bd/linear.go"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"294817be9529ce63dced4b845f450c21eaebc5f66147c8b3bb261727b34ef7c6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.handleSchemaMigrate (cognitive 27): main.handleSchemaMigrate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 27 (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/bd/migrate.go"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce3195196b24ea4c1618e41fac112ac1068ee0a96821ad2fa880448e551dab18"}},{"ruleId":"D2","level":"warning","message":{"text":"main.repairPrefixes (cognitive 27): main.repairPrefixes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, loops 6 (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into 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/bd/rename_prefix.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"f255940d2ccb642cbc5c167c67d620776de1bb4506c265b36b1f33e73b5b14b7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveRegisteredWorktree (cognitive 27): main.resolveRegisteredWorktree has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, loops 7, boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/worktree_cmd.go"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"b748641e16bdc1fb6ab143518ed7bab13c9faf6ab4b57428e88b2ef9973257bc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.fingerprintWorktreeStatusPaths (cognitive 27): main.fingerprintWorktreeStatusPaths has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, boolean chains 3, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb2196520c248320210991986b8207016b09415cddd300d4a35ca458a17aa82a"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckGitHooks (cognitive 27): doctor.CheckGitHooks has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, 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":"cmd/bd/doctor/git.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"21bc89dffaa25c86d00cce80e12257a0b82ab84f644ca1c9c107aad6ea90386c"}},{"ruleId":"D2","level":"warning","message":{"text":"BootstrapMatcher.FindMatch (cognitive 27): BootstrapMatcher.FindMatch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ado/bootstrap.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fb2d6dcb8445e79e5f4979d5e39613216f5bbe12175d7113aa5deb5e041bab"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.findLocalBeadsDir (cognitive 27): beads.findLocalBeadsDir has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/beads/beads.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f033869b9aa95487c0df14571fa1c565d4a7f01f87b254e61aa24b368916b36"}},{"ruleId":"D2","level":"warning","message":{"text":"ExternalDoltConfig.Validate (cognitive 27): ExternalDoltConfig.Validate has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 8, match/switch 4 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/configfile/external_dolt_config.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bff1b616069c2f8ad848778b6aa40fd46439d7f01175de4f51bf94ae95278e1"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.applyInlineExpansionsRecursive (cognitive 27): formula.applyInlineExpansionsRecursive has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, 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":"internal/formula/expand.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a75a0744b35c551a8b934b0a59f083cc90901abd257d41088b5ba9d139b9e7f"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.getReadyWispsInTx (cognitive 27): issueops.getReadyWispsInTx has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, 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":"internal/storage/issueops/ready_work.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb01b10543d9e43e4af35728d78bc3ed5294abb28ef3f33d4b7290104dd93e2"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.reopenIssueInTx (cognitive 27): issueops.reopenIssueInTx has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"internal/storage/issueops/reopen.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f4ef2abd7ccccfd4e54e52e999dbfae19e1e3bf7ec2af77c20e0247b7db4aa1"}},{"ruleId":"D2","level":"warning","message":{"text":"Gate.Acquire (cognitive 27): Gate.Acquire has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 2, 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":"internal/workspacegate/gate.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"50922db426896f5fee7c9c816eba37cafb5250103e376dc2a79bc4b0b818f589"}},{"ruleId":"D2","level":"warning","message":{"text":"worktreeremove.Prepare (cognitive 27): worktreeremove.Prepare has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, boolean chains 7, 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":"internal/worktreeremove/policy.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"d456c1247c33294ebf54324f176204e28ca8640913d04f9824bed676afd0303b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCreateProxiedGraph (cognitive 26): main.runCreateProxiedGraph has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, loops 2 (nesting depth added 5). Of this number, 21 points are the body\u0027s own statements and 5 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, 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/bd/create_proxied_server.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"8856a2edadda4bc0554a866173d5b9338a6c7d950457e7ff50b960e7ab8dd2d7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.readBulkDepEdges (cognitive 26): main.readBulkDepEdges has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dep.go"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"765ddc564a7a040028cf75459d34b623243f30f276f8ecd95aa48c1a514ea5db"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runFormulaList (cognitive 26): main.runFormulaList has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, loops 9, boolean chains 1 (nesting depth added 11). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/formula.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"34660f9a8c90abf2ae5bcaef7d5a39d29150bce68ea0a9de317737cd89bb0d89"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderGraphAllSubgraphs (cognitive 26): main.renderGraphAllSubgraphs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, loops 5, 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/bd/graph.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"35980b02e369996f0d29f689a868b304933b2bea42af38abb92f659b12ef3cee"}},{"ruleId":"D2","level":"warning","message":{"text":"main.fixHuskyHookLayout (cognitive 26): main.fixHuskyHookLayout has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, 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":"cmd/bd/hooks.go"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"e75c99b0b4e3bc05db43abfe2285d4a5052423d50dda9f62d2b0b8412b65a924"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runImportRecordsClassic (cognitive 26): main.runImportRecordsClassic has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, boolean chains 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/bd/import.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb267d20fdbd7fb371823a88afb2fe1d8946969d51b275899600fe65af62153"}},{"ruleId":"D2","level":"warning","message":{"text":"main.classifyImportIssuesExistence (cognitive 26): main.classifyImportIssuesExistence has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 4, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/import_shared.go"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"d47fd29841f86ca1ad631c4ed89636df63fbcea76fc73e6648df263c9a7e2536"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runLabelListAllProxiedServer (cognitive 26): main.runLabelListAllProxiedServer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 9 (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":"cmd/bd/label_proxied_server.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"d841282ac8caab499e5deded059babdd39a0871420888fc0aafebf76d57ad6f1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runLinearStatus (cognitive 26): main.runLinearStatus has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, boolean chains 4, loops 1 (nesting depth added 3). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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/bd/linear.go"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"217d5ebc3c0a927423fe1773128e784fcb6d6fcc1b1646455fbebfc2af51b15b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.createIssuesFromMarkdown (cognitive 26): main.createIssuesFromMarkdown has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, loops 5 (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/bd/markdown.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"52375e03417f959394219388d6d848ebfb9d5952de46278521e9813f395d1b45"}},{"ruleId":"D2","level":"warning","message":{"text":"main.distillSubgraph (cognitive 26): main.distillSubgraph has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_distill.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67b61a3cfab54056156b9be02e4ded18a131362a0ddbcf35e1555269fb0779b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.showIssueChildren (cognitive 26): main.showIssueChildren has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 5, boolean chains 1 (nesting depth added 10). Of this number, 21 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":"cmd/bd/show_children.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5d95c70316f666f1b75e09bf127f202467d6d72639c028941d8a3c878b5033"}},{"ruleId":"D2","level":"warning","message":{"text":"main.hasBeadsPrimeHooks (cognitive 26): main.hasBeadsPrimeHooks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 6, 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/bd/tips.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f99331a7507643bc1b8a8b8f4a1eb51fb52bf97b0e19ecdfcd4f70433dfe529"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckFreshClone (cognitive 26): doctor.CheckFreshClone has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, boolean chains 3, loops 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":"cmd/bd/doctor/legacy.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"f79da59874e221445562ac314e4ee7923621368ca1e20ad8fdbb9c7ea1430242"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.repairDependencyKeys (cognitive 26): fix.repairDependencyKeys has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, loops 7, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/dep_keys.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad8f59042b7afaf64bffceac408c4feb2876a96fadf99e15fabd889e414b6f4"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.propagateTargetDeps (cognitive 26): formula.propagateTargetDeps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, 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":"internal/formula/expand.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"a54b931dfcff347651b0e4a10c5cbc9f0ddac6c773612054ba1fa479f5f570c2"}},{"ruleId":"D2","level":"warning","message":{"text":"git.GetGitHooksDir (cognitive 26): git.GetGitHooksDir has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, 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":"internal/git/gitdir.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"6827d760e6e2585e4f4d6748ab24c7916c4ecb0e8330875caa33751d6c5a1241"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.PushEpicMilestones (cognitive 26): Tracker.PushEpicMilestones has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, boolean chains 3, 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":"internal/gitlab/links.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cca733206f7c830401635c76b592403277a45b83726e3d16933cb0b66d7c2fa"}},{"ruleId":"D2","level":"warning","message":{"text":"linear.ResolveStateIDForBeadsStatus (cognitive 26): linear.ResolveStateIDForBeadsStatus has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14, loops 8, 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":"internal/linear/mapping.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"f242c3da68da0e5d04844d92b67bc000b715cfc4f37c59bac38bc374d94f66a8"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.buildBatchCommitMessage (cognitive 26): DoltStore.buildBatchCommitMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 4, match/switch 4, 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/storage/dolt/store.go"},"region":{"startLine":3063}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd2a3b6c567fe68b9f9401a1692c9b18a53ccf26f15286c7d44c478cda4216d"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.pushToRemote (cognitive 26): DoltStore.pushToRemote has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 3577, 3590). 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":"internal/storage/dolt/store.go"},"region":{"startLine":3529}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ea8f2c6d210915b5cddbf6316fc67614dac63446695920053499732b4e1f35"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.loadWaitersOnSpawnerIDsByColInTx (cognitive 26): issueops.loadWaitersOnSpawnerIDsByColInTx has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 6, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f8e33f797f34a758bd1a0627402c3a863f8b9387a524b77fc31ecc3dc0b735"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetCommentCountsInTx (cognitive 26): issueops.GetCommentCountsInTx has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 9 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/comments.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"c386d464db8432089f5bd69e1220939d611864d50f7b37966301513d791f4683"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ReclaimExpiredLeasesInTx (cognitive 26): issueops.ReclaimExpiredLeasesInTx has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, loops 2, 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":"internal/storage/issueops/lease.go"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"e99700c59646213982d6e4949349ec84afb8fa22633a5cd607c5c7ac351f6031"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.resolveOneConflictRow (cognitive 26): versioncontrolops.resolveOneConflictRow has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, boolean chains 4, 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":"internal/storage/versioncontrolops/conflicts.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e9e4f47403ca75fb8830d09dba50e69e20010ce734c59da86686f4f4cb7554"}},{"ruleId":"D2","level":"warning","message":{"text":"main.tokenizeBatchLine (cognitive 25): main.tokenizeBatchLine has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, 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":"cmd/bd/batch.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"8537dd732deb2b93f178b6860de6df07860fb8c535087bf60dba585d5ab23c0f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.loadAndResolveFormula (cognitive 25): main.loadAndResolveFormula has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/cook.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f99a00fca9ed3f983c8364406f78dcd4966a2985163b3ea5fb9e13110e53557"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runUndeferProxiedServer (cognitive 25): main.runUndeferProxiedServer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, loops 4 (nesting depth added 9). Of this number, 13 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":"cmd/bd/defer_proxied_server.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a4c22fa77de70624a264ed8f305d811bad0626e03107159e95b7a1cc14fbff8"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runEditProxiedServer (cognitive 25): main.runEditProxiedServer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 2, match/switch 2, boolean chains 1 (nesting depth added 4). 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: 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/bd/edit_proxied_server.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"183a378b426b6998c034fff431b11b30d915481342924c12e1f4e56e82482861"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderGraph (cognitive 25): main.renderGraph has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, loops 10 (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/bd/graph.go"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7313da380f50da49cae247fafbea5c3ddc9517b11d7fb2ddbb58d381382706b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.setupClaudeSettings (cognitive 25): main.setupClaudeSettings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 25 (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/bd/init_agent.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ac9783c46ad4510feb3635d293849fcb62e4bd5078efd4251bc5b528be03121"}},{"ruleId":"D2","level":"warning","message":{"text":"main.installGitHooks (cognitive 25): main.installGitHooks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 3, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init_git_hooks.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"32134644fe69c228216d2f5c98a5fefd9f072d44279e2930914af3898947c3ac"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runReopenProxiedServer (cognitive 25): main.runReopenProxiedServer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 1 (nesting depth added 8). Of this number, 19 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/reopen_proxied_server.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"41a51ae89a1583e4deba421b9905eb14aff8b558223a0e0825db71f7020009e3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.FindMergeCandidates (cognitive 25): main.FindMergeCandidates has cognitive complexity 25 (threshold 15). Drivers by points: loops 14, if/else 11 (nesting depth added 9). Of this number, 23 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/rules.go"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9aeb34a366dce8b9349100f583248d1a5940ae921da6611a2614ffd39184256"}},{"ruleId":"D2","level":"warning","message":{"text":"main.formatIssueMetadata (cognitive 25): main.formatIssueMetadata has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, boolean chains 5, match/switch 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":"cmd/bd/show_format.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98a250efc5561117d36115939b5206d81d22ab2bb75fd0dfe053740b6501d70"}},{"ruleId":"D2","level":"warning","message":{"text":"main.isClaudeSetupComplete (cognitive 25): main.isClaudeSetupComplete has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 4, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/tips.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd292878989520b944e3f152f51f0b1374a97aedfc5416b612e6c5b8a82a4400"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.hasBeadsHooks (cognitive 25): doctor.hasBeadsHooks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, loops 6, match/switch 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":"cmd/bd/doctor/claude.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"34bad82427e7d8ba4e1adfb21dd1254549ca961803f5fb4bb2ea1e1da539a93c"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckLegacyCLIRemotes (cognitive 25): doctor.CheckLegacyCLIRemotes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 4, 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/bd/doctor/federation.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff8206a19188ab70e26f9583732cd7efbd4af4bd36cf5231b12034563b54fe1"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckFederationRemotesAPI (cognitive 25): doctor.CheckFederationRemotesAPI has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, boolean chains 3, 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":"cmd/bd/doctor/federation.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e38a068b91ce3ec9e348b5be85bc25dc00f2877ade0c39ba733b9f96e199e797"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.RepoFingerprint (cognitive 25): fix.RepoFingerprint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, boolean chains 4, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/repo_fingerprint.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"18e453503534ea928aec98be0bd278e863e8ec3f1af52d838f55c92a010114e7"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.hasBeadsHooks (cognitive 25): setup.hasBeadsHooks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, loops 6, match/switch 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":"cmd/bd/setup/claude.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e9476eeac42382dfb7b37f70686ae47ac94761ac1930f18270671398c9e7bae"}},{"ruleId":"D2","level":"warning","message":{"text":"LinkResolver.PushLinks (cognitive 25): LinkResolver.PushLinks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 5 (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/ado/links.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"7645e632edb7e22ad405212508d27b871d8c596f910415bc20fbfcc306524cb1"}},{"ruleId":"D2","level":"warning","message":{"text":"config.CheckOverrides (cognitive 25): config.CheckOverrides has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, loops 3, match/switch 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":"internal/config/config.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44a954f914cfdb9a1c0b597ed11048d2d6bfc43ffdbacb0657dd70b1dd25bf4"}},{"ruleId":"D2","level":"warning","message":{"text":"config.GetReposFromYAML (cognitive 25): config.GetReposFromYAML has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, loops 4, match/switch 3, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/config/repos.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"b952a6679eeb3f9426cd53c43dcfbfb7e2a9cae9d104c265b838dce897f79919"}},{"ruleId":"D2","level":"warning","message":{"text":"reflectStructTag.lookup (cognitive 25): reflectStructTag.lookup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14, loops 7, boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/formula/schemagen/schemagen.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"96cf936a2a29d15b634b0852aece15ee849d058fe6cad3a958de5ee4c60d6a82"}},{"ruleId":"D2","level":"warning","message":{"text":"linear.LoadMappingConfig (cognitive 25): linear.LoadMappingConfig has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, 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":"internal/linear/mapping.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"ada881f569bcf1d00c1f8b1fd8456adea8c23bcef6add5bf0dfc7fa46e7dff93"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.ValidatePushStateMappings (cognitive 25): Tracker.ValidatePushStateMappings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 5, 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":"internal/linear/tracker.go"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"9735b84cc182e2766d46c3463d9912fdd3b7f8ada614eb590a4b504a0caa8cdf"}},{"ruleId":"D2","level":"warning","message":{"text":"storage.MergeSlotAcquireImpl (cognitive 25): storage.MergeSlotAcquireImpl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, loops 3, boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 94). 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":"internal/storage/merge_slot.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11d13cc074ba53755a72e20023605809add58eeb543dea389791c1703168048"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.cleanupOrphanBackend (cognitive 25): proxy.cleanupOrphanBackend has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"c50c061f4952bcbd037d5f88de1dea1c1558f369b26eac8c421bc6098e1d548a"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.getIssueHistory (cognitive 25): DoltStore.getIssueHistory has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/history.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"306570c7a1c083280deb20cfee7e1e5443a59cdd1e188ff610a751a04f93ab86"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ClaimIssueInTx (cognitive 25): issueops.ClaimIssueInTx has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, match/switch 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"internal/storage/issueops/claim.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57c72977de66931dbe0604bb72c40e55a6c6ea63f4e211720d68be8baa4887f"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.HistoryInTx (cognitive 25): issueops.HistoryInTx has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/history.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"e400c080d65d26a68df1b296f5af61d7d5de63756f7a70d9400e7e658560bd68"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.getParentedIDSetInTx (cognitive 25): issueops.getParentedIDSetInTx has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 6, 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":"internal/storage/issueops/ready_work.go"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"12cdeb39be6cf538a99da39303d3352a9a204b3e962c5caccdbe56e723555114"}},{"ruleId":"D2","level":"warning","message":{"text":"types.BuildReadyExplanation (cognitive 25): types.BuildReadyExplanation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, loops 11, 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":"internal/types/types.go"},"region":{"startLine":1581}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2036658787aa3adb09cf76d9f8cd00f879592b41e4565816a6ff3504a647d4a"}},{"ruleId":"D2","level":"warning","message":{"text":"Issue.ValidateWithCustom (cognitive 25): Issue.ValidateWithCustom has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/types/types.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aa0762d5f4143e01c33e7d7f46b623186dddce2277e7de3cff9065b1be51257"}},{"ruleId":"D2","level":"warning","message":{"text":"main.analyzeWithAI (cognitive 24): main.analyzeWithAI has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/find_duplicates.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb11b3670d286c22e684be954449b6b7ce81dc94c9c12626d4e2cb8374146567"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderProxiedListText (cognitive 24): main.renderProxiedListText has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, loops 7, boolean chains 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/bd/list_proxied_server.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"b47e1600257d65bb7ff458a31f804b1db80a093dc23f34726204578ba8ae0820"}},{"ruleId":"D2","level":"warning","message":{"text":"main.scrubArgsForTelemetry (cognitive 24): main.scrubArgsForTelemetry has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, 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":"cmd/bd/main.go"},"region":{"startLine":2145}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea3f464cf4b1770f344cea9245281e68db99f4389d81c173bb345c7fa924b9f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMolBond (cognitive 24): main.runMolBond has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 5, match/switch 1 (nesting depth added 4). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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/bd/mol_bond.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"837df679abd84a905a20266b8d7dc1b68a96061e00fa38351c2862962bce9219"}},{"ruleId":"D2","level":"warning","message":{"text":"main.burnWispMolecule (cognitive 24): main.burnWispMolecule has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, 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":"cmd/bd/mol_burn.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d878604b54673bfed0be9bd0a3429b90cffb075197008e6b3a273ebf126071e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.getMoleculeProgress (cognitive 24): main.getMoleculeProgress has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, loops 4, match/switch 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_current.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"774372a46c3519bff20b22d8c7ac65c8616e4ee7ffb1f857ed9a1efe1a796bd7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runShowProxiedDefault (cognitive 24): main.runShowProxiedDefault has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, boolean chains 1, loops 1 (nesting depth added 10). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into 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/bd/show_proxied_server.go"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"f47d885d61979f0eb9767836ae0c73eddd809b7ea465667607dec16f88c8b8f6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.cloneSubgraphInto (cognitive 24): main.cloneSubgraphInto has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/template.go"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"25bc778dc676a3276641f289fe02befa5fc0cb8fb243689b1f677ec9eda19b84"}},{"ruleId":"D2","level":"warning","message":{"text":"main.applyUpdateProxiedAttempt (cognitive 24): main.applyUpdateProxiedAttempt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, 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":"cmd/bd/update_proxied_server.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d992e3851fe1a40e3a1a992d9151fada81f5595955da388f0d6b75aac6ac7ea"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWispGC (cognitive 24): main.runWispGC has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 7, boolean chains 1 (nesting depth added 6). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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/bd/wisp.go"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f73edf6c9be8f1800f155a3c4478c5ead915e87c3d33b6e4309ef93c95a368"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWispPurgeClosed (cognitive 24): main.runWispPurgeClosed has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 4, loops 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/bd/wisp.go"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"1801dcc5d4da9ccdb268fe7212ce2ffadb7405015de36efd92a22a030814ebcc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWispPurgeClosedProxiedServer (cognitive 24): main.runWispPurgeClosedProxiedServer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 3, loops 2 (nesting depth added 5). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into 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/bd/wisp_proxied_server.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"c308f620161282a9c458977026255aa5f460e876d8a5ea7c1904accbb51f6aac"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWorktreeRemovalOrchestration (cognitive 24): main.runWorktreeRemovalOrchestration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (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/bd/worktree_remove_cmd.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"c79f29105dab088580faffa6474e78a4511cda74a089b68990f5622211d7fc9e"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.FindOrphanedIssues (cognitive 24): doctor.FindOrphanedIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 5 (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/bd/doctor/git.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a6429b43de523f606316664d42cc6bbda5d404f496754967185ed62f55edef5"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.CrossTableDuplicates (cognitive 24): fix.CrossTableDuplicates has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, 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":"cmd/bd/doctor/fix/validation.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"6237773117f508dfe1436a9fa0b2d2d2493a6300b06fe49d52716fb4b8fd242d"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.claudeSettingsUsesRemovedSyncCommand (cognitive 24): setup.claudeSettingsUsesRemovedSyncCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, loops 6 (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/bd/setup/claude.go"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c0d0afb712b38ac6145ecc18de380d24658a85afacf579297a132a6e1ded7ac"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.isPathInSafeBoundary (cognitive 24): beads.isPathInSafeBoundary has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, boolean chains 6, 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":"internal/beads/context.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b62e63cb575cc1d2d120567b3172a88bc665d1740d08f3560ac85e971f4be53"}},{"ruleId":"D2","level":"warning","message":{"text":"doltserver.FlushWorkingSet (cognitive 24): doltserver.FlushWorkingSet has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/doltserver/doltserver.go"},"region":{"startLine":1542}}}],"partialFingerprints":{"codehealthFindingId/v1":"5651ff6b2c52b3e0667118fbaf5d09c6974ba3dd5ce3838ec6caf8cfc9761f46"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.SearchIssues (cognitive 24): Client.SearchIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, match/switch 2, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/jira/client.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e0f040740b42606d035e2b37e214fa0857d18b2c3b08ab5660f69fa238a2e1"}},{"ruleId":"D2","level":"warning","message":{"text":"linear.GenerateIssueIDs (cognitive 24): linear.GenerateIssueIDs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 7, 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":"internal/linear/mapping.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3858f97deb172cc798c9d0a1a1e1a3980fd8ce722573c3d2f9f55e70c8a4266"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.Init (cognitive 24): Tracker.Init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 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":"internal/linear/tracker.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ca4b3a7d01660ee6ccec72d3ba2ef92fbc47bcd306fcca1bc5a35082ba7dfe1"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.BatchUpdateIssues (cognitive 24): Client.BatchUpdateIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, loops 7 (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":"internal/linear/client.go"},"region":{"startLine":1152}}}],"partialFingerprints":{"codehealthFindingId/v1":"207502973251baae93d1114caf061e384a3d517c5ffcaae7e700202225923d84"}},{"ruleId":"D2","level":"warning","message":{"text":"storage.dependencyHookEvents (cognitive 24): storage.dependencyHookEvents has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, 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":"internal/storage/hook_decorator.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5479750865393dc30a9a76bafee0907ee207c4990b489ea0a48eefeb0a01966"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.forkExecChild (cognitive 24): proxy.forkExecChild has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, boolean chains 1 (nesting depth added 4). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"34cb8760080b9a74d2aa50dc4ac00a667a5af767507605cd6754b1b3eac79951"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.validatePlannedBlockingPaths (cognitive 24): issueUseCaseImpl.validatePlannedBlockingPaths has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 3, 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":"internal/storage/domain/issue.go"},"region":{"startLine":1315}}}],"partialFingerprints":{"codehealthFindingId/v1":"b76f2e138c5e6af243326f84d03ebebdb61d73e6e467fd31b2241b09dd74db56"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.expandByParentChildDescendantsInTx (cognitive 24): issueops.expandByParentChildDescendantsInTx has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, 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":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"0574b7a9b999e4823f396dd83c45670898c81fac01eda74b3b9f1b80505c0b38"}},{"ruleId":"D2","level":"warning","message":{"text":"main.insertIssues (cognitive 24): main.insertIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 3, 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":"scripts/repro-dolt-prod-timeouts/main.go"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"241d3f18dccc8e597601eec9bfe3649b2e6acf86665203557c6c4705ce9338b9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.maybeAutoImportJSONL (cognitive 23): main.maybeAutoImportJSONL has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 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":"cmd/bd/auto_import_upgrade.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"a09d2d434af84f71dedbc6840fa47d827da5e1b4139eefa2a1d9b70b697c9315"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCompactSingle (cognitive 23): main.runCompactSingle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (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/bd/compact.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae9d71bbace256f41ff3a466d1926dbba57ffb495b7495ab89b8bef80ef851ad"}},{"ruleId":"D2","level":"warning","message":{"text":"main.collectSteps (cognitive 23): main.collectSteps has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, loops 8, 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":"cmd/bd/cook.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"63e5d63fc68e51a5f4b58fbb6ed207b63567ba8320e3d0929ba8bdc7e8dd7be5"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printFormulaSteps (cognitive 23): main.printFormulaSteps has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, boolean chains 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/bd/cook.go"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"2890e05bfeceb1b6ce021313dfcf23a3139c7d98ba5d34a64d292f242446d472"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runDepListProxiedServer (cognitive 23): main.runDepListProxiedServer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 2, match/switch 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dep_proxied_server.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"360a0a2c632b6318766c1eee92399cf5a3cf3066441c558f8302098fc263b3f5"}},{"ruleId":"D2","level":"warning","message":{"text":"main.matchGateToRun (cognitive 23): main.matchGateToRun has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, 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":"cmd/bd/gate_discover.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"7713b8d792827060c61a981e292c87590f707cd013842fb9bd6b7b73f72c3e8f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderGraphCompact (cognitive 23): main.renderGraphCompact has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 5, boolean chains 1 (nesting depth added 11). 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, split the body into named stages: move each independent step or branch into 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/bd/graph.go"},"region":{"startLine":1012}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f0d62ab8dd96302cb1aa8e0a0da6fd6c7f40c48b5c24d5d313be8967eff94c9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runImportRecordsProxied (cognitive 23): main.runImportRecordsProxied has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 5, boolean chains 2 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into 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/bd/import_proxied_server.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c021cc08d56fd00fb05765eb6aeeb36659518290e57219d11bd344a0aea724b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildLinearParentLinks (cognitive 23): main.buildLinearParentLinks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 4, 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/bd/linear.go"},"region":{"startLine":1373}}}],"partialFingerprints":{"codehealthFindingId/v1":"90043a2c669467e73a895198b242a4eaec1d7e00fe7637b9893418a4b4438547"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderPrimeMemories (cognitive 23): main.renderPrimeMemories has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, 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":"cmd/bd/prime.go"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4ade77f7be6a30da21701deb93fb745a8f9c4a62b0849137b501f6a6e761011"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.cleanCruftBeadsDirFiles (cognitive 23): fix.cleanCruftBeadsDirFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/artifacts.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60e247b18399d6d62d30a1e589b86946cbb0677f5fc4840fd92960df682b389"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.canonicalizeGitURL (cognitive 23): beads.canonicalizeGitURL has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, boolean chains 5 (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":"internal/beads/fingerprint.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fc8df5098766fd67aad9461144fca2cb0367057ced1fdab00a92c379f431e3"}},{"ruleId":"D2","level":"warning","message":{"text":"haikuClient.callWithRetry (cognitive 23): haikuClient.callWithRetry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, match/switch 3, 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":"internal/compact/haiku.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"e25fd604ccaadcfd3dab517abbf5677b4bb06392616000ac58c229ce011ed962"}},{"ruleId":"D2","level":"warning","message":{"text":"linear.IssueToBeads (cognitive 23): linear.IssueToBeads has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, 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":"internal/linear/mapping.go"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"3123feac8bc283e5720554d989d6242a621907e84cc914e5e289f23bc6d5f72d"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.executeBatchPush (cognitive 23): Tracker.executeBatchPush has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 5 (nesting depth added 8). 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, split the body into named stages: move each independent step or branch into 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/notion/tracker.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"245732f853248b18b02502e3013ea8b058d18503e0cc584c699bb7f896378585"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.Sync (cognitive 23): DoltStore.Sync has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/federation.go"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb2d7ca27f05fabd27fd6b3a46ee72e60a15ff611b2e82eb9fa25abaa21e1a7"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetMoleculeLastActivityInTx (cognitive 23): issueops.GetMoleculeLastActivityInTx has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, boolean chains 4, 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":"internal/storage/issueops/compaction.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2dd563a7cb9c5fdf143cd434679a7dfc29f4bac234bc0be89b12879a5abd165"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 23): main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, 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":"scripts/repro-dolt-hang/main.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b3005e800e1a91de1aa201ec6b7c555d9d686b8a0098eaa4d78860c6a673ec9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runDepListRecordsProxiedServer (cognitive 22): main.runDepListRecordsProxiedServer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, loops 8, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dep_proxied_server.go"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc43d7ef183d1ee330555b66d25fcfd3604499ca172cd8be0b125f2067940f1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.applyFixesInteractive (cognitive 22): main.applyFixesInteractive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, 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":"cmd/bd/doctor_fix.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"90952a4f6de5d575e98e4473dbe7428a78c5fd6fd22063f44ec90ce414bfc430"}},{"ruleId":"D2","level":"warning","message":{"text":"main.performMerge (cognitive 22): main.performMerge has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, 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":"cmd/bd/duplicates.go"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c99caed1cf79e87702beb13c35fed450e0e9ce8fef2741cb06741d086ea208b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.validateGraphApplyPlannedParentBlockingPaths (cognitive 22): main.validateGraphApplyPlannedParentBlockingPaths has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, 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":"cmd/bd/graph_apply.go"},"region":{"startLine":1144}}}],"partialFingerprints":{"codehealthFindingId/v1":"a664dfc28a1bbd971cb3266b18a3b05c192ef19b6791e539cf3c7a0527edfdbe"}},{"ruleId":"D2","level":"warning","message":{"text":"main.collectGutterEdges (cognitive 22): main.collectGutterEdges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, loops 4, 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/bd/graph_visual.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e30d2913c85f737b94f0e3a541085d67542bcfba6a9a6b118ebcfb079a03388"}},{"ruleId":"D2","level":"warning","message":{"text":"main.dagMergeRune (cognitive 22): main.dagMergeRune has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 9. 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/bd/graph_visual.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fb2687c1c1298e27bb380164301906b02e559fcd4ee976b9f08f31222d1456f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.expandMigrationSet (cognitive 22): main.expandMigrationSet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 5, match/switch 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate_issues.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0033f6a71fd37dd91e0bcdea6b71223096644df54ac921affc44b67cce0bb7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMolSquashProxiedServer (cognitive 22): main.runMolSquashProxiedServer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, boolean chains 1 (nesting depth added 7). Of this number, 18 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":"cmd/bd/mol_proxied_server.go"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa39a93ff75175a4d9bae69b7c67ba24343d921b8fb4cbda9db42b182712fbad"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.validateRepoPaths (cognitive 22): doctor.validateRepoPaths has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, 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":"cmd/bd/doctor/config_values.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16e12c8646589dd56ebdd98a610665ef84e2e21205cbc104ab37a5b9c2aa0fd"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckStaleLockFiles (cognitive 22): doctor.CheckStaleLockFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/locks.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c456d0b1b9472ab1c19fd7f4d76a45ef8ed9f2a0e596a291c5366b89eddcea"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.findUnknownTypesInHydratedIssues (cognitive 22): doctor.findUnknownTypesInHydratedIssues has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, loops 6, 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":"cmd/bd/doctor/multirepo.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a6ec833592e674203755f74f359b59dadff08dd8d876df49641ebb75610c1d2"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.ScanDependencyKeys (cognitive 22): fix.ScanDependencyKeys has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 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":"cmd/bd/doctor/fix/dep_keys.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"565e329f965d4b855c97c11c7a55beca315ffec31c863f6534fed9e3d3e211b6"}},{"ruleId":"D2","level":"warning","message":{"text":"config.SetReposInYAML (cognitive 22): config.SetReposInYAML has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/config/repos.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"4621f225c641568e7e590e0cc280831a39abae6506332b8f70ccfaa017662ea0"}},{"ruleId":"D2","level":"warning","message":{"text":"config.validateYamlConfigValue (cognitive 22): config.validateYamlConfigValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 3, match/switch 1 (nesting depth added 9). 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":"internal/config/yaml_config.go"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee50043b553cc2d6eae0c6f71065ae85c0b526d748c1fdb772da43cb45c5e6b"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.applyBranchesWithMap (cognitive 22): formula.applyBranchesWithMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 7, 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/formula/controlflow.go"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"c79702a03cc76c71baba6a2915dfefb3c5dba959f56ae3c8ea3c2f83ce0c9164"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.expandStep (cognitive 22): formula.expandStep has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, loops 10 (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":"internal/formula/expand.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"57d7320da9226debcbf3c440b8c0d0d7a5f003d95fe72498e337d5137aaa9685"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.BatchCreateIssues (cognitive 22): Client.BatchCreateIssues has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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":"internal/linear/client.go"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"65e60d14afe1fdb637b0c3d64ccf8b637ff970f6095629dbff3a9b5b957e2e58"}},{"ruleId":"D2","level":"warning","message":{"text":"remotecache.validateSchemeURL (cognitive 22): remotecache.validateSchemeURL has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 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":"internal/remotecache/url.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"8898213024b3839a2f4dcb02f7f654410b83e5e2659711eef0a3c62b5c7e4fd7"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.DeleteIssues (cognitive 22): DoltStore.DeleteIssues has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, loops 3, boolean chains 2 (nesting depth added 7). Of this number, 17 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":"internal/storage/dolt/issues.go"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"1564ee6fff10674e0f7e79afe9d20602d56c8e9bbb055cf41e4527971153357d"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.settleMergeInTx (cognitive 22): DoltStore.settleMergeInTx has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, 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":"internal/storage/dolt/store.go"},"region":{"startLine":3809}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ed15b213a484d0cfaa2a7293c0a43abdab3b2d3ddd77c18aff1ad30b886d9f"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.collectConnectedIssues (cognitive 22): issueUseCaseImpl.collectConnectedIssues has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, loops 9, boolean chains 3 (nesting depth added 6). Of this number, 11 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":"internal/storage/domain/issue_delete.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b5f3430a7e282afd2aac4ada70c2e2e3b1e7c79ec03b5cedc6d4d3f8e80250"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetChildrenWithParentsInTx (cognitive 22): issueops.GetChildrenWithParentsInTx has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 6, 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":"internal/storage/issueops/blocked.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c8b996c3a0c31d53037ee118789b42f9f2eb184c84dc963b96fbeb19f0a2e0"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetChildrenOfIssuesInTx (cognitive 22): issueops.GetChildrenOfIssuesInTx has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 6, 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":"internal/storage/issueops/blocked.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e696055cfd8646a1435cc190dc0d4ffa72a2eb90b7bd410abac23c4cac86036"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.BuildBatchCommitMessage (cognitive 22): issueops.BuildBatchCommitMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 4, match/switch 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":"internal/storage/issueops/commit_pending.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca3e1d46b1f35fdb170786d4a2aa086d54c22882601c58966436d630ee7c0395"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.PersistComments (cognitive 22): issueops.PersistComments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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":"internal/storage/issueops/create.go"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cb1ac12db9458fbcca5fcc17551199dbc3db53c7463ccf7ae7b9801558534d2"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.PromoteFromEphemeralInTx (cognitive 22): issueops.PromoteFromEphemeralInTx has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. 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":"internal/storage/issueops/promote.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"772e5a4c2addd7ae2c3e08a801f5295db41da80b2b5e920cf77dbfb2e077f0de"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.buildConflictRow (cognitive 22): versioncontrolops.buildConflictRow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, match/switch 9, 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":"internal/storage/versioncontrolops/conflicts.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c226b8548fdf34db9644abec2deda40fe911eb7e0f104fa55cbc8eef7b9d73f"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunLifecycleCloseIsIdempotentAndKeepsTheFirstClose (cognitive 21): conformance.RunLifecycleCloseIsIdempotentAndKeepsTheFirstClose has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 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":"backend/conformance/lifecycle_close_reopen_contract.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"60e58d776fd73c244c76485ad02fbb9282b5f1e99204559d2345de4c683f8e6f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.newBackupStatusCommand (cognitive 21): main.newBackupStatusCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 57). 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/bd/backup.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab05f376948ec9daf74ef35ace173f4a37884188324ce3c6371fd000518886f3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.maybeAutoBackup (cognitive 21): main.maybeAutoBackup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 5 (nesting depth added 2). 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":"cmd/bd/backup_auto.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b92bf6e3dca8262fd2a7295950f843040c1dd223c281907ecb7e7580bc120fc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parseUpdateKVs (cognitive 21): main.parseUpdateKVs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"cmd/bd/batch.go"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb90a6bfe3f0e58d6980e4ad49d2b78c7f5dd7173d0238b2e93680db5fcbaff"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCompactApply (cognitive 21): main.runCompactApply 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/bd/compact.go"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7a40064bcba2c0c40c292d21e96d51b16d61d2dc8220386a55ed1e4f5e24502"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMigrationValidation (cognitive 21): main.runMigrationValidation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 6, match/switch 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":"cmd/bd/doctor.go"},"region":{"startLine":1306}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad3257beb18efef804a306031ad8f05f0c7d5c41141334d7d5da84131f28227c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printServerHealthResult (cognitive 21): main.printServerHealthResult has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 6, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor_health.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d7e006be29c32030cab725cf843c5cc6665af08357b8120263550a631f4394"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveDoltShowRemotes (cognitive 21): main.resolveDoltShowRemotes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dolt.go"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a9d76446f6cbf3dfedb45b58130159acb3a5d6ba3cbe248edc374281856726"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runGateListProxiedServer (cognitive 21): main.runGateListProxiedServer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/gate_proxied_server.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"a009aa6dd045becd77df757c604bd342ec2cd43d5f90817bec0a7261ff7b235c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runGitHubSync (cognitive 21): main.runGitHubSync has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, match/switch 1 (nesting depth added 3). 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, 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/bd/github.go"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa5cf3106954bd2926d17eb4b6df70a5412fc03e61193447970df0530c87e96"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runImportInner (cognitive 21): main.runImportInner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 4 (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/bd/import.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"25529ed0bbf38404387ca2025d464abc097a6792ba4333c8ff54645c4e262c75"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runLabelPropagateProxiedServer (cognitive 21): main.runLabelPropagateProxiedServer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 4 (nesting depth added 4). Of this number, 11 points are the body\u0027s own statements and 10 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, 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/bd/label_proxied_server.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b8f6b8a355d1f4ebaf7c242a8eaff8dd3449782d5dac6132ec77aeec75ff71c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runListProxiedWatch (cognitive 21): main.runListProxiedWatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, match/switch 3, loops 1 (nesting depth added 8). Of this number, 12 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/bd/list_proxied_server.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc449929cce185eae2ffdb541061e3685c52c982d266c95fb1ae4350ea446e2e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.executeMigrateIssues (cognitive 21): main.executeMigrateIssues has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate_issues.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de8cb603875fcf91e3319e2251673d23415b2f30a29562139e43093182fe8dc"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runNotionSync (cognitive 21): main.runNotionSync has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 2. 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, 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/bd/notion.go"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8aaca784384b8efe3d0d4c892d02aa15025976da95d0eae4d6b8ad47656871b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runShip (cognitive 21): main.runShip has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 3, boolean chains 1 (nesting depth added 4). 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, 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/bd/ship.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"42f67c48b71b0f7466ed12101f434eee25853314d3d229b401dee32095580e42"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runShowProxiedRefs (cognitive 21): main.runShowProxiedRefs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 8 (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/bd/show_proxied_server.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"09141b973d6911d8b1580c37fead531bee12c98eff1ce47c278043764b6c25db"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveProtoIDOrTitle (cognitive 21): main.resolveProtoIDOrTitle 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":"cmd/bd/template.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"c461136925bfff8a74c9b6429d9b180911e0afd345f89cb472182707e2d26ffa"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkMoleculeIntegrity (cognitive 21): doctor.checkMoleculeIntegrity has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, 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":"cmd/bd/doctor/deep.go"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16fa0ce3425c1efe13c804c54f56d694554da5085678f2473b383d6235e4508"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.isKnownLegacyHookLine (cognitive 21): doctor.isKnownLegacyHookLine has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 2, 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/bd/doctor/hooks_migration.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"52bbceffe6783b7c86b982fa84f4b322e9c9bb3a58a7cdcd6d6ce89ce01b0a63"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.hasBdInCommands (cognitive 21): fix.hasBdInCommands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, 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":"cmd/bd/doctor/fix/hooks.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a8ab3144c25e41a6efa3e61292e888f87b1b501b7fe8212441f94fa3e33cbde"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.OrphanedDependencies (cognitive 21): fix.OrphanedDependencies has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 2, match/switch 2, 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/bd/doctor/fix/validation.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"751ddeabf9081536e5730f78802ec873b1adbd1b5c47e27209d4f06b69eaa9e0"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.ChildParentDependencies (cognitive 21): fix.ChildParentDependencies has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 2, match/switch 2, 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/bd/doctor/fix/validation.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"227f2abb961043976d755d8684e17e8ce98df63f89693e59e94ff56a07084ba3"}},{"ruleId":"D2","level":"warning","message":{"text":"schemagen.Render (cognitive 21): schemagen.Render has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 4, 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":"internal/formula/schemagen/schemagen.go"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"6778f7d90a6c0f36a87335d2eda30f35935632893d290017c17fdc1c89c2d614"}},{"ruleId":"D2","level":"warning","message":{"text":"LinkResolver.PushLinks (cognitive 21): LinkResolver.PushLinks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/gitlab/links.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7e145d8d37df2a65f37428f779b26dd092df875f74c66a7d63212083e3f80d"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.pushOne (cognitive 21): Tracker.pushOne has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, 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":"internal/notion/tracker.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce8ee282d244f4590db66613235715e78961a80ab937add937c62024844d83e"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.cleanStaleCircuitBreakerFilesIn (cognitive 21): dolt.cleanStaleCircuitBreakerFilesIn has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"internal/storage/dolt/circuit.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dacbf0d396ce0197772aaf4b69043637fbba04e7fcd6a4fc7f4dc6672132c5b"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.parseFieldSchema (cognitive 21): dolt.parseFieldSchema has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 6, 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":"internal/storage/dolt/metadata_schema.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"045e2b6ec096bfe4a8db26cd86ad7d821b29f240167bea2638d317d55e24e67d"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.verifiedClaimWrite (cognitive 21): DoltStore.verifiedClaimWrite has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 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":"internal/storage/dolt/claim_verify.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"908aca95457c726aaf8318decdc0193c0d1600f3bde32c4cffc3ac7db17aaae6"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.mintTopLevelID (cognitive 21): issueUseCaseImpl.mintTopLevelID has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"internal/storage/domain/issue.go"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"78db34d9f2c31a2e15ec838faae309516abce11c03212e34bb8cf6729585ffc0"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.loadBlockingDepsForIssueIDsInTx (cognitive 21): issueops.loadBlockingDepsForIssueIDsInTx has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 6, 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":"internal/storage/issueops/blocked.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f65453ac616dbc0d78926d144be332fd6aa812dd0625e1a46d2f1932b2baa4b"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.loadParentIDsForChildrenInTx (cognitive 21): issueops.loadParentIDsForChildrenInTx has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 6, 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":"internal/storage/issueops/blocked.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"c78c1d7b719b010ee8a68c8bdc38b41d79b1bd864c2fefbdd60d9a7727f526ff"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.loadBlockingDependersForIDsInTx (cognitive 21): issueops.loadBlockingDependersForIDsInTx has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 6 (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":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e22847fc13676b32108149f4ac729950ba3910ff1dcaab393ac8310b1c5bb66"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.CreateIssueInTxWithResult (cognitive 21): issueops.CreateIssueInTxWithResult has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (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":"internal/storage/issueops/create.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"f08a5b6044163c6a6bdfc2c5fc6a7c4a25fad826cd026b83b995aae345159842"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ParseFieldSchema (cognitive 21): issueops.ParseFieldSchema has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 6, 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":"internal/storage/issueops/helpers.go"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cfce5a76f4aa134cb364a6a389d48e6bb52763532b654288c35ba96a89cf843"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetReadyWorkWithCountsInTx (cognitive 21): issueops.GetReadyWorkWithCountsInTx has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/ready_work_counts.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"a529de91d2b98ded9ff0b62cd029c487cbcd05af96fba1f9bcdfedefc24545bd"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.resolveMetadataMergeOps (cognitive 21): issueops.resolveMetadataMergeOps has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/update.go"},"region":{"startLine":856}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef9a0b8cc33dec54949165dcd3a73db433f140da64bcd099a3d70c32faee37a"}},{"ruleId":"D2","level":"warning","message":{"text":"uow.updateSpec (cognitive 21): uow.updateSpec has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, 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":"internal/storage/uow/issue_operations.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b7c5ed28b54e2e649e05cf58413f87e7d3b6455e08e66ae8913c0c3bdec624"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.shouldPushIssue (cognitive 21): Engine.shouldPushIssue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 4, 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":"internal/tracker/engine.go"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"85af052c48c8dae6025aac55ccb2af65a8a06ade54bb34318e1e54857e9918d0"}},{"ruleId":"D2","level":"warning","message":{"text":"main.detectBootstrapAction (cognitive 20): main.detectBootstrapAction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/bootstrap.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"acbc4e348313bf7325b88661a614d1885ef931b2418551bb58805122d4997cf7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printFormulaStepsTree (cognitive 20): main.printFormulaStepsTree 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":"cmd/bd/formula.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f10515f8c26074443d3c11690d5094fae71cdcbfd298677808729f86bbe25d6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.getGitHubConfigValue (cognitive 20): main.getGitHubConfigValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/github.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b4ae57592a66a3fc15b58b42252dd60e38e880f9927de44d86dd1aecd24f6cf"}},{"ruleId":"D2","level":"warning","message":{"text":"main.getGitLabConfigValue (cognitive 20): main.getGitLabConfigValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/gitlab.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36fc6280904bb31cb27412a1f92cfd3db0fd4f1bc63626531b5d1b29762a98a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.removeBeadsProjectGitignoreSection (cognitive 20): main.removeBeadsProjectGitignoreSection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init_stealth.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bde2ab20402bc7b8124377f1c8a9386a2f6c358cf7cbcfbc7540df9eb0f9e41"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildLinearPushHooks (cognitive 20): main.buildLinearPushHooks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 5, loops 1 (nesting depth added 4). Most of this is not in the body itself: 0 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 789, 767, 781, \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":"cmd/bd/linear.go"},"region":{"startLine":749}}}],"partialFingerprints":{"codehealthFindingId/v1":"da0f87b791360693cc46085368a835786126f078c604ff9eb21b84919f6d07e7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.getLinearConfig (cognitive 20): main.getLinearConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/linear.go"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c08d91f5d77810b80f711274a08a962135deee0c3eac8e69a5a292f774c890c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.selectedNoDBBeadsDir (cognitive 20): main.selectedNoDBBeadsDir has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/main.go"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9849e26c487f4aea5d26c974a0999d849867bb364d297724701a71fb33acdb"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderMolBondDryRun (cognitive 20): main.renderMolBondDryRun has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_bond.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b4be3ddeae4ebe41d089228e849dbb035ee6a4db037c0b705178c010a9844c5"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runNotionStatus (cognitive 20): main.runNotionStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 3). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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/bd/notion.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b7550c2ea7db71f545f72dfee920cbbf9139f723bb9ff082febf043d703d92"}},{"ruleId":"D2","level":"warning","message":{"text":"main.withOuterStatementIsRead (cognitive 20): main.withOuterStatementIsRead has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 3, 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/bd/sql_proxied_server.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e45d3f09360eb03ad0f42ece9fbb19fafca095a5c6cd1714eda137ca02119d5"}},{"ruleId":"D2","level":"warning","message":{"text":"main.ensureSubgraphCustomTypes (cognitive 20): main.ensureSubgraphCustomTypes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 6, 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":"cmd/bd/template.go"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca62ccf38e652c3daf4ef2612dab4e1302f479bac342b9561f390873cffe3300"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWispGCProxiedServer (cognitive 20): main.runWispGCProxiedServer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 6, boolean chains 1 (nesting depth added 5). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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/bd/wisp_proxied_server.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"23343e5ef6f280239bb1473dedcb8f5795480d1ce0b1835b2483022552de990d"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkMetadataConfigValues (cognitive 20): doctor.checkMetadataConfigValues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, 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":"cmd/bd/doctor/config_values.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac701374b1a6b0df115fc0a19330894b646a62495c057dfcf9c3a712b08e0356"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.findOutdatedBDHookVersions (cognitive 20): doctor.findOutdatedBDHookVersions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 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/bd/doctor/git.go"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d737c04651d515843743103d961be9b811c6a6e318c228ca835d643b2fb9bda"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckGitConflicts (cognitive 20): doctor.CheckGitConflicts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/validation.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad5de412f05162eed080fa03dee4c4e056bbab730310d90ce91f73df85a5812"}},{"ruleId":"D2","level":"warning","message":{"text":"protocol.canonValue (cognitive 20): protocol.canonValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 4, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/protocol/corpus.go"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"3671b699976bc462d74a4d0c998b153f8bebfc7a2c77b949710f0a0f5d261eda"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.removeHookCommand (cognitive 20): setup.removeHookCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/setup/claude.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c0791894ef5bf1822c2efabe0835283cc8c69dc079d83be3a811e2dedb4abb"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.buildPullWIQLMulti (cognitive 20): Client.buildPullWIQLMulti has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, loops 8 (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":"internal/ado/client.go"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"c10acad408057a4a82b038db2f078b268b63ddbc9ecae23446d74e5de7da6c8c"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.ParseCondition (cognitive 20): formula.ParseCondition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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":"internal/formula/condition.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f848d6ef66bbd1bebf06a14f7ef26638208ebb7eee756867852188e7f5736ff"}},{"ruleId":"D2","level":"warning","message":{"text":"VarDef.UnmarshalTOML (cognitive 20): VarDef.UnmarshalTOML has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, 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":"internal/formula/types.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbcf805aa10d55d941c638d84e0c3e447e7e043bda459b106f60cdc05b439c4"}},{"ruleId":"D2","level":"warning","message":{"text":"metrics.userConfigHasLeaf (cognitive 20): metrics.userConfigHasLeaf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 5, 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":"internal/metrics/userconfig.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c6e24f5af728e4eec9abe550bc29902da08a71137569ae603f60a98047e05a"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.Claim (cognitive 20): issueSQLRepositoryImpl.Claim has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, loops 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":"internal/storage/domain/db/issue.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f857b05e2ca72233c5fe5eccbff540c22f7cc06c45ed4455287c7e871b702e9"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ApplyLabelPatch (cognitive 20): issueops.ApplyLabelPatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, loops 7, 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":"internal/storage/issueops/aggregate.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"388872741abf298529244cf2144918c40f5a1ec4fd0f1b5106bab778c7303d5a"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ResolveCustomStatusesDetailedInTx (cognitive 20): issueops.ResolveCustomStatusesDetailedInTx has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/config_helpers.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f23c40fc9cc6c9f1b8c9b6898572094389fb59dae3ecb33671eef4fddb9a92e"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.MergeWithStrategy (cognitive 20): versioncontrolops.MergeWithStrategy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b8eae20f97306f7655c3a4c56b887723c10b7f61d4729996e2d53de0b4c0bf"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.Sync (cognitive 20): Engine.Sync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tracker/engine.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a98dfcafcf325df07ed9cc6dc74e0f8e11107347666ad6d373ab966db9010c6"}},{"ruleId":"D2","level":"warning","message":{"text":"types.ParseCustomStatusConfig (cognitive 20): types.ParseCustomStatusConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/types/types.go"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"e79c6e8c7b79b1419af7ef9ac21340bada48f1e7e94e0d83ae1d005dd7326b30"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWithArgs (cognitive 20): main.runWithArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 7 (nesting depth added 8). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench-ready-indexes/main.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60b178dcf38b8199d395ed10888a49fa17de5dfdbb35dfa729111828acd7031"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunIssueOperationsUpdateClosePolicy (cognitive 19): conformance.RunIssueOperationsUpdateClosePolicy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9ded12267af3e2b561b6089df413ab5983b0815da725534e452e16747f6704"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunIssueOperationsUpdateAssigneeTransferFence (cognitive 19): conformance.RunIssueOperationsUpdateAssigneeTransferFence has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"056ee707f642db75a700a8d280bc6d5d92318d3226ed4b706d9f97326a5935f3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.collectViperEntries (cognitive 19): main.collectViperEntries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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/bd/config_show.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c77a18f7bac30a6ed4d5851dd823013767ad73f28914cca03a6200ee24a26db"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCook (cognitive 19): main.runCook has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 4). 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":"cmd/bd/cook.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"8da705cca92d0266604d585df52af91c9bfa0d9efc06feebfe9d9c3e7fdd4341"}},{"ruleId":"D2","level":"warning","message":{"text":"main.filterTreeByStatus (cognitive 19): main.filterTreeByStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, loops 6, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dep.go"},"region":{"startLine":1474}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2de9bb409558a1a9427cce7ede6cf554f91a86546206a0fe1e614a484bdd7c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runCheckHealth (cognitive 19): main.runCheckHealth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"cmd/bd/doctor_health.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d653c386dd2176829bb415824b4ed3aaa1237a3557315991203024482f2aaef"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runDoltRemoteRemoveProxied (cognitive 19): main.runDoltRemoteRemoveProxied has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 7). 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 into named stages: move each independent step or branch into 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/bd/dolt_remote_proxied_server.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"52aa10b51ab4f3855f4dd7ad3aadc80079fa5e8e35ac2132746946469f6ae55d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runFormulaConvert (cognitive 19): main.runFormulaConvert has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (nesting depth added 4). 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, 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/bd/formula.go"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a66e419f9205069726c844cd179946507e175efc3d02f395c2f563c19ed9d55"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runGateDiscover (cognitive 19): main.runGateDiscover has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, loops 1 (nesting depth added 5). 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 into named stages: move each independent step or branch into 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/bd/gate_discover.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9d5aa3df2cddc066be988f66f59360cebd05529220209804e7fde55a4523ac"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runJiraStatus (cognitive 19): main.runJiraStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 1 (nesting depth added 2). 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, 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/bd/jira.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"575dff171261e77f201c293be58242eba7af97b922c59fe6dd9feefc4452222b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMergeSlotAcquire (cognitive 19): main.runMergeSlotAcquire has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, boolean chains 1 (nesting depth added 6). 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 into named stages: move each independent step or branch into 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/bd/merge_slot.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb70e20eb198434bf67c8f9934567045cb3d6734d51c9fbef8f3f2b53a29c0b1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.displayMigrationPlan (cognitive 19): main.displayMigrationPlan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, loops 9, 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, 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/bd/migrate_issues.go"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"510f1be809589d5405e598804f8d019a3cf16ae15b53914bbada78762f6d22da"}},{"ruleId":"D2","level":"warning","message":{"text":"main.wouldCreateCycle (cognitive 19): main.wouldCreateCycle has cognitive complexity 19 (threshold 15). Drivers by points: loops 11, 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/bd/mol_bond.go"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e7c22266713c752be9b2580fb6359562e0f1794fa6eed4249794aee6ae9891f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.emitProxiedPruneDryRun (cognitive 19): main.emitProxiedPruneDryRun has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/purge_proxied_server.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e0fd5f996fa436383eb85c1279f7762af9810cada15f7be52646bfa785173d7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildParentEpicMap (cognitive 19): main.buildParentEpicMap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 6, 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":"cmd/bd/ready.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb62c2c6f8c529193bf06c9bea207d25037374df2d38dd17c2dc7d14b6096130"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildParentEpicMapProxied (cognitive 19): main.buildParentEpicMapProxied has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 6, 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":"cmd/bd/ready_proxied_server.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f676665f2d493a838da2a2581199b3200325a468d3031a95b3f59ccc9fa8054"}},{"ruleId":"D2","level":"warning","message":{"text":"main.updateReferencesInAllIssues (cognitive 19): main.updateReferencesInAllIssues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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/bd/rename.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64080d6958aa2fad3cab70f1910cff2db90c3fc02191dd67af7da517aef0dec"}},{"ruleId":"D2","level":"warning","message":{"text":"main.outputSearchResults (cognitive 19): main.outputSearchResults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/search.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"177e3332a2b1cde9c5b2b1c42d102ea794ca023a57c9d539b8f7a779108b49bf"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderSwarmAnalysis (cognitive 19): main.renderSwarmAnalysis has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, loops 9 (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/bd/swarm.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f2cfb761003d2ca9496e01c43f82c3241f258861577c82ff81762956fe2c38"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runTodoDoneProxiedServer (cognitive 19): main.runTodoDoneProxiedServer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 6). Of this number, 10 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/bd/todo_proxied_server.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5502652e76ef8e2877c4c8196ee2880df507c5b2ebd717ae4901ec5b6351e4a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWispCreateProxiedServer (cognitive 19): main.runWispCreateProxiedServer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 5). 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 into named stages: move each independent step or branch into 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/bd/wisp_proxied_server.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"98b52b0d7b11b8a818f9239d1e2e7d05aaf24bee00fb5cf2156da24ebf441b9d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveExplicitWorktreeComparator (cognitive 19): main.resolveExplicitWorktreeComparator has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1652}}}],"partialFingerprints":{"codehealthFindingId/v1":"564ca4932ae9ef9e189b68b620327e915afde325ba8f3f684eccde98e8851a3b"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckFederationPeerConnectivity (cognitive 19): doctor.CheckFederationPeerConnectivity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, 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/bd/doctor/federation.go"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"61fe6d17cfa98e1297ccf97ab9303ba0f54937c2b3b8832e85b7c22745a3dd4f"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckTrackedRuntimeFiles (cognitive 19): doctor.CheckTrackedRuntimeFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, 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":"cmd/bd/doctor/tracked_runtime.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88eca09d5b5bc35fe8d72aad4d95d3e7c3d4a68868c31917eab9c51e64fa7f4"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.FixProjectIdentity (cognitive 19): fix.FixProjectIdentity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"cmd/bd/doctor/fix/metadata.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c545ef774dbf7cbc0a50c7dcba5e104e40d4d48a4763357707e543d3a8101d8"}},{"ruleId":"D2","level":"warning","message":{"text":"depRender.annotationsFor (cognitive 19): depRender.annotationsFor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (nesting depth added 5). 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 into named stages: move each independent step or branch into 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/bd/list_tree_deps.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbca560aa020d3ac206c44fc13066fa8161376910ba0d2f77a53f738f6fff37a"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.removeGemini (cognitive 19): setup.removeGemini has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"cmd/bd/setup/gemini.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"78f3483f0a3330358fd3f0d18ea90db147361509dbda2cf2acae80bde013b5e7"}},{"ruleId":"D2","level":"warning","message":{"text":"BootstrapMatcher.FindMatchIndexed (cognitive 19): BootstrapMatcher.FindMatchIndexed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ado/bootstrap.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"086fffe62a321cde4d356326d7b0886991107d27be85a3e8648166bdc8358b0d"}},{"ruleId":"D2","level":"warning","message":{"text":"configfile.readPasswordFromFile (cognitive 19): configfile.readPasswordFromFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 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":"internal/configfile/credentials.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce06524079bb2330e9e4a793a50f7e8d33c3c9f51d957f25259522f5cdbafd83"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.validateVarValue (cognitive 19): formula.validateVarValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 4, loops 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":"internal/formula/parser.go"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d795ccd1d1887974cc3dbf45eca11214756bc5b78361dbd223294d0aed28eb"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.inspectAndStopUnverifiedPID (cognitive 19): proxy.inspectAndStopUnverifiedPID has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, 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":"internal/storage/dbproxy/proxy/force_stop.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f1f0c0bacd5c4a6df78842408ae2fc0e78e257db62f16150c64055260e1867a"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.prepareCLIRouteForGitProtocol (cognitive 19): DoltStore.prepareCLIRouteForGitProtocol has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/store.go"},"region":{"startLine":3219}}}],"partialFingerprints":{"codehealthFindingId/v1":"a41a15164727d59ab14244d3495ac26317e638b7581981a7b207cc0eb6032684"}},{"ruleId":"D2","level":"warning","message":{"text":"beadsDirFSUseCaseImpl.InitializeBeadsDir (cognitive 19): beadsDirFSUseCaseImpl.InitializeBeadsDir has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 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":"internal/storage/domain/beads.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"f03dcba70232056c3d3c6675c489f133802d9ed26831fd1b5c3802aba641d7ff"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.searchTable (cognitive 19): issueSQLRepositoryImpl.searchTable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"internal/storage/domain/db/issue_search.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"97df3b1e44dc5f19ec339eaad6030d9fff67576588fa8b09c9ffcc435de72c0d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.mergeAffectedSets (cognitive 19): issueops.mergeAffectedSets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 4 (nesting depth added 6). Of this number, 13 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/blocked_merge.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"09cea7083eda734b4e201fd4dc4122b378281194753c2c8d69e03cf1d1d92887"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.FindWispDependentsRecursiveInTx (cognitive 19): issueops.FindWispDependentsRecursiveInTx has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, 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":"internal/storage/issueops/bulk_ops.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"019ef1f02b6abe982bafc6082e838fcc497d28152d00b763d718a4ab122b5a57"}},{"ruleId":"D2","level":"warning","message":{"text":"uow.hydrateIssueOperation (cognitive 19): uow.hydrateIssueOperation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (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":"internal/storage/uow/issue_operations.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf0b3bbd264c93d134c300216ee69b0e472606e06d892e4a71b50f2d17f322c0"}},{"ruleId":"D2","level":"warning","message":{"text":"importer.ImportBatch (cognitive 19): importer.ImportBatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, loops 1 (nesting depth added 8). 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 53). 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":"internal/storage/uow/importer.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"d77c2a3d658b99867160b9ff4bdecb3692362dba423d4c6f320737099e785a54"}},{"ruleId":"D2","level":"warning","message":{"text":"types.NormalizePersistenceMode (cognitive 19): types.NormalizePersistenceMode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 5, 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":"internal/types/types.go"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa9795ba5ed0829241e26189c3eedc11782ba2bf1a134ca438a60e40f5c67495"}},{"ruleId":"D2","level":"warning","message":{"text":"main.insertDependencies (cognitive 19): main.insertDependencies has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro-dolt-prod-timeouts/main.go"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b5e1d5a2d663d9c6ca226f4b38ecb1687069ad8132c8ef08496cd22d0e1d3c7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildADOPushHooks (cognitive 18): main.buildADOPushHooks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 6, loops 4 (nesting depth added 3). Of this number, 10 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/bd/ado.go"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f0f7ce3c5f7b1e636b1aed7e62751995afe7e44d3da191f10762fb0b2862ee1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.ensureBeadsDirForPath (cognitive 18): main.ensureBeadsDirForPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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/bd/create.go"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb377d494c433c7bc6a42e7f84c8b365abce1dbb7a074e2dcb1ed6f1abe3f856"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runConventionsCheck (cognitive 18): main.runConventionsCheck has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 3, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor_conventions.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e18576af7bff10f13a501c4581a18da6e826e66428431444b9f4a009ddf1b61"}},{"ruleId":"D2","level":"warning","message":{"text":"main.jaccardSimilarity (cognitive 18): main.jaccardSimilarity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"cmd/bd/find_duplicates.go"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"eba96d1f019fa3dcc67afd45d64de2333d701b3741e43cc54ae576fbcd1fd222"}},{"ruleId":"D2","level":"warning","message":{"text":"main.applyGateCheckResults (cognitive 18): main.applyGateCheckResults 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/bd/gate.go"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d173c550c2d66645e2f9900cf4536e9f1df54021b0025c6c2a39a64ecfa96f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.validateGraphApplyLocalCycles (cognitive 18): main.validateGraphApplyLocalCycles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 2 (nesting depth added 5). Of this number, 13 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into 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/bd/graph_apply.go"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"2675978d17f373953145d1f77c6895fdd69eea87c8a5fb51ebd3b0e095175330"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findExecBlockInjectionPoint (cognitive 18): main.findExecBlockInjectionPoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/hooks.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a3e217d73a3f55fcca4f4497efde40ec842d4879774ee2af748987d76ab6053"}},{"ruleId":"D2","level":"warning","message":{"text":"main.removeHookSection (cognitive 18): main.removeHookSection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 3, 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/bd/hooks.go"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"4155b507b97c3f50cec6ebd9d1e1e2ce90919f95fa93f4b5098918a2d198917c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.reconcileLinearParents (cognitive 18): main.reconcileLinearParents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 5, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/linear.go"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1ea5bc988eb4e5c00b63cc12446ab83215604481293eaa2bae429f09972c71"}},{"ruleId":"D2","level":"warning","message":{"text":"main.configCommandCanRunWithoutStore (cognitive 18): main.configCommandCanRunWithoutStore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/main.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a670eced10d078f5904b738b5158f55f5305563fa3a155522376c9f8c56b2f6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.countCrossRepoEdges (cognitive 18): main.countCrossRepoEdges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 7 (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/bd/migrate_issues.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb9ccbf12a48810852b3ae4fc699bbce8ca8aca5781f56bffbc8c95d59ef57f3"}},{"ruleId":"D2","level":"warning","message":{"text":"main.burnPersistentMolecule (cognitive 18): main.burnPersistentMolecule has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 3, 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":"cmd/bd/mol_burn.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"af784b985f05b36a754ed2c6f071b38814a04df5e2dea0f87de35f9e07812de6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMolBondProxiedServer (cognitive 18): main.runMolBondProxiedServer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, match/switch 1 (nesting depth added 3). Of this number, 9 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/bd/mol_proxied_server.go"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6ecf817ab0810b4666900cfb8c794e3ad3c8c301314eb76105a5cab5be632e2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runFixes (cognitive 18): main.runFixes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"cmd/bd/preflight.go"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"24682c6465c20fece05ee9d032dd4fb593838d55d8b471d1a026551eaa38843b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runSwarmValidateProxiedServer (cognitive 18): main.runSwarmValidateProxiedServer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (nesting depth added 2). Of this number, 9 points are the body\u0027s own statements and 9 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":"cmd/bd/swarm_proxied_server.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"f547258f42e3dff571d70023f907e1db435c312560f64f427c03b95c14862223"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printSections (cognitive 18): main.printSections has cognitive complexity 18 (threshold 15). Drivers by points: loops 10, if/else 8 (nesting depth added 9). 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/bd/types.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2f6d65f28706a0578c7bc0d2690473ebb49d6700ecef8d6a0a2cd0fac307e24"}},{"ruleId":"D2","level":"warning","message":{"text":"main.inspectWorktreeTarget (cognitive 18): main.inspectWorktreeTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c02b53692fa9ee07738c8dbef4873a814df56aa99eee2c270fb6df087b63d1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.addToGitignore (cognitive 18): main.addToGitignore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, 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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"905ce366abfd329f605757834af32b11d21588af0f0ffb48f28a2f74746e2f41"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckCircuitBreaker (cognitive 18): doctor.CheckCircuitBreaker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/circuit.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c3cf524d19b628ae5ff0d3a6d0b294186db69962e6548d2a92c83ba233f2949"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckDeletionsManifest (cognitive 18): doctor.CheckDeletionsManifest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"cmd/bd/doctor/integrity.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"26808be64d2d38bca13405827e8f2ffc1ef3fb0c249fd4970f3fc734a8ba86b8"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckDatabaseConfig (cognitive 18): doctor.CheckDatabaseConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, 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":"cmd/bd/doctor/legacy.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a58a42689389005180e7fb3e0e1d5963aa95dc793721d2d9643901e035440cb"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.cleanSQLiteArtifacts (cognitive 18): fix.cleanSQLiteArtifacts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 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/bd/doctor/fix/artifacts.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dc30d5608670e4a9bb776f7f9b785fe3e342086a745e1347a0df5316802135d"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.CheckLefthookBdIntegration (cognitive 18): fix.CheckLefthookBdIntegration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 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/bd/doctor/fix/hooks.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64d2df45abf5367b0719c6176ae0c2e811f1f723c2126473d3af3d69eb554ef"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.StaleClosedIssues (cognitive 18): fix.StaleClosedIssues has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/maintenance.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"764fee2316bbfcade9d377041f81949aa07db231f6f05739cef684eb74822667"}},{"ruleId":"D2","level":"warning","message":{"text":"Reconciler.Reconcile (cognitive 18): Reconciler.Reconcile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 8 (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":"internal/ado/reconcile.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a9a788e88d418279be4d5f07397c176e2e63504046b183d1d52bb4bea10db0c"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.preferStableBranchWorktreeBeadsDir (cognitive 18): beads.preferStableBranchWorktreeBeadsDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, loops 1 (nesting depth added 2). Of this number, 17 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":"internal/beads/beads.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bb1e27c059ed47d5cdb7e3c64df9836d7ac6dc7970a14120a9ef68f08e81e1b"}},{"ruleId":"D2","level":"warning","message":{"text":"beads.findDatabaseInBeadsDir (cognitive 18): beads.findDatabaseInBeadsDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/beads/beads.go"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b28c6d62307b1ae4bfbe741d547fdb9d878d0f6ef6b2c34ecbac858b6755c6"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.validateChildDependsOn (cognitive 18): formula.validateChildDependsOn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 5 (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/formula/types.go"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"328464f49aec60d352b02e2f3b276123a6c610835a533060c3a68ce4c1792ec3"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.fetchIssueAcrossTeams (cognitive 18): Tracker.fetchIssueAcrossTeams has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"internal/linear/parent_reconcile.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e520a6fce4e98db137a0aff1e1e149a756baafce26669985115fa63eb4cf507"}},{"ruleId":"D2","level":"warning","message":{"text":"proxyServer.idleWatcher (cognitive 18): proxyServer.idleWatcher 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":"internal/storage/dbproxy/proxy/server.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0e30127d98097ab45d6942c8d263c363df2a4422fc32ffed8dcb96061cc09b"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.seedCounterFromExistingIssuesTx (cognitive 18): dolt.seedCounterFromExistingIssuesTx 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":"internal/storage/dolt/issues.go"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a54e91edd4a3777bcebd37ffe4cdae25f09c2a8b32fd628197d6ef37aa6ee87"}},{"ruleId":"D2","level":"warning","message":{"text":"dolt.isRetryableError (cognitive 18): dolt.isRetryableError has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/store.go"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"41759fcca17551069f07bae54b123749de498b36aef672a1680f30775bf85d35"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.prepareCLIRouteForCloudAuth (cognitive 18): DoltStore.prepareCLIRouteForCloudAuth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 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":"internal/storage/dolt/credentials.go"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"7803797f2a4933a4f1af84a1eb357282db475f2fa01eee3c1643ac8cc90188e9"}},{"ruleId":"D2","level":"warning","message":{"text":"doltTransaction.AddDependencyWithOptions (cognitive 18): doltTransaction.AddDependencyWithOptions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 4, 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, 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":"internal/storage/dolt/transaction.go"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b0ab33340f6fbe6af17b9410b2f7c1f12ffa27d2a7c01c4ac29757ce3437e1"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.hydrateIssues (cognitive 18): issueSQLRepositoryImpl.hydrateIssues has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 5 (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":"internal/storage/domain/db/issue_search.go"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ff8d4f4f9122bd3df80a1755885b96944b6036960c7d8a589e3a9c310780dab"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.searchAcrossIssuesAndWispsWithCounts (cognitive 18): issueSQLRepositoryImpl.searchAcrossIssuesAndWispsWithCounts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (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":"internal/storage/domain/db/issue_search_counts.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5727c1ecf3d4d261b0f0c4b643a7338f73615f7eb8caaa012a8fe2710a4c71ce"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.closeIssueInTx (cognitive 18): issueops.closeIssueInTx has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/close.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf7ff44185c3dc46eb600799ba1d2eebfde8592df98112f45668be85fe9c306"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.createBlockedRecomputeIDs (cognitive 18): issueops.createBlockedRecomputeIDs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 6 (nesting depth added 6). Of this number, 13 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into 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/storage/issueops/create.go"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ca9c2886b7f12fa065ec339e26e079ca2374d2c621a2ba4a7f59cc45309da5"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.InsertIssueIfNew (cognitive 18): issueops.InsertIssueIfNew has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/create.go"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88b19cb64a64812a7a88ea4b38d8b7c77c4950e80e6f62f9dea6417810805d3"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.reachPath (cognitive 18): issueops.reachPath has cognitive complexity 18 (threshold 15). Drivers by points: loops 11, if/else 7 (nesting depth added 11). 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":"internal/storage/issueops/cycles.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"093a35ea7a408b4bbfc1a3ea1014805d8e9129da532b3f5336743afe140c7a57"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ExecuteCreate (cognitive 18): issueops.ExecuteCreate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"internal/storage/issueops/execution.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d83b66cb343e73b9b6ec394900dc362a3f34fbf3694f2aa13e5541a8b7f8df3"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.searchTableInTxT (cognitive 18): issueops.searchTableInTxT has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 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":"internal/storage/issueops/search.go"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bca2da3bcd5ff7c15cf16e08d3b754cc774d04c5d0468487ea5538bd5954db3"}},{"ruleId":"D2","level":"warning","message":{"text":"uow.validateMetadataPatch (cognitive 18): uow.validateMetadataPatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/uow/issue_operations.go"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aeb6e5e4a4c357baeee3f9d6fd12cc766dfa168fb5992fb7a391c6832b335a9"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.TryRepairFKCascadeViolations (cognitive 18): versioncontrolops.TryRepairFKCascadeViolations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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":"internal/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ca129f9df80db8f21400866de1b1e8261c40f9c43b230b29d36d070967a598"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.DetectConflicts (cognitive 18): Engine.DetectConflicts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, 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":"internal/tracker/engine.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"eed9aa323056e052a51f64b4fbb560ce154a626544fbc60da2f6984314ba25e2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.benchQuery (cognitive 18): main.benchQuery has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 7 (nesting depth added 11). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 250). 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":"scripts/bench-ready-indexes/main.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"722a0e7c636ef835b0f9ac7ca6f04a21e5a73dee4413213894e59a37982ec155"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunReaderOffsetIsHonoredOrRefused (cognitive 17): conformance.RunReaderOffsetIsHonoredOrRefused has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/reader_contract.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"b50c89defcbf81bec0a8f864651c38e5cd3cddd7b8d8688d4748d6f0a4e9d1b9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parseBatchScript (cognitive 17): main.parseBatchScript has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, match/switch 5, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/batch.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"361410d03b626f5f139afe7b14682137f2dfee5f7e1db496b0b8629e334ef48a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveCloseTargets (cognitive 17): main.resolveCloseTargets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 2 (nesting depth added 5). Of this number, 11 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":"cmd/bd/close.go"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f9471ce5c62e76f383199ede88ddf8170dacd9e2a7a31971984243b19115969"}},{"ruleId":"D2","level":"warning","message":{"text":"main.closeProxiedRunPostClose (cognitive 17): main.closeProxiedRunPostClose has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 3, 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 one function literal inside it that branches (line 364). 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/bd/close_proxied_server.go"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dbcddbcff9ef99bb96944d7585a75f9f180d625bc172e2122556d605a8e886e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.detectTestPollution (cognitive 17): main.detectTestPollution has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, 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":"cmd/bd/detect_pollution.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"5652e12fa83b9134c0706a39866d8ac14b4ea0fff774a9c89d52efb8599afcd7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runGitLabStatus (cognitive 17): main.runGitLabStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 5). 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 into named stages: move each independent step or branch into 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/bd/gitlab.go"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb0b4d0a0e455cf62011861db0b6aaeb93a83752225b7023a1c17544bf24265"}},{"ruleId":"D2","level":"warning","message":{"text":"main.emitGraphApplyDryRun (cognitive 17): main.emitGraphApplyDryRun has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 2, loops 2, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph_apply.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"2505ca099db931379de54507a2a191cf73aaa7a003612b427698db195cffe939"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runHistory (cognitive 17): main.runHistory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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/bd/history.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"024a61a5e5215ae90ffdfe224c0e02c4de53058329cf0e050f8e8fbcdebd02ef"}},{"ruleId":"D2","level":"warning","message":{"text":"main.importFromLocalJSONLWithOpts (cognitive 17): main.importFromLocalJSONLWithOpts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/import_shared.go"},"region":{"startLine":1144}}}],"partialFingerprints":{"codehealthFindingId/v1":"bebda099bcfaac6c71a2d87cd8cd4e736fed35e95c02ad92dc9e41597ef5fe2a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderInfo (cognitive 17): main.renderInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/info.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c7f21bd6c30483428f4c86c8df971fab5d4fb108bccd5db74e4e9682a7c14f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.showQueuedEvents (cognitive 17): main.showQueuedEvents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, 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/bd/metrics.go"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"6558f098dc412c941675485a2d3ba506d9943c48e5d0edbbaf778ce797fd2a8f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.buildHookMigrationExecutionPlan (cognitive 17): main.buildHookMigrationExecutionPlan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate_hooks_apply.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"a28d452efbc73b80f8b8a042b4224eed7f3b11f2de0d55652c62e959b82f13c4"}},{"ruleId":"D2","level":"warning","message":{"text":"main.fixNixHash (cognitive 17): main.fixNixHash has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 3). 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: 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/bd/preflight.go"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa8562abc1f07273a1a7edd713fb0fdc298e1cf1768f4209d9bf33a4142085e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.outputCLIContext (cognitive 17): main.outputCLIContext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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/bd/prime.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"bce5ccb9b5deae5e4f9386a463358f7589256a7a7e72a546f26426a9cec6bc5e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveViaPrefixRoutingWithAccess (cognitive 17): main.resolveViaPrefixRoutingWithAccess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, 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":"cmd/bd/routed.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ed54d63c657aae9e66a23ffbf016d9a1522460e86aaf2dfd50d34bb6df810a9"}},{"ruleId":"D2","level":"warning","message":{"text":"main.CompactRules (cognitive 17): main.CompactRules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 6, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/rules.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"e074bc0812df80fb80d55a0af85f7121bc003cbf6910a20fb21ffa450d411202"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runShowProxiedChildren (cognitive 17): main.runShowProxiedChildren has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 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":"cmd/bd/show_proxied_server.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc31b7503d9a272768acbb25c7b3137b575ebb2bddde10a40e7725ec70192ca2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findExistingSwarm (cognitive 17): main.findExistingSwarm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/swarm.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"27ced64807596df0901bdf525decb012969c835d84cd96faa4fa91e432848add"}},{"ruleId":"D2","level":"warning","message":{"text":"main.acquireCommandWorkspaceGates (cognitive 17): main.acquireCommandWorkspaceGates 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/bd/workspace_gate.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca8fb95041d2f28f528c443b1aeba4e19d67e230431af69b946c0475a4cafb11"}},{"ruleId":"D2","level":"warning","message":{"text":"treeRenderer.renderNode (cognitive 17): treeRenderer.renderNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dep.go"},"region":{"startLine":1363}}}],"partialFingerprints":{"codehealthFindingId/v1":"d114b5ad3de4be80efc7344d6e7c95619ec9481ed1c072b881fbf87e12c403f0"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkHookEvents (cognitive 17): doctor.checkHookEvents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 3, match/switch 3 (nesting depth added 7). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 781). 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/bd/doctor/claude.go"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3d332676c717477b0db9a4dae858f950931d0ec35d0096b45ea358465fd479c"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckGitUpstream (cognitive 17): doctor.CheckGitUpstream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5 (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":"cmd/bd/doctor/git.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf0c376425715f391ba1e8e6d9cdd3503926db1e2f336815ff714fcc8cabce84"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkMigrationContentSkew (cognitive 17): doctor.checkMigrationContentSkew has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 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":"cmd/bd/doctor/migration_skew.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"1df0ae5c3c729bacd9a98e7daa0a6f45cdaf89fd3380bf85011a7825cf1af8c1"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.validateJSONLForMigration (cognitive 17): doctor.validateJSONLForMigration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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/bd/doctor/migration_validation.go"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffceab74e88fdf4d93a78aac40eca679c9f72de9f45771993f7603c36cd704b6"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.runDoltDiagnosticQueries (cognitive 17): doctor.runDoltDiagnosticQueries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 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":"cmd/bd/doctor/perf_dolt.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4c980a480e630f9c7777a9f4a7ad99f80e4669556a316a72730e01c74ca5af"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.geminiSessionStartCommands (cognitive 17): setup.geminiSessionStartCommands has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/setup/gemini.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5feed52802cbf9823bc3e3fe8fae1bb3aec7a2a7c00636c3118713fa5902839"}},{"ruleId":"D2","level":"warning","message":{"text":"config.getConfigList (cognitive 17): config.getConfigList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (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":"internal/config/config.go"},"region":{"startLine":1175}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2bac11394b7bcb0963642e778533e70e65b3442973e8b80ea554dec16e7875"}},{"ruleId":"D2","level":"warning","message":{"text":"doltserver.killStaleServersForDir (cognitive 17): doltserver.killStaleServersForDir has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 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":"internal/doltserver/doltserver.go"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3e7d13e246684a251ac2df3aa783aef7ae0092c88c45c69673a0b035fad972"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.Resolve (cognitive 17): Parser.Resolve 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":"internal/formula/parser.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"94805e9bf1eba9c3c926e1222a53c1b4e08de48677893cc96ec50c956b424624"}},{"ruleId":"D2","level":"warning","message":{"text":"jiraFieldMapper.IssueToTracker (cognitive 17): jiraFieldMapper.IssueToTracker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (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":"internal/jira/fieldmapper.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"79eb6e8904e0d2f375dde94daf0e0e5d69ea07e0a7a339f48204baffb7d782d0"}},{"ruleId":"D2","level":"warning","message":{"text":"storage.ApplyMetadataEdits (cognitive 17): storage.ApplyMetadataEdits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, 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":"internal/storage/metadata.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"4430c992b163fdab476c41260b8f3d98b07018fffa2b459816deb159e9181587"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.sweepOldQuarantines (cognitive 17): proxy.sweepOldQuarantines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac10dabcff3283bcdac75f51f451af6cbb639b431a686f097c097d145dd173b2"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.filteredPushToPeer (cognitive 17): DoltStore.filteredPushToPeer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"internal/storage/dolt/federation.go"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bdba9695ba3aa5ceab6576a5a559509c2f53e5b2aaec504741c3b762d5579c"}},{"ruleId":"D2","level":"warning","message":{"text":"dependencySQLRepositoryImpl.DeleteAllForIDs (cognitive 17): dependencySQLRepositoryImpl.DeleteAllForIDs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 5, 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":"internal/storage/domain/db/dependency.go"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c8f2a94eb8887a2aa1c9b611b9573ad63b41a7054eccdeb91589b711514741"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.GetDescendants (cognitive 17): issueSQLRepositoryImpl.GetDescendants has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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":"internal/storage/domain/db/issue_descendants.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"95095d506df0fdfc0dbe2322d81b8b93f546c5cc5899fa64a182e7439fe7011a"}},{"ruleId":"D2","level":"warning","message":{"text":"dependencyUseCaseImpl.add (cognitive 17): dependencyUseCaseImpl.add 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":"internal/storage/domain/dependency.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"08e0cd4e7843545c8b7521ef1a89564a2b67290a75f359a1eb451a029e08a4a0"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.graphHasPath (cognitive 17): issueUseCaseImpl.graphHasPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2 (nesting depth added 5). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 1445). 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":"internal/storage/domain/issue.go"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d04697d66d19c13650d27c77d61b8b0a7c9efaab362eecf9da8ea31c5ee56d5"}},{"ruleId":"D2","level":"warning","message":{"text":"issueUseCaseImpl.previewDelete (cognitive 17): issueUseCaseImpl.previewDelete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 6, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/issue_delete.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3c66d72201b25547f74a4e824b22e95667dde2a2cb2a9384a5d0db2ca18a46"}},{"ruleId":"D2","level":"warning","message":{"text":"labelUseCaseImpl.setMany (cognitive 17): labelUseCaseImpl.setMany has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/label.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4415a062bc9d0c712150e4d939aa2f75cb404c2054ad87fc0b72a182323252d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ValidateUpdateRequest (cognitive 17): issueops.ValidateUpdateRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5 (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":"internal/storage/issueops/aggregate.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45d2ae2a225ec76ad5185865f743f66a7c60d6dd2d141c45883cbd652c568d6"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ValidateScalarUpdates (cognitive 17): issueops.ValidateScalarUpdates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, 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":"internal/storage/issueops/aggregate.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3bc91940e922828147b52fc8cd70e619a585d27af53af94f11559ab64e0d46d"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.AffectedByDeletionInTx (cognitive 17): issueops.AffectedByDeletionInTx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 5, boolean chains 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":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdf98770e8697c09c7307bc49f87bd1a2e1b0d655441a829b591a5e5c6ec6dbb"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.CheckEligibilityInTx (cognitive 17): issueops.CheckEligibilityInTx 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":"internal/storage/issueops/compaction.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f0985dfb6f5372fca78c97f253d165e6023c2c3af3c7bbe4ac37baf2fe18fb"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.ResolveCustomTypesInTx (cognitive 17): issueops.ResolveCustomTypesInTx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/config_helpers.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5708fd62b3c47fcac1aa8a531fbdc0f141120d88dd93afbebb0759eb629bc4b"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetDependenciesWithMetadataInTx (cognitive 17): issueops.GetDependenciesWithMetadataInTx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"118cb9b6fb5ef638ff57e840bf141153289eb72fa2e95600dcb0d97de0590a65"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetDependentsWithMetadataInTx (cognitive 17): issueops.GetDependentsWithMetadataInTx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"04b1641d7a36837b7d26a2b4723515b57d110373d97e578f6710875a6733a065"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.getDependentRecordsIntoFromTable (cognitive 17): issueops.getDependentRecordsIntoFromTable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7dd1ae8302dc917ec7d1727efa5e93d1424ef497e3e7d57e2a7cce430e55a69"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.runReadyCountsInTx (cognitive 17): issueops.runReadyCountsInTx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 4, 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":"internal/storage/issueops/ready_work_counts.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"3169c778889d10cfd4c517f1c6fc353247d25b35e30f6d8e9d89ca29f7f9c064"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.hydrateIssueLabelsAndDeps (cognitive 17): issueops.hydrateIssueLabelsAndDeps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 5 (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":"internal/storage/issueops/search.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5186bafebbcea75b81716a0ba98dc8f2e8eba1b6ec74256e0607fd39816ed0"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.applyTypedMetadataEdits (cognitive 17): issueops.applyTypedMetadataEdits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, 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":"internal/storage/issueops/update.go"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"72fd973283d2d6fc2c2ef4ea443e58de7b7b854f91489461b98deb32201b4b13"}},{"ruleId":"D2","level":"warning","message":{"text":"Issue.ValidateForImport (cognitive 17): Issue.ValidateForImport has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4 (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":"internal/types/types.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c2eaade86b45021526837742d05f64c22cf3be65a7c95bc6073b31a6390f12b"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunBatchCloserIdempotentRecloseIsAPerItemSuccess (cognitive 16): conformance.RunBatchCloserIdempotentRecloseIsAPerItemSuccess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 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":"backend/conformance/batch_closer_contract.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5d02979248395c6e8758fd97a20d585ea8384b92e004120ffac41de4f04e03a"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunIssueOperationsUpdateClaimConflictCarriesTheLosingState (cognitive 16): conformance.RunIssueOperationsUpdateClaimConflictCarriesTheLosingState 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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcaf1c2fa0d6067b62295e984978cd32bb27d449374064af5f6712f5101b231b"}},{"ruleId":"D2","level":"warning","message":{"text":"conformance.RunIssueOperationsRequestValuesAreNotMutated (cognitive 16): conformance.RunIssueOperationsRequestValuesAreNotMutated has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":1340}}}],"partialFingerprints":{"codehealthFindingId/v1":"6460554fec81142f1e38fc37ab35dafc4bce7266569a44bbaf34ce55c4681963"}},{"ruleId":"D2","level":"warning","message":{"text":"main.bootstrapServerPort (cognitive 16): main.bootstrapServerPort has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"cmd/bd/bootstrap.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9950d63bd075dfeaabfc7a438ff5f2f221d76609837187ef414a3890706e76c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.applyRemote (cognitive 16): main.applyRemote has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (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":"cmd/bd/config_apply.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc858809915c3c5b22b31b189d3ae622610108e3008cdff388219911dff0479"}},{"ruleId":"D2","level":"warning","message":{"text":"main.checkRemoteDrift (cognitive 16): main.checkRemoteDrift has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 4, loops 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/config_drift.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"86919c2bf8cabf5e5b0d2e837c91eddb0429e29825217eaa51938c282c9c9281"}},{"ruleId":"D2","level":"warning","message":{"text":"main.outputDeletionPreview (cognitive 16): main.outputDeletionPreview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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/bd/delete.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd2405ea2d9aedce7e2f715345a5418ed01e3179376eb3b7110e5ca9bbf90ee"}},{"ruleId":"D2","level":"warning","message":{"text":"main.addBulkDependencies (cognitive 16): main.addBulkDependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 7 (nesting depth added 3). 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: 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/bd/dep.go"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"0587e707fc1c0cf06f033a55455757c53ea8ee5ae4b3d78e3bc32ed8953701ee"}},{"ruleId":"D2","level":"warning","message":{"text":"main.applyFixes (cognitive 16): main.applyFixes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor_fix.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1376193a83c9a6d5d1d96b61d1a25fccdd33dca69d850f098ac04f27a4c5c0"}},{"ruleId":"D2","level":"warning","message":{"text":"main.cleanDatabases (cognitive 16): main.cleanDatabases 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, 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/bd/dolt_clean_databases.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"3622b6e6ec797869a0cabdf3be5cd21d859de83ed2f4b109f0656f1fc43fda3e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runFindDuplicates (cognitive 16): main.runFindDuplicates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 3). 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, 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/bd/find_duplicates.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"6928c914d4536d9f9d1111a747d939697e749dbcbf6197321e9dcd0c47613106"}},{"ruleId":"D2","level":"warning","message":{"text":"main.collectGitLabLinkSyncData (cognitive 16): main.collectGitLabLinkSyncData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/gitlab.go"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b3bd291c75c39862f34ee0f2bc9cc74a6f3bf20604dd3928b8651963f4e20f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.gitlabIssueAllowedByPushFilters (cognitive 16): main.gitlabIssueAllowedByPushFilters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, 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":"cmd/bd/gitlab.go"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e0ea24e7791e153581fa54ffc284d2218c31f3e984c27fca1d17ad0e62e32a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.renderGraphCheck (cognitive 16): main.renderGraphCheck has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 5 (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/bd/graph.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"acfa8a4a8a1535a710587bf8f2167e40eac3d2adb411341441746e2f275fb479"}},{"ruleId":"D2","level":"warning","message":{"text":"main.importRowChangeSummary (cognitive 16): main.importRowChangeSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/import_shared.go"},"region":{"startLine":898}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0775501f0a88ef5abfafd58624bdf73840104781ea7d25917549f324953382b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.processBatchLabelOperation (cognitive 16): main.processBatchLabelOperation has cognitive complexity 16 (threshold 15). Drivers by points: loops 9, if/else 7 (nesting depth added 6). 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, 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/bd/label.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"b48ea9426c11e571832726d8a25a7a80ddf4942f9f4271199e4498b0956f9731"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runMergeSlotCheck (cognitive 16): main.runMergeSlotCheck has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into 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/bd/merge_slot.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceceaaa0ee06fc1fcb92da7bc759ca188e13ba553c3a3e26d02f85bf6b803ef0"}},{"ruleId":"D2","level":"warning","message":{"text":"main.formatHookMigrationPlan (cognitive 16): main.formatHookMigrationPlan 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/bd/migrate_hooks.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"205bd1151681062bb2cc318fe28000b142b4048ac10818d15ead19ce19b22f52"}},{"ruleId":"D2","level":"warning","message":{"text":"main.AdvanceToNextStep (cognitive 16): main.AdvanceToNextStep has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, 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":"cmd/bd/mol_current.go"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a81788cd7c0a4f675b81feac1286194cd83717032e4e9506694877263dcd69f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.squashMoleculeInto (cognitive 16): main.squashMoleculeInto has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (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/bd/mol_squash.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a09f534bf9690d6bdcbc2fcc4299a7c3441565be68a16b1434c6794367118de"}},{"ruleId":"D2","level":"warning","message":{"text":"main.findStaleMolecules (cognitive 16): main.findStaleMolecules has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, 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/bd/mol_stale.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ba6eb7ac2f4a38e763ad58219cd733621870c77f868b10a89519fcf3408b86"}},{"ruleId":"D2","level":"warning","message":{"text":"main.reportOrphans (cognitive 16): main.reportOrphans has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, 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":"cmd/bd/orphans.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c01b8c8a90c394cb72a8f2c3b3efc69697c2025731e925715d6080678b8181c"}},{"ruleId":"D2","level":"warning","message":{"text":"main.determineAutoRoutedRepoPath (cognitive 16): main.determineAutoRoutedRepoPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/routing_read.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"05c6f70853bce45442446ffc639160c1e5e49be017b7df5202c1dde36c22fdc7"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runServe (cognitive 16): main.runServe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 4). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into 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/bd/serve.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"a48b6ac1d0847a7a42346914e37260626e20d8247ddecd932cdbb241e9a361ca"}},{"ruleId":"D2","level":"warning","message":{"text":"main.updateGuardsFromFlags (cognitive 16): main.updateGuardsFromFlags has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, match/switch 2, 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/bd/update.go"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"c40d550a9c437d6cfb1a8c80feb853e5f78081b8f6c2d7a6da7939269f079605"}},{"ruleId":"D2","level":"warning","message":{"text":"main.acquireExclusiveWorkspaceGates (cognitive 16): main.acquireExclusiveWorkspaceGates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/workspace_gate.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa084838cd4cc184b9166686f02e7b44a3336532af82b422b57e337859a0f975"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runWorktreeList (cognitive 16): main.runWorktreeList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 4). 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, split the body into named stages: move each independent step or branch into 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/bd/worktree_cmd.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b1fa8b9152db604fb90dc3241cd5d20a58f7595d9da1d3107b5ebafa0957f12"}},{"ruleId":"D2","level":"warning","message":{"text":"main.resolveWorktreePath (cognitive 16): main.resolveWorktreePath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"cmd/bd/worktree_cmd.go"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"4265196e5a1f83a2625fc2a38c07514a6f696fcaadfbe2bf410fc171ec9f51f5"}},{"ruleId":"D2","level":"warning","message":{"text":"main.fingerprintWorktreeFilesystem (cognitive 16): main.fingerprintWorktreeFilesystem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, match/switch 1 (nesting depth added 5). 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 1043). 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/bd/worktree_cmd.go"},"region":{"startLine":1040}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42b65be82b96904176c5d8714da79c9490eb7e7efcf410a2d277b08a9174779"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.CheckPermissionsWithStore (cognitive 16): doctor.CheckPermissionsWithStore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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/bd/doctor/installation.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"933158e026112935642f0e3209bb784d5ca1c9f111a77f6bf8ccd57803fd7037"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkStaleDatabases (cognitive 16): doctor.checkStaleDatabases has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/server.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b5e59a8901b92a0230a4e1d53f202cf4bd0016302bb1ee95b3d8cda58f8aded"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.DetectActiveHookManager (cognitive 16): fix.DetectActiveHookManager has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/hooks.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86a02a7d83c544c6f4dd1a1eef8c67591c17f3480ba8f0779d26776debb9f6c"}},{"ruleId":"D2","level":"warning","message":{"text":"fix.importJSONLIntoStore (cognitive 16): fix.importJSONLIntoStore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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/bd/doctor/fix/migrate.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"607b6eac75bf8aa15e5680a10286e41a264377b4af925957b0a5c8a68904e4f3"}},{"ruleId":"D2","level":"warning","message":{"text":"uowMolReader.GetMoleculeLastActivity (cognitive 16): uowMolReader.GetMoleculeLastActivity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_port.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"3baef8cdf508dee29bf4fa3e7f6db23d52747a82c03a1812564c50175862f2e0"}},{"ruleId":"D2","level":"warning","message":{"text":"setup.RemoveCursor (cognitive 16): setup.RemoveCursor 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":"cmd/bd/setup/cursor.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ae0495f8922b8588881018d895146a48e898e2e7cc248d805f428675084aebf"}},{"ruleId":"D2","level":"warning","message":{"text":"config.findOrCreateNestedScalar (cognitive 16): config.findOrCreateNestedScalar 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":"internal/config/yaml_config.go"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"2637a7cb563e3e929b6891977e30747db57b9469220e559214fa8ded4ef6e716"}},{"ruleId":"D2","level":"warning","message":{"text":"doltserver.parseDoltProcessPIDs (cognitive 16): doltserver.parseDoltProcessPIDs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, 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":"internal/doltserver/doltserver_unix.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"9390cc739a91443857e22276e21776358dad339f3bf325dc71c67d5c94ba6c71"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.validateLoopSpec (cognitive 16): formula.validateLoopSpec has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/formula/controlflow.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ae5793b2fc5fbf14bf7b70dc9807ed6b3257c9024e05fcb6d0430fb9d2fb3e"}},{"ruleId":"D2","level":"warning","message":{"text":"formula.chainExpandedIterations (cognitive 16): formula.chainExpandedIterations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/formula/controlflow.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f0b78f61733e412486b699f2ddf832a29e2bb88bc2975093a2085076182382"}},{"ruleId":"D2","level":"warning","message":{"text":"schemagen.Parse (cognitive 16): schemagen.Parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"internal/formula/schemagen/schemagen.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"4769ab53c307b13dd1ab6b10aef36053addb1339d2d06b7c54940af7fbeb3341"}},{"ruleId":"D2","level":"warning","message":{"text":"schemagen.collectFields (cognitive 16): schemagen.collectFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"internal/formula/schemagen/schemagen.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"379799fb4b58d2de90c6dd186b24aaf37869c2fc5d86198ec1d76a75a45bb798"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.FetchIssues (cognitive 16): Client.FetchIssues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, 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":"internal/github/client.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"be408074d36c2269b97e24e4faf50bd8983087b13bd243786ab91996a114e621"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.FetchIssuesSince (cognitive 16): Client.FetchIssuesSince has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, 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":"internal/github/client.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"f219670d4cbd8670895089d1bdc2224cdca3cf198b2ead879b0132fc2cc503cc"}},{"ruleId":"D2","level":"warning","message":{"text":"Tracker.findParentStoryGID (cognitive 16): Tracker.findParentStoryGID has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/gitlab/tracker.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5b571114236f49e394fe82a29738d69c2f7bdede76a6ab0cc8d88dd1a0a187"}},{"ruleId":"D2","level":"warning","message":{"text":"jira.DescriptionToPlainText (cognitive 16): jira.DescriptionToPlainText 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":"internal/jira/client.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f2ef75ec952cf740ad1f6e956c5244aebb5660c662074400dd54615fc134d44"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.doRequest (cognitive 16): Client.doRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3 (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":"internal/notion/client.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cce62bb65f5eaf77b5fb43f47c2802506acafe62005557e64d25f8da18c9427"}},{"ruleId":"D2","level":"warning","message":{"text":"Evaluator.buildLabelPredicate (cognitive 16): Evaluator.buildLabelPredicate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 1, match/switch 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 824, 836). 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":"internal/query/evaluator.go"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe4a4d4bb4e7cdcc6fc4779bf0d5465580db7c433d02c29a42b434454251b03"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.clearOwnSpawnMarker (cognitive 16): proxy.clearOwnSpawnMarker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"8028dd83c89157f849221a989bd8e5c1537ea395c3dc7b56212c251d69b90216"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.ListFederationPeers (cognitive 16): DoltStore.ListFederationPeers 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":"internal/storage/dolt/credentials.go"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"b58b8a1cd3a85476545fae372f230ca7a431cc6356a485fa84e69739d92b580a"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.UpdateIssueChecked (cognitive 16): DoltStore.UpdateIssueChecked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 282, 261). 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":"internal/storage/dolt/issues.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"0db889701c82939dfafdb96bb0b55be6c0134c2a153202d18fd7bd1dcbb0d21f"}},{"ruleId":"D2","level":"warning","message":{"text":"DoltStore.autoResolveConflictsAfterCLIPull (cognitive 16): DoltStore.autoResolveConflictsAfterCLIPull has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (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":"internal/storage/dolt/store.go"},"region":{"startLine":4040}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d8761c314c5e8ffbdefe0e51990a28d3efef4155181eae821f2b0ad06273c11"}},{"ruleId":"D2","level":"warning","message":{"text":"dependencySQLRepositoryImpl.queryDeps (cognitive 16): dependencySQLRepositoryImpl.queryDeps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/db/dependency.go"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"2902a57502bb612ca4a215423b81fed334684644e5d448ba5aedc8d6eaccac4e"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.NextCounterID (cognitive 16): issueSQLRepositoryImpl.NextCounterID 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":"internal/storage/domain/db/issue.go"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d51364d06629f02299758a566b17490b2b8e2b6019cbf7304b2b2eb580674eb"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.DeleteByIDs (cognitive 16): issueSQLRepositoryImpl.DeleteByIDs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/db/issue.go"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"b97947e1b4f0a5801df7cde3b3fbc811708964adc43c2666c9161bd4e8d3f68e"}},{"ruleId":"D2","level":"warning","message":{"text":"issueSQLRepositoryImpl.getDescendantIDs (cognitive 16): issueSQLRepositoryImpl.getDescendantIDs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 136). 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":"internal/storage/domain/db/ready_work.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8960d751c77bc0193cc176908187fce0547bda10a8c9c8c8223f0d9b15edba"}},{"ruleId":"D2","level":"warning","message":{"text":"beadsDirFSRepositoryImpl.WriteProjectGitignore (cognitive 16): beadsDirFSRepositoryImpl.WriteProjectGitignore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/fs/beads.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"b76ffd16ed27b9995f68268287179e799b695e9cf372e3541c1eb826baea0ae7"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetDescendantIDsInTx (cognitive 16): issueops.GetDescendantIDsInTx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 167). 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":"internal/storage/issueops/blocked.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f06934988fc1b1ce8848ca2119e0b232843b7a9848288a6c1527590641b6fa"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.loadWaitersWhoseSpawnerIsParentOfInTx (cognitive 16): issueops.loadWaitersWhoseSpawnerIsParentOfInTx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":730}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb516d25ac402d0081e901cf562e17187de2d9b35726f64b54cf33d13a2b2d1a"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.CountIssuesByGroupInTx (cognitive 16): issueops.CountIssuesByGroupInTx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/count.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ab846b388aa386a93e354aca3f1102ed12cc04ce968517ed54184a713982b65"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GenerateIssueIDInTable (cognitive 16): issueops.GenerateIssueIDInTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/helpers.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a45ae427b002099e086e5bc20dda91ce91b569cf072d24e225219aad291d530"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.searchTablePatternBT (cognitive 16): issueops.searchTablePatternBT has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 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":"internal/storage/issueops/search.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7471b3ef034b9f181d64da63e334ad83a0f04205e8b617f550d90703d9590f"}},{"ruleId":"D2","level":"warning","message":{"text":"issueops.GetStaleIssuesInTx (cognitive 16): issueops.GetStaleIssuesInTx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/stale.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"290ef0d5a2663fe1b8740f04dfdb8e6bc828c060dbf1796e3763410b0ebe5804"}},{"ruleId":"D2","level":"warning","message":{"text":"versioncontrolops.dependencyConflictsAreAuditOnly (cognitive 16): versioncontrolops.dependencyConflictsAreAuditOnly has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, 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":"internal/storage/versioncontrolops/mergesettle.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59b9c2dc74dee2e2e9014995eec926d8f8c1e9ada07724c00cccc04c3bdb4bf"}},{"ruleId":"D2","level":"warning","message":{"text":"tracker.appendFilteredDependencies (cognitive 16): tracker.appendFilteredDependencies 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":"internal/tracker/engine.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"180b6c2e78aaeb164a57d5d08af57ff820a2d4cd259244c28638879228ab5e61"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DoltStore: TooManyMethods \u2014 332 methods, declared across 32 files: dolt/store.go (93), dolt/issues.go (24), dolt/dependencies.go (23), dolt/credentials.go (22), \u002B28 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/store.go"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9c37fca468e72ae170ba3809354e793344ecaabe0db305cbf84d28dbe00e1ce"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dolt/store.go: FileTooLong \u2014 1998 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/store.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"447ca6f4cacb355e9112949a66f9947ab9b3927cc52bc53891ca2bde9f0a3e90"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/worktree_cmd.go: FileTooLong \u2014 1594 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/worktree_cmd.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f577195f247330e82dd69b7672b509922ce572b7a2eedbcbc6fb9b46ff6656f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: InstrumentedStorage: TooManyMethods \u2014 91 methods, declared across 9 files: telemetry/storage.go (75), telemetry/batch_closer.go (2), telemetry/commenter.go (2), telemetry/dependency_editor.go (2), \u002B5 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement storage.Storage (79 of 91 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/telemetry/storage.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44c21268c7c8674855fe9b09b94f5cf71a591b03297985e4e555a3a602ccfec"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/init.go: FileTooLong \u2014 1493 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3346dbb89133fd73beaedf9c8009e2a13901b1437e1f5d6a304f3bffcd4a0614"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/dolt.go: FileTooLong \u2014 1363 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dolt.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aec295268842be55c6204d72cfcfcbd76a3281be542af208eb4d7f9dd0d6ead"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: issueUseCaseImpl: TooManyMethods \u2014 80 methods, declared across 2 files: domain/issue.go (70), domain/issue_delete.go (10). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement domain.IssueUseCase (56 of 80 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/issue.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b6cef61bb6b1ad01f8d64c1eea257e34a900b671529f5632ec321bad5ebb334"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: issueSQLRepositoryImpl: TooManyMethods \u2014 69 methods, declared across 6 files: db/issue.go (43), db/issue_search.go (10), db/issue_search_counts.go (7), db/ready_work.go (5), \u002B2 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/db/issue.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e9a6028dc806245dbcd69d46dfe75e0abc1a8445e80d66e4fc05eecb9d0b43"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/info.go: FileTooLong \u2014 1122 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/info.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1886509c7615b3b4ef7f95aad3835f6bd114c62d45152bd3c1816392b610102"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: domain/issue.go: FileTooLong \u2014 1120 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/issue.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"68d1ca47cac09a5133d87b2f37d8028fca86dab491b1fbeda4d8c8b7e70ecb24"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/main.go: FileTooLong \u2014 1075 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/main.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a06a3bf26ba779ae25bb1fe69d1d8e287b4d3a813977db517e0ddd87bbaedc2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: types/types.go: FileTooLong \u2014 1028 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/types/types.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d5a57e3aa5dc38928af4f146ca5bcd0c2798af84f565883bb81805078248b18"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/dep.go: FileTooLong \u2014 957 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dep.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb54b8ace66cfd46a06dc32037332379ef0f37ce4f3f26eb170d766cd266125e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tracker/engine.go: FileTooLong \u2014 956 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tracker/engine.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07c6d7860019dedd3701d75c5e5024dd362a4fa7564dfdb891027d959163092"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: conformance/issue_operations_contract.go: FileTooLong \u2014 955 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11dac7fc91a56a19430cf71c65f2667e4a852d021264a85c4bed73635f0572ff"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: doltserver/doltserver.go: FileTooLong \u2014 941 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/doltserver/doltserver.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"018a055ff4d511695f1fad1f3f4347b934946c05518c317b8fd1a762df47ee68"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/hooks.go: FileTooLong \u2014 920 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/hooks.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d961c7e2b35b75cea1f9a01ce7691dca4bb8f872cda481be43ae43cbab2fc1f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Evaluator: TooManyMethods \u2014 52 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/query/evaluator.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"54aba624fb9cc7d86bdf0a3c24b7f80ffb6206b7c87d5195ea20bed530765dc2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: conformance/conformance.go: FileTooLong \u2014 822 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/conformance.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a36f9a0ac3cf10fddf74221935f5505e5ff00a0656c5201a622f6d81d4424f1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/linear.go: FileTooLong \u2014 797 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/linear.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"33ac393bbc7713def18953ad6212d92ca6b08fcaea6fcc71075a0f8a587c1698"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/graph_apply.go: FileTooLong \u2014 783 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph_apply.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fdb28e27adf85501c5f7236fa95e24784f728adf7ab110c3e1fa970ddee894e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repro-dolt-prod-timeouts/main.go: FileTooLong \u2014 775 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro-dolt-prod-timeouts/main.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cdc63cc9c7dc1b4aec8bbb8271d8f6e74901c8e17501df7fefaa253271eef42"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: conformance/reader_contract.go: FileTooLong \u2014 755 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/reader_contract.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac551add2fddcaf522a20d7c6747bd7474f47fcbd465a9125c6a2ebaa5b651ed"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: query/evaluator.go: FileTooLong \u2014 753 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/query/evaluator.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b5aa0171f4aa0f9e58e292e7c063389838ec1c5c5f9da8bff0d2476fc36520"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: schema/schema.go: FileTooLong \u2014 740 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/schema/schema.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5375feb09ba4298b2699b5a2a5676ff2a9dff19c0ef84cfdf885065679b4f2b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: conformance/batch_closer_contract.go: FileTooLong \u2014 734 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/batch_closer_contract.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a155358c19b894e51f9cbe0ebbf243d32cea8aae6b4c4774b6017964333c52b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/doctor.go: FileTooLong \u2014 734 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"93cee9af4e1b5fbde654e4de9592aaf0268a828bb7ffeb6a0cecc113e70832cf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dolt/transaction.go: FileTooLong \u2014 734 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/transaction.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c35cec3c27f95e18bd856ab4d0e72fc09ab27c97da0c4002e5bfb335227a917"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: doltTransaction: TooManyMethods \u2014 44 methods. Most of these members implement storage.Transaction (34 of 44 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/transaction.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44423508fae7f9da560261fa3e822029c6b327772ceeebecfab429d324423fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/swarm.go: FileTooLong \u2014 733 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/swarm.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ece831efc966c00feffbea83471ce6fdafae0ade3a4bbe94800da9f591e1cfd7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/graph.go: FileTooLong \u2014 727 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e297e794a17f63e08b07da44701c40b6afe6f9e7ca08640a7e7f1f44f087f6c0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: proxy/endpoint.go: FileTooLong \u2014 727 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dbproxy/proxy/endpoint.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fad6516205a3147dc813f243e0719c2f3443113d8e83d8062e8f79034a0b17f4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: linear/client.go: FileTooLong \u2014 724 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linear/client.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a93ff13d938bbcb98e0462183ef46956af677404dde3881a039be0ff8b8f4249"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: conformance/dependency_editor_contract.go: FileTooLong \u2014 683 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"49a94c12f770c76420429825becde7ec2cd40dedca76f7a2ec761ad7a837e392"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: db/issue.go: FileTooLong \u2014 670 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/db/issue.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ea202ec898f8510ae711fdafa666fbf1cf118852ddb5db3667f5a93cebadba5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: issueops/dependencies.go: FileTooLong \u2014 659 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"40f8a7f6321a1ca0919489a19a4e06068a9fa7fb7c16f591a625499bbd1c4e4b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/create.go: FileTooLong \u2014 651 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: createCmd (45-660). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/create.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71992c2c9de11e2ee14b783ed3f29fdf32b7661a4f6ce36341a3bb2f5ae55686"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/gate.go: FileTooLong \u2014 629 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/gate.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85c4c55baa2247822458ed7ae60a8014e80a643cfbd4cc66119556b09495a79"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: issueops/create.go: FileTooLong \u2014 629 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/create.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"edc45fed43d37c634cfcedaf43cd73077c786d5bd18dec4d4308b50d63f82e59"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/config.go: FileTooLong \u2014 615 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ed30b66208819f300d892ad1ab2d81ea382b5d074902b46f57ed5ab4a631f2f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: beads/beads.go: FileTooLong \u2014 611 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/beads/beads.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e5bc6ddaf0e2e653dd02cecef17b08f1b5d43f265bbf4818427df5f3995259f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: issueops/dependency_queries.go: FileTooLong \u2014 608 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcfe4a174017854f485a58e61a12e1c37c25ac88d614febd29fe9e7ee567dec5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/compact.go: FileTooLong \u2014 603 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/compact.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ce0ca244b5ab5236b792539534ba2ccb2cbbfcae0efb78fcb30248a7671a7a7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/update.go: FileTooLong \u2014 598 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/update.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fda14cc00cb1a796e1d6348462f1c798dee8e4f0c794f8d0fba7e755e7284df"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/ado.go: FileTooLong \u2014 591 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/ado.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a22cbd562d2a2c6c670d6a5d4a429889832f1cee4733eb55df70b560fb2c57d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/bootstrap.go: FileTooLong \u2014 591 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/bootstrap.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0043688589045cf5fa2c2539b3039ac942fe73f7b9866d99763218aa9a383b4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/sync_push_pull.go: FileTooLong \u2014 589 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/sync_push_pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f267cfd420b0b45ee34e1fb59791b3d6c261ed9b49a60ed1a4ca9f9cfebcd077"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/cook.go: FileTooLong \u2014 586 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/cook.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8040c59258d813a2ad584ca4f960d35da7f0888728e0f395b9bef34e39eb11bf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: issueops/update.go: FileTooLong \u2014 584 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/update.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71b95daa8d2bd555232e7c4d98fe47e701ce4fa295c4d3cb4fa1c2ff46e6c6e9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: dependencyUseCaseImpl: TooManyMethods \u2014 35 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/dependency.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f49540a3db7ea73dc2f8d53479ed81ad4feb01f6f204d8048a176726fe87018"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/gitlab.go: FileTooLong \u2014 580 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/gitlab.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd63b999e1af4bf1191fc712b174f8289fc5e14c6ffa0c13bcb55f534b2eed1d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/import_shared.go: FileTooLong \u2014 572 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/import_shared.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3572c8725e0747ee90a806761210a100d3390fce51a69459b1ff47de2422db73"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HookFiringStore: TooManyMethods \u2014 34 methods, declared across 9 files: storage/hook_decorator.go (26), storage/hook_batch_closer.go (1), storage/hook_commenter.go (1), storage/hook_dependency_editor.go (1), \u002B5 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/hook_decorator.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"25370dd3a9824486219432bf94e96396adeaaf0bb2a4178e15a5085348c4c206"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: doctor/git.go: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/git.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"538ad840aaf9f3e0f430b07ccb06a02ee84f523fa9cb979feab13cbb87c5b70a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/config.go: FileTooLong \u2014 564 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/config/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f55f5c9b7f232b4454852d318af718c59d65dc567702cb1ab21eb7ba1fa99b1c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/rules.go: FileTooLong \u2014 561 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/rules.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"748cbff23e923f3574958a696f86984d37d910e133e3678cbec4c045c675f7e8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/wisp.go: FileTooLong \u2014 560 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/wisp.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"77f6fdb0f0e642ad7acd5b95c4d590ea05b902579ad8ce00e83f5ad6e632a172"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: db/dependency.go: FileTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/db/dependency.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"40e56d27d339602a028c643c1f2f78f76f39974f4586aaf26621e497ef04cfec"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/migrate.go: FileTooLong \u2014 554 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f50bb84b5b203c1013774a38553ea5dd23d6f43a5f06759264ea73c26a6b6dc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/preflight.go: FileTooLong \u2014 552 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: preflightCmd (38-613). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/preflight.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5258da476b0d18b2bf4f56c818f38477f79cc8fe8630d326bd2a4b458aa4c21f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Server: TooManyMethods \u2014 33 methods, declared across 4 files: httpapi/server.go (19), httpapi/reads.go (6), httpapi/claim.go (5), httpapi/handlers.go (3). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/httpapi/server.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1e1904ca1f1d24dd8158d237be39c2897cf31932bf3da6519100916ef137ed3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: linear/mapping.go: FileTooLong \u2014 524 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linear/mapping.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d7e7e62efda281dd42596bb7e3e4995af1eb4d0e3be0e7d376d09bc1d453447"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: doctor/agent.go: FileTooLong \u2014 523 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/agent.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca1022115a520af7e04c9608740ae16e5479bbc0154302b79b540959164a9c8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/prime.go: FileTooLong \u2014 522 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/prime.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbcdc4ee8fc07f900c27ae3bd4be5466d7d6a38e68a846dce84ff3e17055d660"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: telemetry/storage.go: FileTooLong \u2014 522 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/telemetry/storage.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"836b2cc18551128427d64e20328c915ece4f4c3e293cb8c347fc2c7a51a888a0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/sync.go: FileTooLong \u2014 520 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/sync.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c45667cadede35d75610c3787f262b4a3ae6a6c36966a6b07f5316e61513df0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bd/notion.go: FileTooLong \u2014 510 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/notion.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebfd1aea1a28d2d31b3c36fce1992a59ab090c3ac333c2561dc886b57f56e4d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): internal/storage/issueops/scan.go:91-116 | internal/storage/issueops/scan.go:272-296 \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 \u0060internal/storage/issueops/scan.go:91\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/scan.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"59fde47b53b40e7c802056858d21ef2e3fb84d1df002c07bf03682741e54d361"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): cmd/bd/init_git_hooks.go:215-234 | cmd/bd/init_git_hooks.go:281-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 \u0060cmd/bd/init_git_hooks.go:215\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/bd/init_git_hooks.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"668091edc0c1387930f1f1d2e0c069c861f6477fe842e1964c0021ef08be3772"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): cmd/bd/import.go:242-260 | cmd/bd/import_shared.go:1000-1021 \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/bd/import.go:242\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/bd/import.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b18c0e5845c6092b6aa8360beef99abebf607ab0f6ec27ec1428333e8f90306"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): internal/gitlab/client.go:259-277 | internal/gitlab/client.go:319-337 \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 \u0060internal/gitlab/client.go:259\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":"internal/gitlab/client.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab80110aee827267bf657f611a313e9f54f1e8e1e8a8db76e81df245bc439e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): internal/linear/client.go:474-492 | internal/linear/client.go:568-586 \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 \u0060internal/linear/client.go:474\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":"internal/linear/client.go"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d1075f23f8a13b254725673f6fbf072dfed483eee6df3f9145a0b8aa3a9fbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): cmd/bd/cook.go:444-461 | cmd/bd/cook.go:847-864 \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/bd/cook.go:444\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/bd/cook.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce51e8c9dd062a77181ddd2144f17cc6034fe3e34669ca9d6bfacd81d3d87e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/ado/bootstrap.go:87-104 | internal/ado/bootstrap.go:180-197 \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 \u0060internal/ado/bootstrap.go:87\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/ado/bootstrap.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b902e0277e7f3968599499d676e2adb369380043a7124a367adf77150cb5bae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/beads/beads.go:902-921 | internal/beads/beads.go:1197-1214 \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 \u0060internal/beads/beads.go:902\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":"internal/beads/beads.go"},"region":{"startLine":902}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f955950a50738163afd0fa52a5b59d64c5e0c85db8e57a14e115200a7e252b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): cmd/bd/doctor/claude.go:433-451 | cmd/bd/doctor/claude.go:500-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 \u0060cmd/bd/doctor/claude.go:433\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/claude.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc34e428f3d96d94dcd2a306ed17a6b24da84848b397b6cdaf41e7a9338e780"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): cmd/bd/doctor/fix/hooks.go:175-191 | cmd/bd/doctor/fix/hooks.go:299-315 \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/bd/doctor/fix/hooks.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fix/hooks.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"4065d3ec0ececadeec87d12476add35e6572a19975cfc8fedab9814d24eeb374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): cmd/bd/gitlab.go:784-800 | internal/tracker/engine.go:1533-1554 \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/bd/gitlab.go:784\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/bd/gitlab.go"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"a18e2597c371e7ae64b25881871358bc099b98c1d944eb845ea6d6a6c26c525a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/ado/tracker.go:340-356 | internal/github/tracker.go:250-266 \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 \u0060internal/ado/tracker.go:340\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":"internal/ado/tracker.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"142fa0b43e751c0683ae0c180621a1df4f60f235b1c6c4d8898a93e83e8d58b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/github/client.go:239-256 | internal/github/client.go:288-304 \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 \u0060internal/github/client.go:239\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":"internal/github/client.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"8396a2e1f14c826e4a0c2ab332832ed617ba58f5f907118b2574f335690150c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): cmd/bd/doctor/fix/validation.go:76-92 | cmd/bd/doctor/fix/validation.go:176-192 \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/bd/doctor/fix/validation.go:76\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/bd/doctor/fix/validation.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc2422a902f92214304da6695df1c5a1472a95ea36e9c027493a2cd519ad91f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): cmd/bd/doctor/git.go:83-99 | cmd/bd/doctor/git.go:151-167 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/doctor/git.go:83\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/bd/doctor/git.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"449ef6b9913a94b3f87a287a1b8a42ac586ab27f2ed017807f895fc471e70a51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): internal/formula/condition.go:492-507 | internal/formula/condition.go:511-526 | internal/formula/condition.go:530-545 \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":"internal/formula/condition.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b6a7df6cda0f78f9fabe6961ac9693db3941ca103278a318c0a53f51766b25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): cmd/bd/doctor/dolt.go:651-666 | cmd/bd/doctor/fix/metadata.go:260-275 \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/bd/doctor/dolt.go:651\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/bd/doctor/dolt.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"722b0fa1c8dc2d5adebdda3344c803058c7ee9a59018961cec669fae707bb4b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): cmd/bd/github.go:207-222 | cmd/bd/gitlab.go:240-255 \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/bd/github.go:207\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/bd/github.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"84dd92125eb1c7f759cc4424762d6525d0b51a33d36977434a86df9d9e3cc6ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/storage/issueops/scan.go:228-243 | internal/storage/issueops/scan.go:400-415 \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 \u0060internal/storage/issueops/scan.go:228\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":"internal/storage/issueops/scan.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb2bc218ec3d843ee6636b6d987659e2628b8c4e07f760b6a34db8a2ae345db3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): cmd/bd/setup/claude.go:688-702 | cmd/bd/tips.go:332-346 | cmd/bd/doctor/claude.go:238-252 \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 \u0060cmd/bd/setup/claude.go:688\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/bd/setup/claude.go"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a53c1b5474a6d9a21b833257117304cdf8ae183d631ff193a30b5d8ebaee21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/bd/graph.go:1147-1161 | cmd/bd/graph.go:1233-1247 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph.go"},"region":{"startLine":1147}}}],"partialFingerprints":{"codehealthFindingId/v1":"111c313bd159fc50bf895d2aec64b48909e60488ff01a3bf4900884987365cef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/bd/graph_apply.go:1219-1233 | internal/storage/domain/issue.go:1476-1490 \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/bd/graph_apply.go:1219\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/bd/graph_apply.go"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08de65f70df3ad29d5e4052b07230b7c041dbe3ac777e7990b68deff67cfac1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/bd/mol_burn.go:159-173 | cmd/bd/mol_proxied_server.go:587-601 \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/bd/mol_burn.go:159\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/bd/mol_burn.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"db88562a50e128eb1f497a8d310f77d3857ab573aa7a56cd24c4a36382448ae5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/github/mapping.go:163-177 | internal/gitlab/mapping.go:168-182 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/github/mapping.go:163\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":"internal/github/mapping.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a5c052bc4270b9baf89d839ff76ae776a5d038ed5c8c2df13c8d055e3088c8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/bd/doctor/claude.go:265-279 | cmd/bd/doctor/claude.go:793-807 \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/bd/doctor/claude.go:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/claude.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"abf998a4e4dedc1ace9b7c9b1d94518a9fb059e4ec503e3e9b4a9666e10cb0cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/bd/kv.go:66-80 | cmd/bd/memory.go:205-219 \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/bd/kv.go:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/kv.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"e221bd36279ff3f71be45dcb09b9e116243b069844d2e5a82a54bf3170e2f027"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/bd/doctor.go:525-539 | cmd/bd/doctor.go:1007-1020 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor.go"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"51bd9eae2c4646dc4bd3c2cb637a42aa2d13a394c6ecd9d0fad7e5dd20bdf34b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/bd/graph_apply.go:1199-1212 | internal/storage/domain/issue.go:1446-1459 \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/bd/graph_apply.go"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"69583cd82e85211dda180c9621fe7d413fd9f30b38a38b3261711f8c4cecd00c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/bd/linear.go:383-396 | cmd/bd/jira.go:165-178 \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/bd/linear.go:383\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/bd/linear.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee26ef4b3cebda0bd4cd940d20ff10ae117a17b09efaac5cd7f2f0c77c3c3bf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/bd/purge.go:436-449 | cmd/bd/purge_proxied_server.go:334-347 \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/bd/purge.go:436\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/bd/purge.go"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b30986f99f33c699d5da218b3dce4d851bdf277965bc131d4c18643b665e9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/bd/sync_push_pull.go:460-473 | cmd/bd/sync_push_pull.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 \u0060cmd/bd/sync_push_pull.go:460\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/bd/sync_push_pull.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44f5d27e9bb9fa2c0d873958dcd7693dab3a1f4a5763f6626ba6bece4b5e40d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/github/mapping.go:26-39 | internal/gitlab/mapping.go:23-37 \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 \u0060internal/github/mapping.go:26\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":"internal/github/mapping.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dd7e637ea1326d99cd7e6e2d3cd369eb087c1b42ed53afb3cd88d5bfb32c58d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/github/mapping.go:99-112 | internal/gitlab/mapping.go:101-114 \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 \u0060internal/github/mapping.go:99\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":"internal/github/mapping.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"b683921ba244892551d1c25363a963651fc02cfbf83bba4625deaea1abf86c2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/storage/dbproxy/util/dsn.go:26-39 | internal/storage/doltutil/dsn.go:26-39 \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 \u0060internal/storage/dbproxy/util/dsn.go:26\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":"internal/storage/dbproxy/util/dsn.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"83103b358d60503e7103efc5b9c32cfbc8bbed6a77498fe6bd06d46faa21e4ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/storage/dolt/store.go:3076-3089 | internal/storage/issueops/commit_pending.go:49-62 \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 \u0060internal/storage/dolt/store.go:3076\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":"internal/storage/dolt/store.go"},"region":{"startLine":3076}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca59fc68d5252c8226970a4ffe21f6a6105171d9203ad6a0c56ae74b0e2a2da2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/bd/doctor/claude.go:603-616 | cmd/bd/doctor/version.go:216-229 \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/bd/doctor/claude.go:603\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/bd/doctor/claude.go"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c53b3b9b1987e38f30fba4e6425f2228681f2ccdd60636c74560f69bbca4619"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/bd/duplicate.go:67-80 | cmd/bd/duplicate.go:137-150 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/duplicate.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3d0c95acebc9afd34fa7b0e6c12459dc65569d06493255bac7254a63360cecd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): cmd/bd/setup/claude.go:359-371 | cmd/bd/setup/claude.go:704-717 | cmd/bd/tips.go:348-361 | cmd/bd/doctor/claude.go:254-267 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/setup/claude.go:359\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/bd/setup/claude.go"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52ba5e844f0d1ad118e3aff435a28a1fb62d9c0239a72cb3f8fa044a35168ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/gitlab/tracker.go:569-581 | internal/jira/tracker.go:345-357 | internal/linear/tracker.go:707-719 \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":"internal/gitlab/tracker.go"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dc52fcd6889e438c72f9e2497d436a1b45e5e3f12dcae20680e293cfb811866"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/defer_proxied_server.go:85-97 | cmd/bd/defer_proxied_server.go:151-163 \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/bd/defer_proxied_server.go:85\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/bd/defer_proxied_server.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"6297d659a3f4868e0e2f0a5ba436386b357e00236ea1b3c8346dde36dca8ba59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/doctor.go:1182-1195 | cmd/bd/doctor.go:1209-1221 \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/bd/doctor.go:1182\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/bd/doctor.go"},"region":{"startLine":1182}}}],"partialFingerprints":{"codehealthFindingId/v1":"634a5013d501eb541911755819aace6d455b2267b64a7bac365ced62836672db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/mol_proxied_server.go:159-171 | cmd/bd/mol_proxied_server.go:314-326 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_proxied_server.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e90a23de3fba350427e19c3daec18e62ab6d3ee64d4dab241f94fc26524a73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/mol_show.go:76-88 | cmd/bd/mol_show.go:431-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 \u0060cmd/bd/mol_show.go:76\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/bd/mol_show.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f0917de7e4a53e93adddde30177172fd56cd7a6b9128add88b35eeaf3cdeef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/mol_show.go:496-509 | cmd/bd/template.go:693-705 \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/bd/mol_show.go:496\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/bd/mol_show.go"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"8946b2ffa78718f20531fa8a2a47f94b37fb36668c0fdde0acda79d3cb9f0ec1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/purge.go:351-363 | cmd/bd/purge_proxied_server.go:258-270 \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/bd/purge.go:351\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/bd/purge.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fd91b707e46811a24c38971e006c966c2fc2a68bdb21c50bf3b24ba5b355ea9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/setup/claude.go:541-553 | cmd/bd/setup/gemini.go:299-311 \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/bd/setup/claude.go:541\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/setup/claude.go"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff14b1def25b0c1a25306ed04c6db28a9886b388dbc465833d98142c890f976"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/worktree_cmd.go:281-293 | cmd/bd/worktree_cmd.go:472-484 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/worktree_cmd.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"44ab31200b61517961c513b524617c60a0390eca6b7937fc8001d41ba38d2a2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/gitlab/client.go:165-177 | internal/jira/client.go:415-427 \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 \u0060internal/gitlab/client.go:165\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":"internal/gitlab/client.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"e581bb4e949eee4ec0b0943b806f9fe59cb4b39f7af286403db9932c5bd24227"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/linear/client.go:511-523 | internal/linear/client.go:605-617 \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 \u0060internal/linear/client.go:511\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":"internal/linear/client.go"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cc4df36c8b6c09df64d32c47af8f6c5f794c11a92d060552016853535fe7343"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/storage/domain/db/dependency.go:670-682 | internal/storage/domain/db/dependency.go:714-726 \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 \u0060internal/storage/domain/db/dependency.go:670\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":"internal/storage/domain/db/dependency.go"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f140a812e83f08bf5be5ccff03d83a92b0cb75f9456ca5fa380b5a16b2b4224"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/storage/issueops/scan.go:199-211 | internal/storage/issueops/scan.go:375-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 \u0060internal/storage/issueops/scan.go:199\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/scan.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"fba435f89d77eff103cebec0f706831385da795c578bafec0abaeb216384bccb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/types/types.go:358-370 | internal/types/types.go:427-440 \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 \u0060internal/types/types.go:358\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":"internal/types/types.go"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1dc2ca497d88f78ee2a1949d945bacfa1852ed8ca12afac38a245a525cdea35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): scripts/repro-dolt-prod-timeouts/main.go:430-442 | scripts/repro-dolt-prod-timeouts/main.go:475-487 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/repro-dolt-prod-timeouts/main.go:430\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":"scripts/repro-dolt-prod-timeouts/main.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b0385efdb1205b058d3ad306aaf5f03669bcf924d18cdf27b731bc13f943fe5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): scripts/repro-dolt-prod-timeouts/main.go:849-862 | scripts/repro-dolt-prod-timeouts/main.go:984-996 \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 \u0060scripts/repro-dolt-prod-timeouts/main.go:849\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":"scripts/repro-dolt-prod-timeouts/main.go"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"c664d363da5210d7e485375079658f3000ce1171ca08437725febd4ab8abc1fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/compact.go:386-398 | cmd/bd/compact.go:610-623 \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/bd/compact.go:386\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/bd/compact.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"be4ad25970d485e06e65d42a6438b56a3a592ddfd4834746aa44009185f6dabc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/doctor/gitignore.go:329-341 | cmd/bd/doctor/gitignore.go:693-705 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/gitignore.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a508d6c97e5d738de3673f90045b6eec4cea6d82967e21b16bbdac719084c35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/bd/doctor/role.go:20-34 | cmd/bd/doctor/role.go:44-56 \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/bd/doctor/role.go:20\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/role.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"868e7030087fca74a316e945e3e5cd0e35e0154de9f5a7419fdb5e130d76b5bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): cmd/bd/close_proxied_server.go:407-418 | cmd/bd/gate_proxied_server.go:187-198 | cmd/bd/reopen_proxied_server.go:159-170 | cmd/bd/update_proxied_server.go:526-537 \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/bd/close_proxied_server.go:407\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":"cmd/bd/close_proxied_server.go"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0e6cfb495928f467d8685fd8bffaeb9523a7bf815a039d6e59562ecc8eef7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): cmd/bd/sync_push_pull.go:327-338 | cmd/bd/sync_push_pull.go:658-669 | cmd/bd/sync_push_pull.go:811-822 | cmd/bd/sync_push_pull.go:919-930 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/sync_push_pull.go:327\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/bd/sync_push_pull.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a3d990784ff70a95b727976799b64bc8e84a1bd9e8919b4b906855293d30f4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): internal/storage/issueops/blocked_merge.go:301-312 | internal/testutil/testdoltbranch.go:270-282 | scripts/bench-ready-indexes/main.go:221-232 | scripts/repro-dolt-prod-timeouts/main.go:809-820 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. 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":"internal/storage/issueops/blocked_merge.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc51e7f059e1b555d71f58a2e5051edf08fa8c4555c4efba1cfa745f50123215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): cmd/bd/github.go:524-536 | cmd/bd/gitlab.go:879-891 | cmd/bd/notion.go:570-581 \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/bd/github.go:524\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/bd/github.go"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"c24b14a31ef467299ace6696c4b53e8593346844303ed64a34c88a76768e817f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): cmd/bd/migrate.go:457-468 | cmd/bd/migrate.go:586-597 | cmd/bd/migrate.go:680-691 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/migrate.go:457\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/bd/migrate.go"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffbae5586f6ecaa2612c1de893654482c40a12771cad1f65d1a97c0fcae40a53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/ado.go:286-297 | internal/storage/domain/db/config.go:201-212 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/ado.go:286\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/bd/ado.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a0eb1981b36281493654d314740ae22d3b60ccef528b7824f1cacccf7c9d5dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/batch.go:368-379 | cmd/bd/batch_proxied_server.go:96-107 \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/bd/batch.go:368\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/bd/batch.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"71bf0704dcb337fdf4aee757c702a40e51f4555e16efb2158eaae79191193ec6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/batch.go:426-437 | cmd/bd/batch_proxied_server.go:167-195 \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/bd/batch.go:426\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/bd/batch.go"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"74364b0c0e212b740cbcf2d199f7367627a180eeeff350eee11e97a735b10421"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/doctor.go:1253-1265 | cmd/bd/doctor.go:1280-1291 \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/bd/doctor.go:1253\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/bd/doctor.go"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1eec4d6b76478dd798aef3efba6aa86a469ee1857439fd6425d050ae2d42a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/doctor_validate.go:172-183 | cmd/bd/doctor_fix.go:96-109 \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/bd/doctor_validate.go:172\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/bd/doctor_validate.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fc9fa4621641b0e9ec8b39a461251afdae45ea20cb31de7cf9882cc7699a627"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/export.go:278-289 | cmd/bd/export_auto.go:494-505 \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/bd/export.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/export.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"1acdf19cb1127a036f2b393baa8c8e036155d0b2510a2139cacfa904ca0379fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/gitlab.go:591-603 | cmd/bd/sync_push_pull.go:748-759 \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/bd/gitlab.go:591\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/bd/gitlab.go"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"94da8af8282cea9bdb14609dc819d13aafc358cc1a2d3bd28ba67679125b30ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/hooks.go:126-139 | cmd/bd/hooks.go:360-371 \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/bd/hooks.go:126\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/bd/hooks.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae60b426e35de14eb6a81885ecb4472dd7438d8ada2c62055dcb28a12b40dc6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/import.go:274-285 | cmd/bd/import_shared.go:1036-1052 \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/bd/import.go:274\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/bd/import.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc2cf657cdba48759fdfc3c921acd6b45faa3b3eaa9a2e451192e081deddc9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/mol_burn.go:194-206 | cmd/bd/mol_proxied_server.go:627-638 \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/bd/mol_burn.go:194\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/bd/mol_burn.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"fccf075bedc7cc67d5e2d867574ad264a41fb0afe46f63fd225eda9d20b5c6da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/mol_current.go:287-298 | cmd/bd/mol_current.go:369-380 \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/bd/mol_current.go:287\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/bd/mol_current.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5859e058013df2b76dcab31f014dd910c90dbd7bd0e34598933fd4efee5ca88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/notion.go:316-327 | cmd/bd/notion.go:355-366 \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/bd/notion.go:316\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/bd/notion.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"3af54d9357d2f7417dec105a34aa74a1a6bcea61e6cc7b99d2af4b900d701b52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/purge.go:132-143 | cmd/bd/purge_proxied_server.go:203-214 \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/bd/purge.go:132\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/bd/purge.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"660c46e3631b890c7ed1766b9147ea1367bf09ed3fc96a0d13b88e95f35a9e31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/purge.go:313-324 | cmd/bd/purge_proxied_server.go:226-237 \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/bd/purge.go:313\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/bd/purge.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"21fda113381bb1db8601b7e41c5533ad31750247ffef6c24462cf69c1a2eba99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/rules.go:309-320 | cmd/bd/rules.go:337-348 \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/bd/rules.go:309\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/bd/rules.go"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d5b37800e03542fcd04e248e9e277cc2b254943ee6c9d387b19d7b3207da63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/setup/claude.go:281-292 | cmd/bd/setup/gemini.go:147-159 \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/bd/setup/claude.go:281\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/setup/claude.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"03de9e465c131b5460682b63b1e7a386595df01495cb33cc9fd64e6d70bd9273"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/setup/claude.go:478-490 | cmd/bd/setup/gemini.go:255-266 \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/bd/setup/claude.go:478\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/bd/setup/claude.go"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bfe1edc21c2fc679f6f722ab92273105b78476e10ea014c0e8f0e557e5784d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/sync_push_pull.go:843-854 | cmd/bd/sync_push_pull.go:897-908 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/sync_push_pull.go"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef8a0bc2f5ede6020d33f5649fef78aecff025a4387c47f56e3b489288f4d6b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): format/format.go:20-31 | cmd/bd/list_format.go:51-65 \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 \u0060format/format.go:20\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":"format/format.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7c3d274be4924af9d184b3940a6d2011220e1f6a305d0fe2445519a6475007"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/doltserver/doltserver.go:507-518 | internal/doltserver/doltserver.go:593-604 \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 \u0060internal/doltserver/doltserver.go:507\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":"internal/doltserver/doltserver.go"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"331e2650b8c6fcc1f250b5fc4c1c48f1da422f8e110383461f002e7c604e4a83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/github/tracker.go:289-300 | internal/gitlab/tracker.go:614-625 \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 \u0060internal/github/tracker.go:289\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":"internal/github/tracker.go"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"342200231c98b4367d3b55b91100ad029bce760ce2a0a0c21e543da14aa1280c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/dolt/credentials.go:337-348 | internal/storage/dolt/credentials.go:380-391 \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 \u0060internal/storage/dolt/credentials.go:337\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/credentials.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"c67e3f91d0619354161f47f64392e39c86fe838b12e64afbba8af4fbbb98a23a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/domain/config.go:274-285 | cmd/bd/doctor/version.go:277-290 \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 \u0060internal/storage/domain/config.go:274\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":"internal/storage/domain/config.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"402baa818621be8ed338bfeb563eb9243690cec2abba4e9a9250492a546eadd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/domain/db/issue.go:629-640 | internal/storage/issueops/helpers.go:288-299 \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 \u0060internal/storage/domain/db/issue.go:629\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":"internal/storage/domain/db/issue.go"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c8479f725ec35905d2bbae2af7b31830b957c2b01b4d73f51711163b22a6aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/domain/db/ready_work.go:181-192 | internal/storage/issueops/blocked.go:212-223 \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 \u0060internal/storage/domain/db/ready_work.go:181\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":"internal/storage/domain/db/ready_work.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"020dfb44b091567a4cdcaecf25f45de8d3d9c4fbf97c6d562b6797082eb4486a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/issueops/blocked_merge.go:224-235 | internal/storage/versioncontrolops/mergesettle.go:683-695 \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 \u0060internal/storage/issueops/blocked_merge.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. 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":"internal/storage/issueops/blocked_merge.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4eda3887052c2c8ca7665f1b107b2a302277bf5d892e4bfb17c8684e639632b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/issueops/dependencies.go:1143-1154 | internal/storage/issueops/dependencies.go:1206-1217 \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 \u0060internal/storage/issueops/dependencies.go:1143\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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1143}}}],"partialFingerprints":{"codehealthFindingId/v1":"782f731e9e8065a980abf1530e25f63492fb6bcb0ec6814cf653d8176ff05e2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/schema/schema.go:918-929 | internal/storage/schema/schema.go:953-964 \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 \u0060internal/storage/schema/schema.go:918\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. 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":"internal/storage/schema/schema.go"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48edf92c9115f6d9e88a6a76400234348fe706d21229fdc8adc71fefcbb5c72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): scripts/repro-dolt-prod-timeouts/main.go:519-530 | scripts/repro-dolt-prod-timeouts/main.go:583-594 \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 \u0060scripts/repro-dolt-prod-timeouts/main.go:519\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":"scripts/repro-dolt-prod-timeouts/main.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"09f6c3ff067f9eb7e7720110fdf79d0afb372a0e1c6736cc747df81fe0f96cca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/doctor/claude.go:669-680 | cmd/bd/doctor/cursor.go:105-116 \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/bd/doctor/claude.go:669\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/bd/doctor/claude.go"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a87e3d6b0815825a929e38489fc13e9a87d5820962fa8157e16c252285386d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/doctor/installation.go:47-58 | cmd/bd/doctor/installation.go:101-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/installation.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"e639a9c945d3fa29e0044904ed65a01ad8134531acc8def1ae476d92eac490d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/doctor/tracked_runtime.go:113-125 | cmd/bd/doctor/tracked_runtime.go:228-239 \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/bd/doctor/tracked_runtime.go:113\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/bd/doctor/tracked_runtime.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"f54a3576f4c76ed8624cf7afed09c598f4ddd96ec75d3a3ffb59bf119b0cd811"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/init_contributor.go:37-48 | cmd/bd/init_contributor.go:68-79 \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/bd/init_contributor.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"db4c6a9de56a4f4fb7f93927ef9f82f1be26f2b80010926ec0ae58f146b48b85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/bd/label.go:45-56 | cmd/bd/label_proxied_server.go:82-94 \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/bd/label.go:45\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/bd/label.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e6942de163f7d926f69844660a96d0e1bdbade1be121daea729ae0c803f344"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): cmd/bd/sync_push_pull.go:247-257 | cmd/bd/sync_push_pull.go:577-587 | cmd/bd/sync_push_pull.go:675-685 | cmd/bd/sync_push_pull.go:828-838 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/sync_push_pull.go:247\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/bd/sync_push_pull.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe87e8ab529ad07ee993dd32df2492152c60dc18d106c13494582477ea5203b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): cmd/bd/sync_push_pull.go:294-304 | cmd/bd/sync_push_pull.go:625-635 | cmd/bd/sync_push_pull.go:778-788 | cmd/bd/sync_push_pull.go:882-892 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/sync_push_pull.go:294\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/bd/sync_push_pull.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"01e29548995433a2a4e5548a624d55ea8448e4ae47ba333d4d5fa51560ca788b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): cmd/bd/bootstrap.go:590-600 | cmd/bd/bootstrap.go:617-627 | cmd/bd/bootstrap.go:648-658 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/bootstrap.go:590\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/bd/bootstrap.go"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf3cd92647bf9815748049635784046abeeb3d8a4e70af11172aca00261dd3ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): cmd/bd/doctor/artifacts.go:433-443 | internal/beads/beads.go:697-710 | internal/beads/beads.go:728-738 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/doctor/artifacts.go:433\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/bd/doctor/artifacts.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"45436a7c720c536f47d1cf3c417366de7509e179430778e8f944659edda66991"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/ado/client.go:264-274 | internal/gitlab/client.go:164-176 | internal/jira/client.go:414-426 \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 \u0060internal/ado/client.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ado/client.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f9cadd0e7b6c94bde821be41170c2e6e8a35b5d0d2a35a625042e21cfbf3d3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): backend/conformance/dependency_editor_contract.go:92-102 | backend/conformance/dependency_editor_contract.go:1000-1010 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060backend/conformance/dependency_editor_contract.go:92\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"f328c4bac76d0f4dcb844547c3c069f97c985e66ee4648cecd8dc1299ce85a70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): backend/conformance/dependency_editor_contract.go:413-423 | backend/conformance/dependency_editor_contract.go:500-511 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4797b27c18db47012ee2219f475f221b0f74abd9761b04bde812436ddf2025d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): backend/conformance/dependency_editor_contract.go:726-736 | backend/conformance/dependency_editor_contract.go:1098-1108 \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 \u0060backend/conformance/dependency_editor_contract.go:726\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":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":726}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7a34b85fff8494c6f8a790ac4c034460c89211851a559b0330386421273a7f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/batch.go:383-396 | cmd/bd/batch_proxied_server.go:120-130 \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/bd/batch.go:383\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/bd/batch.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"5225b1e9bcdf97af43a577a0a03560e08e5494df84894b5916294f94548d4d3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/codex_hook.go:68-78 | cmd/bd/cursor_hook.go:73-85 \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/bd/codex_hook.go:68\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/bd/codex_hook.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4a7b171a76e893635bce04a6d270a84d92c1bac4cc4c78e609d6b8c6ea4223"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/cook.go:182-192 | cmd/bd/cook.go:721-731 \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/bd/cook.go:182\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":"cmd/bd/cook.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb30c6412620cb581e7476dbe572993a75c6d8832d5683bcc4accb02c8b93a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/cook.go:1039-1049 | cmd/bd/formula.go:446-456 \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/bd/cook.go:1039\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/bd/cook.go"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"61ad931ec910b0c0e0abe3fce2ddaf0a2e41343899a7633725625320ad502fe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/doctor/artifacts.go:350-360 | internal/beads/beads.go:114-124 \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/bd/doctor/artifacts.go:350\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":"cmd/bd/doctor/artifacts.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"8997169c3f9401236bbe10476484ac36363964064d2cf4dd53255d5810c5661d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/linear.go:442-452 | cmd/bd/jira.go:182-192 \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/bd/linear.go:442\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/linear.go"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"1671f79cd80d3d2a77ad8fa3a315c247c6b627391f22df2dc8021e5a5838a5f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/mol_bond.go:408-418 | cmd/bd/mol_bond.go:436-446 \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/bd/mol_bond.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. 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/bd/mol_bond.go"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"85cca64d01329707baf91c5166ca32109cf191328df039f633f80c9e2241adda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/purge.go:227-237 | cmd/bd/purge_proxied_server.go:38-48 \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/bd/purge.go:227\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/bd/purge.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"28fe6325e1b13a77e5e7f1192d4f9cf413131dc2a78780ec420cfaa556992a2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/purge.go:407-417 | cmd/bd/purge_proxied_server.go:314-324 \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/bd/purge.go:407\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/bd/purge.go"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaacaefebd3eeafc76d490ebb415ee0c6d66e236eae2e922629749fdeb3e03b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/rename_prefix.go:359-369 | cmd/bd/rename_prefix.go:443-454 \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/bd/rename_prefix.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":"cmd/bd/rename_prefix.go"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"f768b39ca1e11b8242e637dd568f08700721223597e1a15a455b380b98b230fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/setup/claude.go:659-669 | cmd/bd/doctor/claude.go:133-148 \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/bd/setup/claude.go:659\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/bd/setup/claude.go"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"8291bc814ce4228ef36cc6231983920632d4267f45743fb5130dfa133f295a7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/show_proxied_server.go:559-569 | cmd/bd/show_proxied_server.go:596-606 \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/bd/show_proxied_server.go:559\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/bd/show_proxied_server.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7fe6cd68c9f6101bbe2696528d7d9dc8b198d2a5d1f669ad35560b8e2840c32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/sync_push_pull.go:261-271 | cmd/bd/sync_push_pull.go:308-318 \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/bd/sync_push_pull.go:261\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/bd/sync_push_pull.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"163df1a5bff16e86e37e40f40b98d51c804e207d6c3dc42ae60510221d1e3a8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/sync_push_pull.go:344-354 | cmd/bd/sync_push_pull.go:439-449 \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/bd/sync_push_pull.go:344\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/bd/sync_push_pull.go"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c2214d2d11069fc7a65cbfb0912654a69ce3809957c53cc459389cd0a78d79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/sync_push_pull.go:361-371 | cmd/bd/sync_push_pull.go:408-418 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/sync_push_pull.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e5656b94a86385b8933f70c72b08eec9faa87a766b486460e3347f50fe99d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/sync_push_pull.go:591-601 | cmd/bd/sync_push_pull.go:639-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/sync_push_pull.go:591\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/bd/sync_push_pull.go"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"a28eec5bdd69c4dacaecf2b385920492235a74bef5e95a363ca7115e31366d81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/sync_push_pull.go:689-699 | cmd/bd/sync_push_pull.go:792-802 \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/bd/sync_push_pull.go:689\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/bd/sync_push_pull.go"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"3634fcc91f13082e02fa4f27b0ee8d8eee035fa76bc28b63948c3b401e0d5b36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/beads/beads.go:1182-1193 | internal/beads/beads.go:1213-1223 \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 \u0060internal/beads/beads.go:1182\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":"internal/beads/beads.go"},"region":{"startLine":1182}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a249860c2d7a2f41700eb6af728b844e79517edf8327ce89dc71faa090a3511"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/github/client.go:323-333 | internal/gitlab/client.go:352-362 \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 \u0060internal/github/client.go:323\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":"internal/github/client.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"159a2160b5bc8b6b8803ccfdf1adaa69ddd49439b406b27850255ceeee35db68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/github/client.go:339-349 | internal/gitlab/client.go:368-378 \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 \u0060internal/github/client.go:339\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":"internal/github/client.go"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb49a7336cc2938f13b102a4fd05e75ad545f8a0d73c5f285013fa234d9fbe6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/linear/client.go:1059-1069 | internal/linear/client.go:1178-1188 \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 \u0060internal/linear/client.go:1059\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":"internal/linear/client.go"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3b8eab667fb393d04f956f33d72644324f54d64b25ba191638c220f826e7d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/dolt/transaction.go:491-501 | internal/storage/sqlbuild/ready.go:151-164 \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 \u0060internal/storage/dolt/transaction.go:491\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":"internal/storage/dolt/transaction.go"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"b06a215ddad1414f134aaa1c158115547afe5dd9588d9299cefeb8aff5326274"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/issueops/blocked_state.go:574-584 | internal/storage/issueops/blocked_state.go:833-843 \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 \u0060internal/storage/issueops/blocked_state.go:574\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":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f508664cedc2c4337b7437738853f8138aa659fb3d8b835744ec62b3921046d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/issueops/dependencies.go:1118-1128 | internal/storage/issueops/dependencies.go:1239-1249 \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 \u0060internal/storage/issueops/dependencies.go:1118\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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1118}}}],"partialFingerprints":{"codehealthFindingId/v1":"432b8ebc973734f948efb3abd6f157c80253519c68e44b7acfb49e2d77e29ff9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/issueops/dependencies.go:1181-1191 | internal/storage/issueops/dependencies.go:1272-1282 \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 \u0060internal/storage/issueops/dependencies.go:1181\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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"83bf7189f8618730657cdcbb74882bb821b23f0235beb68114f6fc71feb59871"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/schema/schema.go:857-869 | internal/storage/schema/schema.go:1500-1510 \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 \u0060internal/storage/schema/schema.go:857\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":"internal/storage/schema/schema.go"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8703dbd4f352379a3157a7647a6ea93456cbdbfce16414dfc2031b8b562cfa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/bd/migrate_dolt_mode.go:27-37 | cmd/bd/migrate_dolt_mode.go:49-59 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/migrate_dolt_mode.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"2413ca23fe0d1c1ff88390d050fe4366e4bc4bca089ff80fa926fd8fd3018b55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): cmd/bd/linear.go:804-813 | cmd/bd/notion.go:614-625 | cmd/bd/jira.go:214-223 \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/bd/linear.go:804\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/bd/linear.go"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d2bfc6dedd42c0b97fe5710b864f8fd7c05a7d1f233543b413b250dd0b441fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/jira/tracker.go:100-109 | internal/jira/tracker.go:111-120 | internal/jira/tracker.go:122-131 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/jira/tracker.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f79746fab2d4ce8e06d02a68e452e81c283ac6cf4de89a697c74b607bf97d18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/batch.go:438-447 | cmd/bd/batch_proxied_server.go:196-205 \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/bd/batch.go:438\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/batch.go"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"891a376b29dc8641a6f756609d291fd7eeb479403f0a35c19a14d9f6ca952e2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/defer_proxied_server.go:73-82 | cmd/bd/defer_proxied_server.go:139-148 \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/bd/defer_proxied_server.go:73\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/bd/defer_proxied_server.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"6694149afa205807096883ec9cb41e80d1ec45c1ffb681bcf95034efdfd4e602"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/dep.go:166-175 | cmd/bd/dep_proxied_server.go:143-152 \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/bd/dep.go:166\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/bd/dep.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"f35199005632eac15553e1daf713db9a30860a022b8c06bdf014e2a3163c7b8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/dep_proxied_server.go:163-172 | cmd/bd/dep_proxied_server.go:232-241 \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/bd/dep_proxied_server.go:163\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/bd/dep_proxied_server.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a63a0f2972de3320831ce1581431dd703276956b492172abbcd961de16a4da6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/doctor/dolt.go:255-265 | cmd/bd/doctor/dolt.go:295-304 \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/bd/doctor/dolt.go:255\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/dolt.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd54d78b79e6433eed2da44283e63528b1ff4f6c0c61970775dba7ab0c8d7fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/gate.go:852-861 | cmd/bd/gate_discover.go:291-300 \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/bd/gate.go:852\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/bd/gate.go"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"a40c9f33f4acc71ec58f788d502dc768241d53c05004df9dd9c9b67f836aa2d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/import_shared.go:679-688 | cmd/bd/import_shared.go:799-808 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/import_shared.go"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbb308db0778d36ccab132be60ed2d7891860c9f710745e7b8a1afea43fac179"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/linear.go:249-258 | cmd/bd/linear.go:263-272 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/linear.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"87e931da26c197c1a3378a7e85318ee2f1f96120d9988fd570e9370002cdae90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/bd/list_input.go:202-211 | cmd/bd/ready_input.go:138-147 \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/bd/list_input.go:202\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/bd/list_input.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"486aed34c840d1feba1ccfce7b5ac0c06741f142ebeb70e73d4a3a07c51503b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): format/format.go:131-140 | cmd/bd/list_format.go:142-151 \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 \u0060format/format.go:131\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":"format/format.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"03989639d9d14df62b223f9ad4c7d0885e3ca280e7b9b55e2995f2acea06cc5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/linear/mapping.go:402-411 | internal/linear/mapping.go:420-429 \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 \u0060internal/linear/mapping.go:402\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":"internal/linear/mapping.go"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"263d87d9af987bf4ddc51e1ea8b627b2c90cc0f6696e9e72b5a79264ec13bae1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/query/evaluator.go:653-662 | internal/query/evaluator.go:665-674 \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 \u0060internal/query/evaluator.go:653\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":"internal/query/evaluator.go"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"317401ecb5225a6a8de6139b9e33843c8d85c51048659b3f918cd9a614d4f7d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/dolt/store.go:3109-3118 | internal/storage/issueops/commit_pending.go:76-85 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/store.go"},"region":{"startLine":3109}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b2fe33b067d786d46fc6f7d6a90b3abdc232a31833e4fb1a73fcfd800ce9fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/domain/db/events.go:51-60 | internal/storage/domain/db/label.go:198-207 \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 \u0060internal/storage/domain/db/events.go:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/domain/db/events.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c89cdcdbce2a65d2f124ec4cee99e0eedb282591a4144dfce694c302d7377b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/domain/db/issue.go:657-666 | internal/storage/issueops/create.go:475-484 \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 \u0060internal/storage/domain/db/issue.go:657\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":"internal/storage/domain/db/issue.go"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"be4d1c20a5ed0c97c31a961c0489fa30ba7389542689826b7ecc1fbcabb879c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/issueops/dependencies.go:860-869 | internal/storage/issueops/dependencies.go:894-903 \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 \u0060internal/storage/issueops/dependencies.go:860\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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52892270c1369d9792365f6a958c2715974038ab0e7c8462e4ad05c7f2fa283"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): cmd/bd/setup/claude.go:349-357 | cmd/bd/setup/claude.go:691-702 | cmd/bd/tips.go:335-346 | cmd/bd/doctor/claude.go:241-252 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/setup/claude.go:349\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/setup/claude.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df21d01e18df59b92cb308d7664f30af76fa38ca432edfdd0915501c68a9bda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/storage/domain/db/comment.go:34-42 | internal/storage/domain/db/comment.go:71-79 | internal/storage/domain/db/label.go:147-155 \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":"internal/storage/domain/db/comment.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0cf8ec42babbbc4d27bd73036a3d06fa8b9fbe8809d50aa2575e2f1b8fc8735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/storage/issueops/dependency_queries.go:452-460 | internal/storage/issueops/dependency_queries.go:596-604 | internal/storage/issueops/dependency_queries.go:668-676 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeceb4f15d02167cae08f237edf8e2bd8924acc28f66f3baadff5196ea53fb21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/conformance/batch_closer_contract.go:1010-1018 | backend/conformance/batch_closer_contract.go:1049-1057 \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 \u0060backend/conformance/batch_closer_contract.go:1010\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":"backend/conformance/batch_closer_contract.go"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ef337aee62bba33115b8e78a16fe42f08590e67ff1d1e817071d9b75d75cb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/conformance/dependency_editor_contract.go:1146-1154 | backend/conformance/relations_contract.go:684-692 \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 \u0060backend/conformance/dependency_editor_contract.go:1146\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":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":1146}}}],"partialFingerprints":{"codehealthFindingId/v1":"adbe0cbd6283cf54f07fe827f969813de0f363207c2f7ce9f0b431d10446f3b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): backend/conformance/reader_contract.go:1439-1447 | backend/conformance/reader_contract.go:1453-1461 \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 \u0060backend/conformance/reader_contract.go:1439\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":"backend/conformance/reader_contract.go"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ee66fc3b09f402e1de5d0e7be3766152d8df945728a3b15ccaab0d3bc5221f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/batch.go:357-365 | cmd/bd/batch_proxied_server.go:71-79 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/batch.go:357\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/bd/batch.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2980d9bcdd390c30e96f4b709ecb184bbf7a302cf31f521adc44da0c7781d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/cook.go:202-210 | cmd/bd/cook.go:741-749 \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/bd/cook.go:202\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/bd/cook.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"07e1d6fc292d66f13db592104b238443647fc1879c3bdb850a94b89bc85dc72f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/dep.go:1437-1445 | cmd/bd/dep_proxied_server.go:417-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 \u0060cmd/bd/dep.go:1437\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/bd/dep.go"},"region":{"startLine":1437}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f0209aca4a539fe327b8d8aba743d9064de0a98ca0c8877ce56c04b0f819d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/doctor/deep.go:155-163 | cmd/bd/doctor/validation.go:436-444 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/deep.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac3ad3af8c9ab44dd33181ece4723ac249df8d01c063297fe1870e168f2c45e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/doctor/dolt.go:66-74 | cmd/bd/doctor/server.go:324-332 \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/bd/doctor/dolt.go:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/dolt.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9dabf89fb178d9f23dc908ff00afe2b30296c955d798f5ed80368de8a7378b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/doctor_agent.go:35-43 | cmd/bd/doctor_agent.go:45-53 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor_agent.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"821866ce398df245d9c733d8ec8ba382f40da5fd1f9a5e72fdd2be4ec26ead52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/gate.go:911-919 | cmd/bd/gate.go:963-971 \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/bd/gate.go:911\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":"cmd/bd/gate.go"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"e23a1e1bb42cc747c2c64c877a3cb342326aa751c0383179472c736f7f6ac9bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/gitlab.go:816-824 | internal/tracker/engine.go:1515-1523 \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/bd/gitlab.go:816\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/bd/gitlab.go"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"e746f4bb03a3383c79d28650ccf618315e08d4cdcd94bcbca59cb4a5384ba8d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/graph.go:392-400 | cmd/bd/graph.go:406-414 \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/bd/graph.go:392\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/bd/graph.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"157a6721408bcb2d393f3dbdf2b58628701e215bd12721998bd352b6686962de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/graph.go:421-429 | cmd/bd/graph.go:498-506 \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/bd/graph.go:421\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/bd/graph.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"282aaa24d23027989f62442674621e03ceb88d003680be7e5d25ca8470be9aed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/linear.go:222-230 | cmd/bd/jira.go:103-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/linear.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12be3f4cfe8bec1060c45a919b6be5b9709de610efd9ccc5c05a286ab23c8d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/list.go:359-367 | cmd/bd/list_proxied_server.go:244-252 \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":"cmd/bd/list.go"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4f63f6a39e2298510d868c0387664993aeb30f7371ed6b5cb842a4bace6fcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/mol_bond.go:399-407 | cmd/bd/mol_bond.go:427-435 \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/bd/mol_bond.go:399\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/mol_bond.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"98fa7ed1be2f318c8c9b94422421816a8bff3c979ada597055086ca0212ac317"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/purge.go:122-130 | cmd/bd/purge_proxied_server.go:183-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/purge.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec0ff74f854a6198ea963cb3c23888c2f1ffd172975ffba533f9af746e5d494a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/setup/claude.go:229-237 | cmd/bd/setup/gemini.go:101-109 \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/bd/setup/claude.go:229\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/bd/setup/claude.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d8cb974e703a2fb6bd1352705357456e3b3bdcdfa97a7652cc3566ea42be9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/jira/client.go:373-381 | internal/linear/client.go:377-385 \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 \u0060internal/jira/client.go:373\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":"internal/jira/client.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbeed45117f7cd592e28e7829b61a20b7a84b4b5a4086e185de19c3f2993aba5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/linear/tracker.go:372-380 | internal/linear/tracker.go:407-415 \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":"internal/linear/tracker.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"63139478bd7c23fac745d708d0138cc70910f454355c2f0adfec7e23ad73c64e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/dbproxy/proxy/force_stop.go:111-119 | internal/storage/dbproxy/proxy/force_stop.go:137-145 \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":"internal/storage/dbproxy/proxy/force_stop.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f3546afaee2e35a86b5ee61e4f2ee9a458fcb9d52d9482f2e6159f104ddeb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/dolt/store.go:3121-3129 | internal/storage/issueops/commit_pending.go:88-96 \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 \u0060internal/storage/dolt/store.go:3121\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":"internal/storage/dolt/store.go"},"region":{"startLine":3121}}}],"partialFingerprints":{"codehealthFindingId/v1":"48d37ba56b2f72085f31b133a12719b3bc3a23c3ebca8f05c6311a74708b70f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/domain/adaptive.go:28-36 | internal/storage/issueops/helpers.go:387-395 \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 \u0060internal/storage/domain/adaptive.go:28\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":"internal/storage/domain/adaptive.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"9398289804928965ad5a0aa44482faf1b0c09fcf13a97ea83e24c585c65af262"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/domain/issue.go:1114-1122 | internal/storage/domain/issue.go:1170-1178 \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 \u0060internal/storage/domain/issue.go:1114\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":"internal/storage/domain/issue.go"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4923ddd76aa237827e52eba1fbc3e38c814d55f6d34e30943dde4250e944f67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/issueops/blocked_state.go:396-404 | internal/storage/issueops/blocked_state.go:429-437 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/issueops/blocked_state.go:396\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2e3308cced46538fc6651cd1292fef41a0fd9e5922792f400ede4cad354c393"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/issueops/blocked_state.go:457-467 | internal/storage/issueops/blocked_state.go:480-488 \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 \u0060internal/storage/issueops/blocked_state.go:457\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bf1311614dfda73592aef21fb9f4d196cb9a103b3598c7e5c265fcc4d039cd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/issueops/execution.go:266-274 | internal/storage/issueops/execution.go:296-304 \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 \u0060internal/storage/issueops/execution.go:266\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":"internal/storage/issueops/execution.go"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"129d4ce9d0d641b448f89c76daaafadc99b2de9d73789664cf193286f72f0d8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/issueops/update.go:911-919 | internal/storage/metadata.go:251-260 \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":"internal/storage/issueops/update.go"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"2609f0d7ad18c2fb382c1b57b3c320275b1c5dab96929f7e71141a9f1637a0e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/metadata.go:133-141 | internal/storage/metadata.go:156-164 \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 \u0060internal/storage/metadata.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":"internal/storage/metadata.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f39360293234909c56fb73caf7bd089946553896f69938cf57d4cde170dc89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/uow/issue_reader.go:119-127 | internal/workapi/storereader/reader.go:136-144 \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 \u0060internal/storage/uow/issue_reader.go:119\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/uow/issue_reader.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ae5d89c74908a2b0f96db28be897c9392710c80fce6749564bce7fc46a47ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/versioncontrolops/automerge.go:96-104 | internal/storage/versioncontrolops/conflicts.go:118-126 \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 \u0060internal/storage/versioncontrolops/automerge.go:96\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":"internal/storage/versioncontrolops/automerge.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c024b7c80f4017b4095dc69385ed27f47f8b0a54ad65fb7cbb9e09f6fac373"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/tracker/engine.go:1082-1091 | internal/tracker/engine.go:1153-1161 \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 \u0060internal/tracker/engine.go:1082\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":"internal/tracker/engine.go"},"region":{"startLine":1082}}}],"partialFingerprints":{"codehealthFindingId/v1":"f36e0ae1f2b49e530b1146a32d74faf9ddc7fd0a99d841f117a69bec34eaf892"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/doctor/fix/locks.go:56-64 | cmd/bd/doctor/locks.go:64-72 \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/bd/doctor/fix/locks.go:56\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/bd/doctor/fix/locks.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cdcf8bc014124166a5922547b0ae24b489ba1d874d4fc0cb17b8bb2feef377d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/bd/doctor_pollution.go:89-97 | cmd/bd/doctor_pollution.go:100-108 \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/bd/doctor_pollution.go:89\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/bd/doctor_pollution.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"2988227dbf2ba9d659b1404051f1fa73bea380a2687b746351cb1a3efede4cec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): internal/storage/issueops/dependency_queries.go:103-110 | internal/storage/issueops/dependency_queries.go:178-185 | internal/storage/issueops/dependency_queries.go:591-599 | internal/storage/issueops/dependency_queries.go:663-671 \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 \u0060internal/storage/issueops/dependency_queries.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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"7447cbc7454a0e4fc6b31684c78c0307cc63bf44631981b49ec56be2b7197229"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): internal/storage/issueops/dependencies.go:1038-1046 | internal/storage/issueops/dependency_queries.go:598-608 | internal/storage/issueops/dependency_queries.go:670-677 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/issueops/dependencies.go:1038\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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"37150fa8087757dcef20966bee84e07c3f3ae619becf55604f8e4262ddac978d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): cmd/bd/config_proxied_server.go:73-80 | cmd/bd/kv_proxied_server.go:79-86 | cmd/bd/memory_proxied_server.go:69-76 \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/bd/config_proxied_server.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/config_proxied_server.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f25fa128c97fe34dda55bb5b323e86ecbca4bdae39d9e22a6276e2c4cdd15e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/conformance/batch_closer_contract.go:668-675 | backend/conformance/batch_closer_contract.go:884-891 \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 \u0060backend/conformance/batch_closer_contract.go:668\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":"backend/conformance/batch_closer_contract.go"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"417c153705d8aa5d54bed96f20c2ba24bc0c6912531557a1a3df105abbe45050"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/conformance/issue_operations_staging.go:49-56 | backend/conformance/issue_operations_staging.go:121-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 \u0060backend/conformance/issue_operations_staging.go:49\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":"backend/conformance/issue_operations_staging.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1d137ed23c10d52926907c22bc0457e2e5e416052eff77b284bb0f714ffe56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): backend/conformance/ready_claimer_contract.go:218-225 | backend/conformance/ready_claimer_contract.go:303-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 \u0060backend/conformance/ready_claimer_contract.go:218\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":"backend/conformance/ready_claimer_contract.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"956cecf66e33cab9a9ad5c492cc939a06e13296a2e5a7238d6a1a07f4f0b84e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/ado.go:711-718 | cmd/bd/gitlab.go:608-615 \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/bd/ado.go:711\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/bd/ado.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"126e6e9a5bf0b1116c3babd3e477ab17934c730baa6b47c3d9501f7cdd456897"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/auto_import_upgrade.go:126-133 | cmd/bd/auto_import_upgrade.go:151-158 \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/bd/auto_import_upgrade.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c3d3474323db31b1c7bb178e827b88faf748171594f363005cef729f9baeee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/defer_proxied_server.go:39-46 | cmd/bd/defer_proxied_server.go:111-118 \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/bd/defer_proxied_server.go:39\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/bd/defer_proxied_server.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"d006beb517671d0595aed335ffb90037be53e1936037379c5d39cfba337b6743"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/dep.go:82-89 | cmd/bd/dep.go:101-108 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dep.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b5ff1e06d586608dc8537a2dcead80bc275d95d9c3d6564b1635de7b13bb007"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/duplicates.go:105-112 | cmd/bd/duplicates.go:120-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 \u0060cmd/bd/duplicates.go:120\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/duplicates.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1e602058f173cc3ef12580fa663906b3b7feea08e11bf5512b930d69f5fe31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/export.go:261-268 | cmd/bd/export.go:299-306 \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/bd/export.go:261\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/bd/export.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d40b2d1a28b82bedafaaa02d60b3113e605f2e71500481be933d05a0379a19a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/gate_proxied_server.go:275-282 | cmd/bd/gate_proxied_server.go:419-426 \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/bd/gate_proxied_server.go:275\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/bd/gate_proxied_server.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"39fa459d644f81811bfb5a0625c8b99d707b0cf707ea4d64bfb77f913035da3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/graph.go:375-384 | cmd/bd/graph_proxied_server.go:53-60 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e877ad80b5a41e5a998e027017a2d79a1f2dbc07d0ec8cad1b24d949fb1f9f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/graph_visual.go:290-297 | cmd/bd/graph_visual.go:302-309 \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/bd/graph_visual.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/graph_visual.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"335183c37b08811cbc4ff7899f5baf241f660078f93b27cc26c1af8c5ad03490"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/main.go:702-713 | cmd/bd/doctor/fix/migrate.go:244-251 \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/bd/main.go:702\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/bd/main.go"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"631bc60133827c9c583a18f20ec4597f9efb69d8276d55904631824e60c86697"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/mol_burn.go:274-281 | cmd/bd/mol_burn.go:342-349 \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/bd/mol_burn.go:274\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/bd/mol_burn.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d190867d57c30bfd8d1af776879c315448cf3f5e7100474afa1481be3a9f7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/bd/setup/claude.go:460-467 | cmd/bd/setup/gemini.go:227-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 \u0060cmd/bd/setup/claude.go:460\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/bd/setup/claude.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5cc90b7cb9757e4532a184f82b0d7c1b3c13bd455031011c108e6e308eae5b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): format/format.go:111-118 | cmd/bd/list_format.go:99-106 \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 \u0060format/format.go:111\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":"format/format.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"6979a07906c685fc86b912d02366eccc0ee5347dbbdd5162ffbdb452b741822b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/github/client.go:98-105 | internal/gitlab/client.go:134-142 \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 \u0060internal/github/client.go:98\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":"internal/github/client.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"b837cfbe3cba741d5288b4bb5526ba336dff388f75d3fa4e484d527a785a61a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/github/client.go:282-289 | internal/gitlab/client.go:313-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. 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":"internal/github/client.go"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4db62fb85d0411e292ee14352d3c996454886de3ee8325ea8dde4b079a22ba7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/gitlab/client.go:246-253 | internal/gitlab/client.go:306-313 \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 \u0060internal/gitlab/client.go:246\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/gitlab/client.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"28d3fe9a908b7e41434e4f826e399123a2fcf0c926fc5d44c661be1c0e60f48a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/dolt/store.go:4131-4138 | internal/storage/dolt/store.go:4148-4155 \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 \u0060internal/storage/dolt/store.go:4131\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":"internal/storage/dolt/store.go"},"region":{"startLine":4131}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d6220df5d2d99e09379e88925459c10ca0bb089ad3607674483e1badfcf67ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/domain/db/issue.go:74-81 | internal/storage/domain/db/issue.go:83-90 \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 \u0060internal/storage/domain/db/issue.go:74\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/storage/domain/db/issue.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"282bb960f95f0281b904698c0aa5219b2cc3527dd328939f296ad55042e7b14f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/domain/db/issue.go:146-153 | internal/storage/issueops/aggregate.go:130-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 \u0060internal/storage/domain/db/issue.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":"internal/storage/domain/db/issue.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21b90e9098f0419fcbd9bc67fc2f5f5d827c2c556a3d5b83f076aaeb41584ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/issueops/blocked_state.go:500-507 | internal/storage/issueops/blocked_state.go:518-525 \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 \u0060internal/storage/issueops/blocked_state.go:500\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":"internal/storage/issueops/blocked_state.go"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06096263fee3d19d2b9035606e1d2b9b3b9ad5a2a0c643bf101944deaf43ea2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/issueops/dependency_queries.go:806-814 | internal/storage/issueops/dependency_queries.go:867-874 \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 \u0060internal/storage/issueops/dependency_queries.go:806\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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8db6c211d523faf40a935cb98a7c96af1a5293a3dc3030385bb4ef57df49ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/issueops/ready_work.go:122-129 | internal/storage/issueops/ready_work.go:285-292 \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 \u0060internal/storage/issueops/ready_work.go:122\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":"internal/storage/issueops/ready_work.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"095807cf2af1b7a7b0c6b0a3d8cc89db40727e1e52f910adb152b5f943c860c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/issueops/scan.go:78-85 | internal/storage/issueops/scan.go:259-266 \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":"internal/storage/issueops/scan.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"41458d39d69e84c55f8703adb76a2edb8be3c53ff4b28ad91807b24cade27e35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/versioncontrolops/automerge.go:111-118 | internal/storage/versioncontrolops/conflicts.go:134-141 \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":"internal/storage/versioncontrolops/automerge.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef0ce52f32358a2cb20570519d006ae1aa63864de02e07982eb072038c204c6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/testutil/container_provider.go:31-38 | internal/testutil/testdoltserver.go:139-150 \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 \u0060internal/testutil/container_provider.go:31\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. 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":"internal/testutil/container_provider.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eb6085b9401a309931fc9ba7a4d99c2e9a8c1777f122bade6a92ff5f36bf57b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): internal/storage/domain/db/raw_sql.go:33-39 | internal/storage/schema/schema.go:777-783 | internal/storage/versioncontrolops/automerge.go:109-115 | internal/storage/versioncontrolops/conflicts.go:132-138 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/domain/db/raw_sql.go:33\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":"internal/storage/domain/db/raw_sql.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ef5e07fcca00c58d54608387071c6ff606c81b7d723885fb4351914cd8fef49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): internal/storage/hook_decorator.go:604-611 | internal/storage/hook_decorator.go:669-675 | internal/storage/hook_decorator.go:679-685 | internal/storage/hook_decorator.go:689-695 \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 \u0060internal/storage/hook_decorator.go:604\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":"internal/storage/hook_decorator.go"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"3685ac3ab74c14636ce80c9273ed26e1a8a9f2bac3d1c963f7c6a42c193dc6fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): backend/conformance/conformance.go:828-838 | backend/conformance/audit_molecule_wisp_batch_iter.go:92-98 | backend/conformance/audit_molecule_wisp_batch_iter.go:123-129 \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. 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":"backend/conformance/conformance.go"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd42c8fd0f5612ba5a98d80948c454134594ee898dde79b343cd33d372bc52f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/conformance/issue_operations_contract.go:46-53 | backend/conformance/issue_operations_contract.go:61-67 \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 \u0060backend/conformance/issue_operations_contract.go:46\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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa52924b0e12d1378ea5d46aca5a39c719550ed517b8b76b826f032b6b872ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): backend/conformance/ready_claimer_contract.go:158-164 | backend/conformance/ready_claimer_contract.go:546-552 \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 \u0060backend/conformance/ready_claimer_contract.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":"backend/conformance/ready_claimer_contract.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d05c2932eb4f32638c5a2a5ab8bafdca86c48b46a41d73f1fbd24ba467fb386"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/bootstrap.go:630-636 | cmd/bd/bootstrap.go:661-667 \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/bd/bootstrap.go:630\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/bd/bootstrap.go"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"2868838d496a9bbc5fcf565c9c2ed645ac0c4cec16b897fe8f48700516309918"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/cook.go:126-132 | cmd/bd/pour.go:77-83 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/bd/cook.go:126\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/bd/cook.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c704167c23c1d749adbdd387a1de3d37243fe4ff6c8b8890195ef52994d15c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/cook.go:194-200 | cmd/bd/cook.go:733-739 \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/bd/cook.go:194\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":"cmd/bd/cook.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d82c9e4002310fddfd62eb1a19905835df0faea9d10ba381cccafa3703f4d8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/create_input.go:249-256 | cmd/bd/update_input.go:223-229 \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/bd/create_input.go:249\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/bd/create_input.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"3beb29b8738fbad6378edd9ac27abf256b8d3a646cdf4f3d6eb582c4ad6a023a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/dep.go:546-552 | cmd/bd/dep_proxied_server.go:294-300 \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/bd/dep.go:546\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/bd/dep.go"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"d717819250e104d447fbcda6b09bc4b8bb8f4440217024e395616723d85a0fb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/export_auto.go:238-244 | cmd/bd/export_auto.go:544-550 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/export_auto.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"147c8db76a0622495ca281ce6e925e3ac86bf0424837ad422d580f5659bbceed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/export_auto.go:450-456 | cmd/bd/export_source.go:108-117 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/export_auto.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cba800be1f58051762300d490f270d97bb86bc96d4021555e284d65a2073285"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/graph_apply.go:211-217 | cmd/bd/graph_apply.go:233-239 \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/bd/graph_apply.go:211\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":"cmd/bd/graph_apply.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"a999c34c26d99c28d63a77e5a21f87b6747af53f511b97a3a79dc4bcfddad080"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/graph_apply.go:1119-1125 | internal/storage/domain/issue.go:1406-1412 \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/bd/graph_apply.go:1119\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/bd/graph_apply.go"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ac4d68991f29b76ca161b32c89d6974238de7ee1829df0219ef187c26d35618"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/bd/show_proxied_server.go:206-212 | cmd/bd/show_proxied_server.go:260-266 \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/bd/show_proxied_server.go:206\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/show_proxied_server.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c420c1651cfa4d4db2c83aea5b5a63068830143f36f43d00b612961de59d4b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/storage/dbproxy/proxy/server.go:465-471 | internal/storage/dbproxy/proxy/server.go:474-480 \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 \u0060internal/storage/dbproxy/proxy/server.go:465\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":"internal/storage/dbproxy/proxy/server.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"19c8311fad983efd35e19e2ecaff77f8d9d12e566cfd85545c02c0fdbd7d8fe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/storage/dbproxy/server/doltserver.go:273-279 | internal/storage/dbproxy/server/doltserver.go:282-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 \u0060internal/storage/dbproxy/server/doltserver.go:273\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":"internal/storage/dbproxy/server/doltserver.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"4adadcd0cd58dc888d95783ca6fb24fea29beeff47833a2b6dcacef814ec77ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/storage/dolt/store.go:3535-3541 | internal/storage/dolt/store.go:3628-3634 \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 \u0060internal/storage/dolt/store.go:3535\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":"internal/storage/dolt/store.go"},"region":{"startLine":3535}}}],"partialFingerprints":{"codehealthFindingId/v1":"02fce55c1710e9f4df77faebffbcab8353ce45422816617e91791b429faa342a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/storage/domain/db/dependency.go:639-645 | internal/storage/sqlbuild/sqlbuild.go:89-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. 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":"internal/storage/domain/db/dependency.go"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"735f1b6e487647370bc20e3492fae7a3f914eff4a39c8070498db5a47a651ead"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/storage/domain/db/issue_search.go:306-312 | internal/storage/domain/db/issue_search.go:337-343 \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 \u0060internal/storage/domain/db/issue_search.go:306\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":"internal/storage/domain/db/issue_search.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b19636fd398f999a4cd0bd95114a10a2cdae73bcdeeb7a8398bc753a86186d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/storage/issueops/aggregate.go:180-186 | internal/storage/uow/issue_operations.go:548-554 \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 \u0060internal/storage/issueops/aggregate.go:180\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/issueops/aggregate.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"340d67aa86991705bf368e50298e15dcca880cda5c29d296ba7fb7ed5d131622"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/storage/issueops/dependency_queries.go:730-736 | internal/storage/issueops/dependency_queries.go:1025-1031 \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 \u0060internal/storage/issueops/dependency_queries.go:730\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":"internal/storage/issueops/dependency_queries.go"},"region":{"startLine":730}}}],"partialFingerprints":{"codehealthFindingId/v1":"309a45e9676e82679b2cfcd7a675c112329f56807fc23805fc37227672411d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): backend/conformance/dependency_editor_contract.go:124-129 | backend/conformance/dependency_editor_contract.go:376-381 | backend/conformance/dependency_editor_contract.go:453-458 \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 \u0060backend/conformance/dependency_editor_contract.go:124\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":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"92a90ec4db131f8bbce76e3900ded6fb226c8328843fa47b748f76bafc5e31a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/conformance/batch_closer_contract.go:170-175 | backend/conformance/batch_closer_contract.go:771-776 \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":"backend/conformance/batch_closer_contract.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"e89fb76de6b1efce71a98ecb3eb69cbd8e308ff7f318b654564fb8d1b58d4df2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/conformance/dependency_editor_contract.go:66-71 | backend/conformance/dependency_editor_contract.go:835-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 \u0060backend/conformance/dependency_editor_contract.go:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f1fcb4e5d007620e1b0c1446a2d5cb8cd96419889445b36dfca93722e6cd15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/conformance/dependency_editor_contract.go:594-599 | backend/conformance/dependency_editor_contract.go:607-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 \u0060backend/conformance/dependency_editor_contract.go:594\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":"backend/conformance/dependency_editor_contract.go"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fe347a576560c2e032c53bb3db0cf5cbcc5830eeedf693b4f3f982bdee72e81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/bd/github.go:461-466 | cmd/bd/gitlab.go:604-609 \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/bd/github.go:461\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/bd/github.go"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b862a9bb71c3dd7d496a3f6b06aa31a9e0483afccabc6458ee7675b74532e54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/bd/import_shared.go:384-389 | cmd/bd/import_shared.go:427-432 \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/bd/import_shared.go:384\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/bd/import_shared.go"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"c381f5a19a322f0c135a6e252e069851a7737d35d2b7d86bfc27ea08908f0b06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/bd/list.go:390-395 | cmd/bd/list_proxied_server.go:280-285 \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/bd/list.go:390\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/bd/list.go"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"666216ad029c0f77f8e6d7fcc77605c6111470883395b1b048c022bfa9cd0155"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/bd/mol_proxied_server.go:111-116 | cmd/bd/pour.go:190-195 \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/bd/mol_proxied_server.go:111\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/bd/mol_proxied_server.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"7948874c71b7778f6d4cb426eeda4a22c40a0464ca5af5d2b26a865050d61c0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/bd/setup/claude.go:298-303 | cmd/bd/setup/claude.go:495-500 \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/bd/setup/claude.go:298\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/bd/setup/claude.go"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"1568a27b206dec52e7a8a426b45b06df2139982eb7d75f348e5d4f1e6e7cdd7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/linear/client.go:425-430 | internal/linear/client.go:916-921 \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 \u0060internal/linear/client.go:425\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":"internal/linear/client.go"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4518b60da049c4db2adcf3fc7c5b94dceb797635f4eefc28c676ee336836ba0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/notion/tracker.go:354-359 | internal/notion/tracker.go:376-381 \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 \u0060internal/notion/tracker.go:354\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":"internal/notion/tracker.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fce440290d51f3944a37c69cdd302ce2a2f791152a075b05576f5c25d0cf071"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/storage/issueops/reopen.go:34-39 | internal/storage/issueops/reopen.go:78-83 \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 \u0060internal/storage/issueops/reopen.go:34\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":"internal/storage/issueops/reopen.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b01dd14d1b05a7032ffc89b2c7659caf2e0bdbb522e4a2a492b575e316c5a99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/telemetry/storage.go:281-286 | internal/telemetry/storage.go:293-298 \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":"internal/telemetry/storage.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe2b62dad3d72980489e02a9776229f23a0edab352bf74f18f585bd50d9228f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/tracker/engine.go:986-991 | internal/tracker/engine.go:1006-1011 \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 \u0060internal/tracker/engine.go:986\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":"internal/tracker/engine.go"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"a942ab8c885ee558705c427f1a018ba434732da31630f8b6cd09b73ab43921d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): backend/conformance/audit_molecule_wisp_batch_iter.go:557-562 | backend/conformance/audit_molecule_wisp_batch_iter.go:593-598 \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":"backend/conformance/audit_molecule_wisp_batch_iter.go"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"035d0b3b3002f633d14e3fb03bb2c68550cee1a4a49546f2a51817c7d15d96fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/bd/doctor/fix/migrate.go:114-119 | cmd/bd/migrate.go:184-189 \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/bd/doctor/fix/migrate.go:114\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/bd/doctor/fix/migrate.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"09bfb29139ff1660910d7322759cfc1b580e3cab4c1e246c1d856e1846eb06e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): backend/conformance/relations_contract.go:324-328 | backend/conformance/relations_contract.go:444-448 | backend/conformance/relations_contract.go:478-482 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"backend/conformance/relations_contract.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08a66df1805441bb49f4d9a6f60097ca5ddda658e24071d7e8177454882f7bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/issue_operations_contract.go:1148-1152 | backend/conformance/issue_operations_contract.go:1216-1220 \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 \u0060backend/conformance/issue_operations_contract.go:1148\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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d36333e1dcdd6e9186b772ca1df4b3f4ae0cddb94ff158a99d6b22a1c1f2529"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/issue_operations_contract.go:1172-1176 | backend/conformance/issue_operations_contract.go:1183-1187 \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 \u0060backend/conformance/issue_operations_contract.go:1172\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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":1172}}}],"partialFingerprints":{"codehealthFindingId/v1":"0543cb783624bb8a1e801d06e779414f67341e0f1af1e7bf7545662a3cff7c3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/issue_operations_contract.go:1453-1457 | backend/conformance/issue_operations_contract.go:1469-1473 \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 \u0060backend/conformance/issue_operations_contract.go:1453\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":"backend/conformance/issue_operations_contract.go"},"region":{"startLine":1453}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d7fa43c3e9ecf6cd0e2e8f3c194e9e199d81c51bc9c61e24cd80a0c6e56a16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/lifecycle_close_reopen_contract.go:459-463 | backend/conformance/lifecycle_close_reopen_contract.go:611-615 \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":"backend/conformance/lifecycle_close_reopen_contract.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"0253cfa9259b1a8c3c50a1608dfe797060ba45676ad3e0a3d9e1570439c6ac95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/reader_contract.go:839-843 | backend/conformance/reader_contract.go:900-904 \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 \u0060backend/conformance/reader_contract.go:839\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":"backend/conformance/reader_contract.go"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"817d5b092b2a7684a426ef2cba1dd1acbee7d89daff197a46dcfd7f5a459e6c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/relations_contract.go:97-101 | backend/conformance/relations_contract.go:195-202 \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":"backend/conformance/relations_contract.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a1f2fb43e6d4c18dcf34f6bc5374368c0a51a6b490c3c2a5e1af18e59534c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/relations_contract.go:103-107 | backend/conformance/relations_contract.go:208-212 \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 \u0060backend/conformance/relations_contract.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":"backend/conformance/relations_contract.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"554bcdf894ec0b3afa537c6bd82a3a495d47f83b2ca7c50449304f7e1b6dde77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): backend/conformance/relations_contract.go:290-294 | backend/conformance/relations_contract.go:587-591 \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 \u0060backend/conformance/relations_contract.go:290\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":"backend/conformance/relations_contract.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9fbb33782816f62282df61d03dcf89cfdaaab7be5ccaedd2a90b66176197fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/bd/preflight.go:811-815 | cmd/bd/preflight.go:858-862 \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/bd/preflight.go:811\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/bd/preflight.go"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2274fa5e22d669812861874c642c63640846df56edc30b3b8324d0b66c0e7d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/bd/setup/agent_skill.go:44-48 | cmd/bd/setup/agent_skill.go:54-58 \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/bd/setup/agent_skill.go:44\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/bd/setup/agent_skill.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"6962ba4815d77f115f88b7e41b81673df1b211c79991c68613fc386cd7be8b2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/bd/setup/agents.go:147-151 | cmd/bd/setup/agents.go:162-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/setup/agents.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"07fb6ac7606b729478a13cbd1f51689f26f35fa65311802b958f9fdfe787ddc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/query/evaluator.go:337-342 | internal/query/evaluator.go:364-368 \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 \u0060internal/query/evaluator.go:337\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":"internal/query/evaluator.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"d200801e008b4a1679db9b659eadd812633e46cb11eeca8afea8730291230326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/bd/kv_proxied_server.go:28-32 | cmd/bd/memory_proxied_server.go:55-59 \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/bd/kv_proxied_server.go:28\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/bd/kv_proxied_server.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bf4c0bdd49620b6a0220b91141eb008d1cf63ae0190bce36771dac879ded383"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 2): cmd/bd/doctor/fresh_clone_server.go:27-71 | cmd/bd/init_guard.go:31-77 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/doctor/fresh_clone_server.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"a15b768a77889a5aacb4618f2af44ce94461295d637060b05774380710697e35"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/storage/dolt/store.go: internal/storage/dolt/store.go changed 81 times in last 90 days, max complexity 46. 52 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/dolt/store.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db4ff03b6447d26e8c36c603fbb17a87b4586aba3c13400a03ca086d1e46a266"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/bd/init.go: cmd/bd/init.go changed 103 times in last 90 days, max complexity 33. 32 of those changes were fix/bug commits, and the other 71 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41a8f6aa958db13a7ad76f9ba4966274c81d7d201685089d1eb790a2ef754761"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/storage/domain/issue.go: internal/storage/domain/issue.go changed 45 times in last 90 days, max complexity 50. 11 of those changes were fix/bug commits, and the other 34 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":"internal/storage/domain/issue.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"748602dca04227a60317dd1283c1cd871315229103b72119fcf1d311c31df531"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/storage/schema/schema.go: internal/storage/schema/schema.go changed 43 times in last 90 days, max complexity 39. 27 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/schema/schema.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cabb00fbecc76d681e2c9427d96619ea15e98eb8670f4a937c39a031029bb4f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/bd/init_proxied_server.go: cmd/bd/init_proxied_server.go changed 27 times in last 90 days, max complexity 60. 9 of those changes were fix/bug commits, and the other 18 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/init_proxied_server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"44bac47d76dbf8b97f200b41ea602a5b2db2b52f21c7011c75fc9b75414a3d78"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/storage/dolt/transaction.go: internal/storage/dolt/transaction.go changed 22 times in last 90 days, max complexity 72. 9 of those changes were fix/bug commits, and the other 13 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":"internal/storage/dolt/transaction.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b85d39da84e85127a0b17afa31d4fa1a978bb6e1d80430583ff3d4449b5046"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/bd/dolt.go: cmd/bd/dolt.go changed 45 times in last 90 days, max complexity 34. 26 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/dolt.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"326b3c0fd329b78a809b4612f20a1e8e34b4dbe7a4f3d6189ba794bca18ace51"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/storage/domain/db/issue.go: internal/storage/domain/db/issue.go changed 38 times in last 90 days, max complexity 37. 8 of those changes were fix/bug commits, and the other 30 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":"internal/storage/domain/db/issue.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"527373331537636d0ddb2362988f6bee4fe5148cf5ae891927dd4fe45374db4a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/storage/issueops/dependencies.go: internal/storage/issueops/dependencies.go changed 35 times in last 90 days, max complexity 40. 14 of those changes were fix/bug commits, and the other 21 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":"internal/storage/issueops/dependencies.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0618f6d985967b0a8297b7add19cc7f7be180e2ab68a6ec36e2877d6b5811fdb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/bd/main.go: cmd/bd/main.go changed 71 times in last 90 days, max complexity 18. 31 of those changes were fix/bug commits, and the other 40 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/main.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba8726ddec418fadd58cbe0d57c1fa02cd3ba4bae9754534777568c2eaf0dde"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 21 significant file(s) lose their only recent owner: internal/formula/controlflow.go, internal/formula/condition.go, internal/storage/issueops/blocked_consistency.go, internal/storage/schema/aux_row_id_backfill.go, internal/storage/issueops/blocked_merge.go, cmd/bd/reclaim.go, internal/formula/advice.go, cmd/bd/export_obsidian.go (\u002B13 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"069919303624068635cec6762bfcb65f93de13874b0aac91bc2c51f05184d077"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 15 significant file(s) lose their only recent owner: internal/storage/domain/label.go, internal/storage/domain/db/config.go, internal/storage/domain/comment.go, cmd/bd/sql_proxied_server.go, cmd/bd/db_proxy_child.go, internal/configfile/external_dolt_config.go, internal/storage/uow/uow.go, internal/storage/domain/db/child_counter.go (\u002B7 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"330f64fcef1998b3b442f4ab459ef82d754ef911691988431d846553f0317355"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #3: If anonymized user #3 becomes unavailable, 4 significant file(s) lose their only recent owner: internal/storage/schema/smart_remote_migrate_gate.go, internal/doltserver/servermode.go, internal/storage/schema/migration_content_hashes.go, cmd/bd/prime_divergence.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"547828e8318bb57bc0427874245a540c33d23eadc072afe7e777fed4bdf49476"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 4 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (44 single-owned of 695 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 #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (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 original design documentation (planned features) is clipped mid-sentence inside the server README, so future MCP tooling details cannot be confirmed from this path.: Ensure any unshown planned features in the historical docs are not flagged as missing; clip behavior is benign."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/claude-desktop-mcp/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"99e104b3107d445ffab1529c7980357d5594b3acfacdf28b400944f5257bfc94"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6dde2de5f5dbde3cb14c0defd9dbf0e6957b00ca0a06c3c7962e1f63e858c2ba"},"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":"94cf8ab657817e3bbfd720730d1c55ab02faaebb1d27f3bac18f363d7435b38c"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a14614d7de7dbb5ed6d8090411eb791779683e5392f5128d856a3f7e85cac11b"},"taxa":[{"id":"CWE-89","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":"8870afebd0738935def636a97c22a3655ab13feda7a728bb5b35ca087de1bca4"},"taxa":[{"id":"CWE-89","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":"f294e3c35c6584e9a246a6e308f5f9ebf95f210846b2e229ef49b611f75e7a0a"},"taxa":[{"id":"CWE-89","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":"385824ffa985f6f7149bc4ccb7b39759ec1dd2e0c0fbd9192088db5b8ec707d1"},"taxa":[{"id":"CWE-89","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":"954b987d778aaa6d41730997d9c8add81f7e06a8dd2466effb9d1c25e771a5f6"},"taxa":[{"id":"CWE-89","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":"c4180eb5ed385a02bbb32540b02b79c9a79cb6d2a8eaf10e42e775ce8ea76d45"},"taxa":[{"id":"CWE-89","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":"c3b0071b8d89ba03e9a5032d54994f6ccc65337d8aa93684f2cf691e08b0c49a"},"taxa":[{"id":"CWE-89","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":"7984b43e74618c51c88b42c2bfb3c606b902b2d396f164ee0d37be68b2e8bbee"},"taxa":[{"id":"CWE-89","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":"6fdaf9b4bd487647004a24ed6cc0650c30dd6cef42dbb495928125252d06da8a"},"taxa":[{"id":"CWE-89","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":"68c1b5a1db83d0788d4e9dc6bdff94854dc998efbc9d125655409fea39ebb28b"},"taxa":[{"id":"CWE-89","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":"fa50cf5df8537cce3469005fa17bff3772fe0bf47d6755e8fac78721d955e885"},"taxa":[{"id":"CWE-89","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":"3a76abe98e9de940b082a3b8b1b519acc987fc981a953b43a2e1d3158e2ad61e"},"taxa":[{"id":"CWE-89","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":"383f7470bcc51e55cfb9a6ecb9eac661b87f47852594b6d230f291c24f3b8113"},"taxa":[{"id":"CWE-89","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":"44b12732bc4c5e5392b4fea7958c17e6653c740ab10279aa75bb327a96e8184e"},"taxa":[{"id":"CWE-89","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":"f0c849bb176a7095795a74078d0a16ddca4fbfb1aa1d2e0fe9d4cc4e9fba6619"},"taxa":[{"id":"CWE-89","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":"b6933beb405866cf5d82b57643875bbaf0ec24e23f916ca055e1a93a5eb6ca6b"},"taxa":[{"id":"CWE-89","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":"0adbc83304babe5e6aa09e84a6146811ca6c41516a64117cde5079e0c5ca9158"},"taxa":[{"id":"CWE-89","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":"c96ba7fe46be3bb0ee4d6d985654df94b1099df1446b2d927b47a8632aabdbe0"},"taxa":[{"id":"CWE-89","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":"0257d3820e50ee0966fe2daa77a968fa376873a0a1972781bf79889759f3d636"},"taxa":[{"id":"CWE-89","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":"0daf1e56c4754d27de1d6f44e26ae2b929c416a46eeb4c73cea2c68ebeb349de"},"taxa":[{"id":"CWE-89","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":"85d9d3b8b7d19349a44ec2132b9d88078d2ef47327a793fb99c93ee4f748af4b"},"taxa":[{"id":"CWE-89","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":"0a82884933469dc2aa17c04ff7c270a202a5a839d2f3e39140a2bacae482574c"},"taxa":[{"id":"CWE-89","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":"bd772fcd62b0c8784cc81abd9f515aa94ce9393bcabf899591779f6f8a3aeaa4"},"taxa":[{"id":"CWE-502","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":"ddadddba8b3e3907b1f7d30758a0bafc92234531d3946c6e035d292cf6f991d4"},"taxa":[{"id":"CWE-89","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":"7b99f46e905864c9285dd53c9694f650b0461aca13fef22967422cdd4c098863"},"taxa":[{"id":"CWE-89","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":"b8934e348de5d9c66e5496e78cc85b992b882809ac317bcd279a18d741e326d6"},"taxa":[{"id":"CWE-89","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":"cf16c9b90d3f5cfe6610b334016f3d1dee0a21e93b13b840ff62850b2cca28db"},"taxa":[{"id":"CWE-89","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":"80335aac862df11cc680a94198e49705f2fd4a645f8180c44a1ed3fcc22d48fd"},"taxa":[{"id":"CWE-89","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":"a4e70249a68131a86aeb95f9ba184a9f14137ae9a66a78485430bd57082d65ad"},"taxa":[{"id":"CWE-89","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":"ef3e6c8589d95ef22084bb61cdc27aca084caf3e2c025e22821512c2b76091d8"},"taxa":[{"id":"CWE-89","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":"cb537d7574823e3eb3a062678c45c68a3aff5549dbb420110bb097688b94295f"},"taxa":[{"id":"CWE-89","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":"cf64732636d77b89376024fd0054ca0a660944dbfbc62f29a0c1aa184ccde865"},"taxa":[{"id":"CWE-89","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":"a867a3171061778a9571d025e476e2eb12c6d59212cc179ba8488e20e4c5e106"},"taxa":[{"id":"CWE-89","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":"6ccbed487b060821e7f5dcbd4f9799b2ad1ac10d7c98c5b6a310ffc134ccee26"},"taxa":[{"id":"CWE-89","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":"f3c4f340aaab0fb98e97c4c21d19b47d2a9749459e0a7f6d9f409122153af34c"},"taxa":[{"id":"CWE-89","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":"aa1d12da52f3adc37b6526435fec1bf1da81541f80b6b35e46eb1ae3791411f6"},"taxa":[{"id":"CWE-89","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":"b5f43565d685eb2465286721c65b024b65733fdca96c45a804f90f66467408ab"},"taxa":[{"id":"CWE-89","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":"8be0c344c72fbdbcffcb362d905c2607dbe7ccb197de417c6712ccc1077ed7f4"},"taxa":[{"id":"CWE-89","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":"cdd26d2f443cbce5fb8841545b05513127e87c560064830db8857f27078495a9"},"taxa":[{"id":"CWE-89","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":"4888d39223c32723f11a5a7a284de189cc1d137d7cd5838203b24bc3cdcc23ec"},"taxa":[{"id":"CWE-89","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":"f2af99aecfed4fa2b14396c5576142ddf2d22b05c2b7b9e779dc6214df4a3ab3"},"taxa":[{"id":"CWE-89","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":"e6f42c91ff3c303abb2c943604e4cf3bf9b090bfd576ae936f7b27a9651cf48f"},"taxa":[{"id":"CWE-89","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":"344942656266cfbc04093b2917ed69ff7c712b477b34ac1a3fd90e34787661c6"},"taxa":[{"id":"CWE-89","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":"ab0c046eced31d4bf047cc8f703ff5bb5572a06ef4c106846f6cb7a732dc4bf5"},"taxa":[{"id":"CWE-89","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":"893c5ffa0f6cce02f631fcf5f3a636451432c96ffe07223e5899ffb7c07c3150"},"taxa":[{"id":"CWE-89","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":"fe3adffb7c6f47bbe786ea9644f69bf4ee5954f4370e771909c224181ee7c4e8"},"taxa":[{"id":"CWE-89","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":"7816bf1b00c3ce348a776612073e6a9e67cf6fa6833e63de6ee54d3781f5b056"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 3 of 695 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: internal/timeparsing/parser.go, internal/storage/dolt/metadata_schema.go, internal/configfile/credentials.go. 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":"error","message":{"text":"Boundary-crossing change coupling: version.go \u2194 __init__.py: \u0060cmd/bd/version.go\u0060 (context cmd) and \u0060integrations/beads-mcp/src/beads_mcp/__init__.py\u0060 (context integrations) sit in DIFFERENT parts of the tree yet change together 79% of the time (96 of the 121 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/bd/version.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fc680eff843f804f3ec4a4ca0b9c7a54593c95ab1a37d511cec16c0abba5a59"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: locks.go \u2194 locks.go: \u0060cmd/bd/doctor/fix/locks.go\u0060 and \u0060cmd/bd/doctor/locks.go\u0060 change together 60% of the time (6 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":"cmd/bd/doctor/fix/locks.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c66de5421989ee7086cb7f81277e1d7ac864ed6a758c436a4a898eacfe56c0f"}},{"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":"0752d0df7434000fcabf1048e2de30a7a1a8b982b3db9a19898c4dec199856b4"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"16a319101a189f87f1c72df17b9e32dd7cd1415c94bf585a4635fc7a224070f7"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d3f5425f9a55ae247a1b60017eea234cfa66a1514899da462df8aa77b925eda5"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"24fcae53239a1ac72bc974dcc3442f0bef6a331b9ed40849b5e99c9cb4cbc05a"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7648d6fe7a29523b38387d22458638113a15fe52953b28fdae5568fe4a327019"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"248a00a6606122f832425eed583503a5c73b8a166d330871b3e639297467573b"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"10899ce1ad937595f50821b3596939a01b1765e6e7f20c527e982a5b1400b0b2"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"04b5d62de159ce99b65d8e1fcf769fc2fa39d81a4bed79e63d7a7efa2718c105"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"78e6a46736a7e0ba186b7e07a6072fa58c9e71fde95ecf2fe12a4b562caf0622"}},{"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":"cefdb66327af2ad98ac94390c662cf00d23c2be50408c2002831b2774365f175"}},{"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":"c3101d36131a52584dde37b042bdfe9fc6a1d1edad6398c91ef166385743b007"}},{"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":"1ca43e4c890345d6c86b5e11919ac658148a0197d3d30ced9c739280c78f76a3"}},{"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":"94da9437ae1e2a26eb34e9fb5c5f0a0a710abaa523e8722c81377d11bfbf8cf8"}}],"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-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-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-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-502","guid":"f7d3b296-aac0-5c5a-b706-e07faba26c36","name":"CWE-502","shortDescription":{"text":"CWE-502"},"helpUri":"https://cwe.mitre.org/data/definitions/502.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":64,"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."]}]}