{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"]}},{"id":"D32","name":"Data Compliance (PII/GDPR)","shortDescription":{"text":"Data Compliance (PII/GDPR)"},"helpUri":"https://codehealth.canine.dev/dimensions/D32","relationships":[{"target":{"id":"CWE-359","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-312","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-200","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-359","CWE-312","CWE-200"]}},{"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":"migrations.migrateRepository (cyclomatic 85): migrations.migrateRepository has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/migrate.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ed0410e5720218527bde1d64d08a747460fe572c7fc0eb173ca265641316972"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.EditBranchProtection (cyclomatic 78): repo.EditBranchProtection has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/branch.go"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"0361f37ec6a8abb8feced3c677ff2f69ad78766c0c23a0ba640ed431e48fddc1"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_11.AddBranchProtectionCanPushAndEnableWhitelist (cyclomatic 74): v1_11.AddBranchProtectionCanPushAndEnableWhitelist has cyclomatic complexity 74 (threshold 15). Most of this is not in the body itself: 10 of the 74 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 136, 309, 380). 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":"modelmigration/v1_11/v111.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e62067e22ec59ad7c7013e37292e0fd10a8afc7157b2ffa216b3e1c475f5711"}},{"ruleId":"D1","level":"warning","message":{"text":"gitdiff.ParsePatch (cyclomatic 65): gitdiff.ParsePatch has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/gitdiff/gitdiff.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f82327035e176205b2584c2f42aa2726968f709719661822d688beac652c7fb"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.DeleteRepositoryDirectly (cyclomatic 65): repository.DeleteRepositoryDirectly 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":"services/repository/delete.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"97866e5606cf061977bf9335f7a98917f6c7b98bbd192481f0544923f02291a1"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.prepareIssueViewCommentsAndSidebarParticipants (cyclomatic 61): repo.prepareIssueViewCommentsAndSidebarParticipants has cyclomatic complexity 61 (threshold 15). Of this number, 60 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":"routers/web/repo/issue_view.go"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"f64c7c9c52843fb97faf60d5f98f88d3139e7549ac295f048814154f61925986"}},{"ruleId":"D1","level":"warning","message":{"text":"private.ServCommand (cyclomatic 60): private.ServCommand 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":"routers/private/serv.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"1edea298e40a616b1553a799eb88ab34f820728745b35c805c67371aef63c8ae"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.updateRepoUnits (cyclomatic 59): repo.updateRepoUnits has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/repo.go"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b410d7364c39cbeb91c74c0b33767e6e1de608d3e23fb29516e9b5ecad7424"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.runDump (cyclomatic 58): cmd.runDump has cyclomatic complexity 58 (threshold 15). Of this number, 53 points are the body\u0027s own statements and 5 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/dump.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cdc669a05ff9207d828bf77b381a53fcbdfe41ca77bbd08ac6d460b8611ae7d"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.httpBase (cyclomatic 56): repo.httpBase 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":"routers/web/repo/githttp.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ce70df6ea0a7dae3c6e18072f5031e1bc1b616a966ad6b809d130488ef8e13"}},{"ruleId":"D1","level":"warning","message":{"text":"Source.Sync (cyclomatic 56): Source.Sync 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":"services/auth/source/ldap/source_sync.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b3cf877ef5beb03b0f1efea2c423c91035797439ab2ffaacad2dc22e916ae3"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.EditPullRequest (cyclomatic 55): repo.EditPullRequest has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/pull.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1ff338565d52b259c4728832c91b753c154a220a13ee0cd3712b9a506e9fcc"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.transferOwnership (cyclomatic 55): repository.transferOwnership has cyclomatic complexity 55 (threshold 15). Of this number, 46 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":"services/repository/transfer.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaefee87bca43557ecc6716ae5edb306dd8504bb63febb7562f3c16133e03eb0"}},{"ruleId":"D1","level":"warning","message":{"text":"base.RecreateTable (cyclomatic 54): base.RecreateTable has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/base/db.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"87a360a06f1a29d275006587ea029f8046b0e0078750710bfea1a03083edd642"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.loadMailerFrom (cyclomatic 54): setting.loadMailerFrom has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/setting/mailer.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"02b7e312f18b23374afe765713d7ce9c0c299187ab879159a6d283ae4f2c47a9"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.viewPullFiles (cyclomatic 54): repo.viewPullFiles has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/pull.go"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"1313a1ca12483c84f2dc61d0c4de2b30ba109e142689d0c140591d667dc99466"}},{"ruleId":"D1","level":"warning","message":{"text":"gitdiff.createCsvDiff (cyclomatic 54): gitdiff.createCsvDiff has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 15 of the 54 points are its own statements and the rest belongs to one function literal inside it that branches (line 174). 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":"services/gitdiff/csv.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc45eafb9be9ca6b798c9f4c3e36e16bd3b17fb197a361700187727659b8e4c"}},{"ruleId":"D1","level":"warning","message":{"text":"files.ChangeRepoFiles (cyclomatic 54): files.ChangeRepoFiles has cyclomatic complexity 54 (threshold 15). Of this number, 51 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/files/update.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b2814415f66901a140db02e0a696d9d3c30de00b79d3bf7d7e3c6e2dc548801"}},{"ruleId":"D1","level":"warning","message":{"text":"feed.feedActionsToFeedItems (cyclomatic 51): feed.feedActionsToFeedItems 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":"routers/web/feed/convert.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"56eb97d084cf63045f2e7c8aef7a90ad374942820fa96af3408d55ec2f287de1"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.loadServerFrom (cyclomatic 50): setting.loadServerFrom 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":"modules/setting/server.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1d7c95f80cd30085c97fda29c052220f643e9432e904080824909540e4f7bc"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.prepareIssueFilterAndList (cyclomatic 49): repo.prepareIssueFilterAndList has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_list.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"77689d5f3c5c7ea659f1916d9b916235ac49a590fbcb5b0d476987fb5f86cc65"}},{"ruleId":"D1","level":"warning","message":{"text":"logNameStatusRepoParser.walkNext (cyclomatic 48): logNameStatusRepoParser.walkNext 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":"modules/git/log_name_status_nogogit.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc10c1d63c1813cbc965ed89da885090b0e4a75c8dfb60ec550528e2c18158a"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.EditIssue (cyclomatic 48): repo.EditIssue 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":"routers/api/v1/repo/issue.go"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"524455ab5b7e07bf5469aff8e0a80b89fad88895894b144cb1d6c6da122d63f6"}},{"ruleId":"D1","level":"warning","message":{"text":"install.SubmitInstall (cyclomatic 48): install.SubmitInstall has cyclomatic complexity 48 (threshold 15). Of this number, 47 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/install/install.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"c21d17004ac9ad5b210cc4887fa1adb2d1d6d89568afa4b946f351268a12e016"}},{"ruleId":"D1","level":"warning","message":{"text":"gitdiff.parseHunks (cyclomatic 48): gitdiff.parseHunks 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca806addba3677eb384ac4fcd37de5fa341f66f04a8919a8038060ab1ca206e3"}},{"ruleId":"D1","level":"warning","message":{"text":"IssuePageMetaData.retrieveReviewersData (cyclomatic 47): IssuePageMetaData.retrieveReviewersData 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":"routers/web/repo/issue_page_meta.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"59bfd54c2ec8abc6e3baddcca439a90fb2470e0964e31522b6eba9169c8ee5c1"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.NewComment (cyclomatic 46): repo.NewComment 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":"routers/web/repo/issue_comment.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e7d92e34ad7ecbeadd09a4b073a10fadb0359b38eab34876219d3d4ea4113bb"}},{"ruleId":"D1","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBox (cyclomatic 46): pullRequestViewInfo.prepareMergeBox 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":"routers/web/repo/issue_view.go"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"f32c095a7dfeaef5cd63435c8f51f8af924d1f41a0b361f6d38a96d4a240bde9"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.ProcessStacktraces (cyclomatic 45): Manager.ProcessStacktraces has cyclomatic complexity 45 (threshold 15). Of this number, 43 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":"modules/process/manager_stacktraces.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"cabe6c5e290618c2711bb46dadb9f5ac4212fd88f1a9902523bfbc274c193404"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.execRerunPlan (cyclomatic 45): actions.execRerunPlan has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 10 of the 45 points are its own statements and the rest belongs to one function literal inside it that branches (line 223). 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":"services/actions/rerun.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f5b7140f8c03a71c44f9cc9cf836a521b5cd1d3880a73838ca98b21f4cb06a5"}},{"ruleId":"D1","level":"warning","message":{"text":"context.OrgAssignment (cyclomatic 45): context.OrgAssignment has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 1 of the 45 points is its own statement and the rest belongs to one function literal inside it that branches (line 74). 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":"services/context/org.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c30b34dce5c1838f34857bac1f2b75aaae2ce078ac780720f34598e52b94521"}},{"ruleId":"D1","level":"warning","message":{"text":"languagestats.GetLanguageStats (cyclomatic 44): languagestats.GetLanguageStats has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/languagestats/language_stats_get.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"51fc291966ae62a548a3229d310ab2bede3b8a7ef096e8a205f1ae7837f9394f"}},{"ruleId":"D1","level":"warning","message":{"text":"log.EventFormatTextMessage (cyclomatic 44): log.EventFormatTextMessage has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/log/event_format.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"46cf978c42c0611d66f8e224e257d6a9940899240f5bf4c74ba077f9a9046718"}},{"ruleId":"D1","level":"warning","message":{"text":"private.preReceiveBranch (cyclomatic 44): private.preReceiveBranch has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/private/hook_pre_receive.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04e073421cbc9a297ed534f7ef1a55f87330ddc6ea99a9b27fbf74b36ae7c3e"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.handleSettingsPostAdvanced (cyclomatic 44): setting.handleSettingsPostAdvanced has cyclomatic complexity 44 (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":"routers/web/repo/setting/setting.go"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"526742758f70430991115a026fb64d87edbe6824db365f99b744de6a03f33ff0"}},{"ruleId":"D1","level":"warning","message":{"text":"convert.ToAPIPullRequests (cyclomatic 44): convert.ToAPIPullRequests has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/convert/pull.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ecb72399eea253f3e4ffb8daf13770ca0c70e09808a7a1770d900e5c986b9d8"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.getLevelDB (cyclomatic 43): Manager.getLevelDB has cyclomatic complexity 43 (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":"modules/nosql/manager_leveldb.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1c6d467991339bbb0828aac2176e1c24c727c0b95506076fe51a7d4f517eb0"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.MigrateRepositoryGitData (cyclomatic 43): repository.MigrateRepositoryGitData has cyclomatic complexity 43 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 19 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":"services/repository/migrate.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d5c2d263519792a5a49e0764f377013ed6bf629c8f3c986a3059e0033f7d85"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.runServ (cyclomatic 42): cmd.runServ has cyclomatic complexity 42 (threshold 15). Of this number, 41 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/serv.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24ba48e7f815fe5f00cad0d9493c5e66d7653af357f395758250ce139e6d70d"}},{"ruleId":"D1","level":"warning","message":{"text":"base.DropTableColumns (cyclomatic 42): base.DropTableColumns 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":"modelmigration/base/db.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4761f31c042147289b1887aa8d914e8f12fb18f0e3ca4d2f626a82cdcd10668"}},{"ruleId":"D1","level":"warning","message":{"text":"jobparser.ParseRawOn (cyclomatic 42): jobparser.ParseRawOn 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":"modules/actions/jobparser/model.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5e585ed1682c299566bd1734a42026a22bb04e642c0a0f2727bd6f092b4674d"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.CreateBranchProtection (cyclomatic 42): repo.CreateBranchProtection 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":"routers/api/v1/repo/branch.go"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"3933c90ab5449758fe6985626e4c40fcd1c02c6264a181e03827c4d26f40c114"}},{"ruleId":"D1","level":"warning","message":{"text":"user.buildIssueOverview (cyclomatic 42): user.buildIssueOverview has cyclomatic complexity 42 (threshold 15). Of this number, 36 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/user/home.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ff17a12010c9e13a5f9d80f6d35806bc923d5f6ec4989df5040fde07e7d8cd"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.MergePullRequest (cyclomatic 41): repo.MergePullRequest has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/pull.go"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba491be5e263fbcc703cb2b17622bfd3a2a5e13a384c6894b041a31065f9d27e"}},{"ruleId":"D1","level":"warning","message":{"text":"packages.GetPackageDescriptorWithCache (cyclomatic 40): packages.GetPackageDescriptorWithCache has cyclomatic complexity 40 (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":"models/packages/descriptor.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc3c755980b1ca380342a4374c21496880e504553131773dc27a87da4dcaa226"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.SearchRepositoryCondition (cyclomatic 40): repo.SearchRepositoryCondition 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":"models/repo/repo_list.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"406a9386ec47a4733f802ec5923212a30809e1e8272146a8bdb258a133d84c31"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.MergePullRequest (cyclomatic 40): repo.MergePullRequest 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":"routers/web/repo/pull.go"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb2bae5abd92159c358a36dc1be443ad3ebfb5a2753f67ab688239dda964f89"}},{"ruleId":"D1","level":"warning","message":{"text":"convert.ToAPIPullRequest (cyclomatic 40): convert.ToAPIPullRequest 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":"services/convert/pull.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"411862d8ebc3ca26c6bf628fbd9bed4f90d01b2f943344efbbbe60d194b92669"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.runHookProcReceive (cyclomatic 39): cmd.runHookProcReceive 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/hook.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"3144da7a761e2967cb71cfb5579bd5abb659b3bf762647f31f1956f129797c11"}},{"ruleId":"D1","level":"warning","message":{"text":"Indexer.Search (cyclomatic 39): Indexer.Search 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":"modules/indexer/issues/bleve/bleve.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc5b1cf3864b7cfd3d61fe92dd472fe8f4109aa2a2dad8e6096d0b0ddbb43d7"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.KeysPost (cyclomatic 39): setting.KeysPost 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":"routers/web/user/setting/keys.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd6a3f442bcc227ca57d1455af8d736e6009d09337a612a359e2f8a23913d94d"}},{"ruleId":"D1","level":"warning","message":{"text":"util.SanitizeCredentialURLs (cyclomatic 38): util.SanitizeCredentialURLs has cyclomatic complexity 38 (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":"modules/util/sanitize.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c06b08d7a748c326251cd6921f6c32b17cd49bbea2b877c53d6692f6fef43f"}},{"ruleId":"D1","level":"warning","message":{"text":"maven.UploadPackageFile (cyclomatic 38): maven.UploadPackageFile 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":"routers/api/packages/maven/maven.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"9514d01d15b5c04efefa0fe243b3d72cc6f1610aa884c2a4f4bdcfe7f671a522"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.notify (cyclomatic 38): actions.notify 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":"services/actions/notifier_helper.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0a1b43e232516bfd43f18cda704089b0d52043a305845153f5ccb656024d01"}},{"ruleId":"D1","level":"warning","message":{"text":"agit.ProcReceive (cyclomatic 38): agit.ProcReceive 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":"services/agit/agit.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"9500977bfb56cb9c58b02b79057f66a0d69df93d2114f84c7bd0587cbd15789b"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_13.SetDefaultPasswordToArgon2 (cyclomatic 37): v1_13.SetDefaultPasswordToArgon2 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":"modelmigration/v1_13/v151.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"432d3650e276c4afc781f97bc7cd3faa36df8ea76421a402600a72a41a5d7410"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.ListIssues (cyclomatic 37): repo.ListIssues 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":"routers/api/v1/repo/issue.go"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"1836c9f349bd2d25daa96cedb4f8c78792d386d746f0ba1148d4e909db78c331"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.UpdateRunJob (cyclomatic 36): actions.UpdateRunJob has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/actions/run_job.go"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"b40f207ee6af46af44a983e30b9cd8ae75f6180f87387a869ce87eb0f3b161f8"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.ResolveIssueMentionsByVisibility (cyclomatic 36): issues.ResolveIssueMentionsByVisibility has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/issues/issue_update.go"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"03132f3d56b1ea5758373cf4c9c2d3f97340ef0ea046252d621bff2d9f022a4f"}},{"ruleId":"D1","level":"warning","message":{"text":"web.registerWebRoutes (cyclomatic 36): web.registerWebRoutes has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 5 of the 36 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 921, 425, 1082, \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":"routers/web/web.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"da33515b70a96fb078c386a0ef6b57ceafa5896a23fd5fb5e977309c6a1746e1"}},{"ruleId":"D1","level":"warning","message":{"text":"SMTPSender.Send (cyclomatic 36): SMTPSender.Send has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mailer/sender/smtp.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"20903baaa91990a1ce6db9f205e09651c7510917409ff7141f8aec03722198e7"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.attemptMerge (cyclomatic 36): pull.attemptMerge has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/patch.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d7c02b3873cba37847cc12bde0fce851fd18e3f04f009b85dac311b7a976e2e"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.NewPullRequest (cyclomatic 36): pull.NewPullRequest has cyclomatic complexity 36 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 13 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":"services/pull/pull.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"70994712951b9b9a79aa3554da12b875de8f1cd7e54fcf3a9dbabf6bcdf7ac6b"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.pushQueueHandleUpdates (cyclomatic 36): repository.pushQueueHandleUpdates has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/push.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f30d13acb028a9cc4c6897217cafc2ee522cc061e0faac18e6f5c36ed636356"}},{"ruleId":"D1","level":"warning","message":{"text":"nosql.getRedisOptions (cyclomatic 35): nosql.getRedisOptions has cyclomatic complexity 35 (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":"modules/nosql/manager_redis.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e48444ca471c0e71a1e6b739a33b4d910992b9807c75f0d791b656c6d0aa1e"}},{"ruleId":"D1","level":"warning","message":{"text":"user.ViewPackageVersion (cyclomatic 35): user.ViewPackageVersion has cyclomatic complexity 35 (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":"routers/web/user/package.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"220559c88122cfe262f5c0922d92318eedb8559a3d49e19409093524f781f8bc"}},{"ruleId":"D1","level":"warning","message":{"text":"issue.UpdateIssuesCommit (cyclomatic 35): issue.UpdateIssuesCommit 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":"services/issue/commit.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d67e76c11ae4acf428f916339f84273b76d7ba141a3f3dffcf4e3aee0f03ed0"}},{"ruleId":"D1","level":"warning","message":{"text":"markup.shortLinkProcessor (cyclomatic 34): markup.shortLinkProcessor 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":"modules/markup/html_link.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3d1f3ec522c5f0cfdd2737a05d5c4f89eec8d00a1777caeb23c6ddf336b794"}},{"ruleId":"D1","level":"warning","message":{"text":"linkifyParser.Parse (cyclomatic 34): linkifyParser.Parse has cyclomatic complexity 34 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/common/linkify.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7403d9d671e72c2cc62e0538d314b0a3a6811c8314dc2fcd71a0f1623312207"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.SettingsProtectedBranchPost (cyclomatic 34): setting.SettingsProtectedBranchPost 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":"routers/web/repo/setting/protected_branch.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a5ffd753b747d8441859106da306b2afb50199416dfcdd2f96fd543163411ac"}},{"ruleId":"D1","level":"warning","message":{"text":"Source.Authenticate (cyclomatic 34): Source.Authenticate 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":"services/auth/source/ldap/source_authenticate.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"318e5d7eb33a3241a8e26a1fa656bdca917ff787fa0d173dc67b25c5e0bbfd5d"}},{"ruleId":"D1","level":"warning","message":{"text":"alpine.buildPackagesIndex (cyclomatic 34): alpine.buildPackagesIndex 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":"services/packages/alpine/repository.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f612af559bb76d53e2bcd855af40899d809d4b491874a15ca3f7a5adfc8e580"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.AddTestPullRequestTask (cyclomatic 34): pull.AddTestPullRequestTask has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to one function literal inside it that branches (line 396). 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":"services/pull/pull.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"32b2397130816ba059267d07a7ba8b3b84981a949347a66be3b1a483335996ee"}},{"ruleId":"D1","level":"warning","message":{"text":"user.deleteUser (cyclomatic 34): user.deleteUser 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":"services/user/delete.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86de4e5bada1f377c401457f7f9a8e376337588a5e55800b412af08dbf17dcd"}},{"ruleId":"D1","level":"warning","message":{"text":"user.createUser (cyclomatic 33): user.createUser has cyclomatic complexity 33 (threshold 15). Of this number, 19 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":"models/user/user.go"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"b709a90b91538d72b18a81a2194154255caad8608bf9404a3e040d6e484a0e40"}},{"ruleId":"D1","level":"warning","message":{"text":"references.findAllIssueReferencesBytes (cyclomatic 33): references.findAllIssueReferencesBytes 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":"modules/references/references.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b3c2a9b896929cbede8693ed9723c92c2260ec51f060303df2ecaf7d5c0c231"}},{"ruleId":"D1","level":"warning","message":{"text":"rpm.UploadErrata (cyclomatic 33): rpm.UploadErrata 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":"routers/api/packages/rpm/rpm.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3370fafd4680ba1e64e71983f327e3f532cf46210452ffb547319687c854a4c"}},{"ruleId":"D1","level":"warning","message":{"text":"org.ViewProject (cyclomatic 33): org.ViewProject 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":"routers/web/org/projects.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0dbffa9a47fb88c230a823b8727fc04326a6d8a3cb1875e67060348bf333ac4"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.ViewProject (cyclomatic 33): repo.ViewProject 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":"routers/web/repo/projects.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc34c623fcadbdbba7a28125e96f31378929f27218dc95fa63f08b069da99db"}},{"ruleId":"D1","level":"warning","message":{"text":"comparePageInfoType.parseCompareInfo (cyclomatic 33): comparePageInfoType.parseCompareInfo 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":"routers/web/repo/compare.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d8a0ba9cb217231d0483bb6b76f634d8ae0b3480186362c0f901a4d5e16b28"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.SubmitReview (cyclomatic 32): issues.SubmitReview 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":"models/issues/review.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"a335789cd3dc4da51aa869fcde71254adacb76cfc02d47e9705dba55b1134258"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.matchPushEvent (cyclomatic 32): actions.matchPushEvent 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":"modules/actions/workflows.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b48b45f65c5896774f753ed3fb5986869710fb2b312b7fa5adf65e6015d064b"}},{"ruleId":"D1","level":"warning","message":{"text":"Indexer.Search (cyclomatic 32): Indexer.Search 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":"modules/indexer/issues/elasticsearch/elasticsearch.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"84e10067917269cf5d0254867891a5af38f19c4297ddc7df3801c2bfd150ee76"}},{"ruleId":"D1","level":"warning","message":{"text":"inlineParser.Parse (cyclomatic 32): inlineParser.Parse has cyclomatic complexity 32 (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":"modules/markup/markdown/math/inline_parser.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"5707c148b563106ca60f432a4fde8774b8b81959df08128e3f87a3bbc49a5e12"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.SearchIssues (cyclomatic 32): repo.SearchIssues 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":"routers/web/repo/issue_list.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a2b1aada74a36509ff165845ab6048bade930a5b2de2b03c9a349f7e1db594"}},{"ruleId":"D1","level":"warning","message":{"text":"context.RepoRefByType (cyclomatic 32): context.RepoRefByType has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to one function literal inside it that branches (line 907). 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":"services/context/repo.go"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d008e44463bf5dd902907391f60ee30edffee905dcbf6963570e0ff9c5a867"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.parseLdapConfig (cyclomatic 31): cmd.parseLdapConfig 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/admin_auth_ldap.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"55795d3095d011ab09affa5d1c2859c0f3ae6ec392ac66dbad1664f73b98aee0"}},{"ruleId":"D1","level":"warning","message":{"text":"authService.runUpdateOauth (cyclomatic 31): authService.runUpdateOauth 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/admin_auth_oauth.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"23eec2ef36de14b73fcaf52a26603ef134213bec204091d016ca1a3007ae82c3"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_16.RemigrateU2FCredentials (cyclomatic 31): v1_16.RemigrateU2FCredentials has cyclomatic complexity 31 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_16/v210.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"40bb432dfa9c6e7916bd801b8496231d8058c6b03754d051e01464451f230359"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.matchPullRequestEvent (cyclomatic 31): actions.matchPullRequestEvent 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":"modules/actions/workflows.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c31edde990d35e0684aaf36ac5b7a5dce19074412620ceee57e6a4d65fe0f3"}},{"ruleId":"D1","level":"warning","message":{"text":"Indexer.Search (cyclomatic 31): Indexer.Search 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":"modules/indexer/issues/meilisearch/meilisearch.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ca2649a4dfb1b87334cd3622b442a4a38acdd24ddf99e9fc41ddeac1260136"}},{"ruleId":"D1","level":"warning","message":{"text":"arch.ParsePackageInfo (cyclomatic 31): arch.ParsePackageInfo has cyclomatic complexity 31 (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":"modules/packages/arch/metadata.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"09cdef9c7dccc3a02eea034920b0e26dd3329c54738be924b78e64b3274f4eb5"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.Migrate (cyclomatic 31): repo.Migrate has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/migrate.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b9d8748456eb88d5a19fc72bd54d5853660c1b51947039f9bf4055774da03a"}},{"ruleId":"D1","level":"warning","message":{"text":"org.TeamsAction (cyclomatic 31): org.TeamsAction 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":"routers/web/org/teams.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"451c64b084bb61836366225f4ed8a1f0d402ea3219c513bbe060706ce4d20099"}},{"ruleId":"D1","level":"warning","message":{"text":"convert.ToTimelineComment (cyclomatic 31): convert.ToTimelineComment 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":"services/convert/issue_comment.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"505ced8e236ff955807cff3db4d26c1d6f0a26b51daafaecc7f7ca4811f330cd"}},{"ruleId":"D1","level":"warning","message":{"text":"RepositoryDumper.handlePullRequest (cyclomatic 31): RepositoryDumper.handlePullRequest has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/dump.go"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aec22c1c24278a98c9cf15495d0826f0d25adb2396f3c8a54cc988425fbc4d2"}},{"ruleId":"D1","level":"warning","message":{"text":"user.DeleteUser (cyclomatic 31): user.DeleteUser has cyclomatic complexity 31 (threshold 15). Of this number, 23 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":"services/user/user.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"1364e07d5b6c67b0a544a6bf18fb6f420cc38006d7b54f40ff25d3a4d71a52e7"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.resolveCurrentRunForView (cyclomatic 30): actions.resolveCurrentRunForView 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":"routers/web/repo/actions/view.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3b42c06fbf48ff7be9c383b67fd4760f291ed340902fb6d2d0aea2c23700d4e"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.fillViewRunResponseSummary (cyclomatic 30): actions.fillViewRunResponseSummary 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":"routers/web/repo/actions/view.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"b143fd6a14308aa3d4ccd6b31446c64939e8470946c4fb37767c1bad304dc876"}},{"ruleId":"D1","level":"warning","message":{"text":"user.Milestones (cyclomatic 30): user.Milestones 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":"routers/web/user/home.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"9377258d80842a72bebf9a16638aedcde2c58e6ab0d338064d7e02ac5f26a95c"}},{"ruleId":"D1","level":"warning","message":{"text":"user.prepareUserProfileTabData (cyclomatic 30): user.prepareUserProfileTabData 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":"routers/web/user/profile.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"b776e479a297ca2acc0ba4efab7cb8678a1578d744396a643b74446d07e39061"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.ApproveRuns (cyclomatic 30): actions.ApproveRuns has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/approve.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e53f09ee8a3e99e31b94e18068f1257730817f1f481114acf6c9351a926d83"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.expandDeferredMatrix (cyclomatic 30): actions.expandDeferredMatrix has cyclomatic complexity 30 (threshold 15). Of this number, 26 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":"services/actions/matrix.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"21734a88c6150f4f0c758f36d93529e7d0d1829fde5bec5b57bd599ab752dd1f"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.parseRawPermissionsExplicit (cyclomatic 30): actions.parseRawPermissionsExplicit has cyclomatic complexity 30 (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":"services/actions/permission_parser.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"36feca1ff31a35bb230b75a3efbe6e626f4fafa66cc44a03711e93f9b94c0135"}},{"ruleId":"D1","level":"warning","message":{"text":"ldap.realSearchEntry (cyclomatic 30): ldap.realSearchEntry 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":"services/auth/source/ldap/source_search.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"747d708ddf6c0506ea3e5d819386cea6feb31ba52db15b0e0ff7bee3df6f0351"}},{"ruleId":"D1","level":"warning","message":{"text":"mirror.runSync (cyclomatic 30): mirror.runSync has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mirror/mirror_pull.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e50e3098d9d9f2fe8d74b3858e62793058137ee2412f5272dd1677ba296d0760"}},{"ruleId":"D1","level":"warning","message":{"text":"packages.CheckSizeQuotaExceeded (cyclomatic 30): packages.CheckSizeQuotaExceeded has cyclomatic complexity 30 (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":"services/packages/packages.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"13d01c631e6d30564f6b32aea4c2c9e96fe2fff3a6a1e99a3492f400c9710f3f"}},{"ruleId":"D1","level":"warning","message":{"text":"wiki.updateWikiPage (cyclomatic 30): wiki.updateWikiPage 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":"services/wiki/wiki.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"0393c7445397cf4715017ba4129babe422193ffb17e30ceb9feb44dcebe5345a"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.runCreateUser (cyclomatic 29): cmd.runCreateUser 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/admin_user_create.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b6887b75ae1732c47aa222883545df313d7c17a209dea9fbd89835345ef993"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_14.FixPublisherIDforTagReleases (cyclomatic 29): v1_14.FixPublisherIDforTagReleases has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_14/v156.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"f92c1cfd6e245b0ddf9e10a53e555ceef1516ed5419661eb06f9d91339dbbc9c"}},{"ruleId":"D1","level":"warning","message":{"text":"git.CutDiffAroundLine (cyclomatic 29): git.CutDiffAroundLine 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":"modules/git/diff.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"92b6009bcb0ac9ec8ebb68cb21b5d7780e9aa40abb50a89a1ee62ffc1c5fe045"}},{"ruleId":"D1","level":"warning","message":{"text":"alpine.ParsePackageInfo (cyclomatic 29): alpine.ParsePackageInfo 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":"modules/packages/alpine/metadata.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3943834b7319f13cb3c2f69c939fd44e85f1afbc091d69b0306ff61999fe2b9"}},{"ruleId":"D1","level":"warning","message":{"text":"templates.QueryBuild (cyclomatic 29): templates.QueryBuild 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":"modules/templates/helper.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"b82e0d2806a17a56b02c432d43db4434ca04385aff15ea3f6d5cdc1df300efb9"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.CreatePullRequest (cyclomatic 29): repo.CreatePullRequest 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":"routers/api/v1/repo/pull.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c394333f1292cf69378c41b603179fe181a87561dc5756401240ed2ffbaa5a"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.updateBasicProperties (cyclomatic 29): repo.updateBasicProperties 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":"routers/api/v1/repo/repo.go"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff50e00126a96f327ffd96b709dd91fc5fa0fc655968b7a7b25b5d30ceab456"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.SignInOAuthCallback (cyclomatic 29): auth.SignInOAuthCallback 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":"routers/web/auth/oauth.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a95cfd91315d52b8ff6eb65b73f5ecccad4498664cb5064b19a0998e9365ed4"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.AuthorizeOAuth (cyclomatic 29): auth.AuthorizeOAuth 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":"routers/web/auth/oauth2_provider.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"663f5a470e03bec32c31f06a23afe75eba64d78aa2a6a5711707ba282eb9c93b"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.ViewIssue (cyclomatic 29): repo.ViewIssue 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":"routers/web/repo/issue_view.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"f113c5c2c79aa5551cf5883793ec3e7021a3db37cb943224bd6ab90acbdeca3e"}},{"ruleId":"D1","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxFormProps (cyclomatic 29): pullRequestViewInfo.prepareMergeBoxFormProps 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":"routers/web/repo/pull_merge_form.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"58ba8095b3557d30c85a9618afdbb6bd821bd3b0bbce6b0d466f19172db68549"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.UserSignIn (cyclomatic 29): auth.UserSignIn 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":"services/auth/signin.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"081fb0324fb4e298636679e1ae51034c8329cf47cde8a4605f18772c830aaa2b"}},{"ruleId":"D1","level":"warning","message":{"text":"files.getFileContentsByEntryInternal (cyclomatic 29): files.getFileContentsByEntryInternal 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":"services/repository/files/content.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"e668fa03d3a12e9544d2f1b1c73594ad62de158c83df1472a16eabf03b0550f7"}},{"ruleId":"D1","level":"warning","message":{"text":"files.handleCheckErrors (cyclomatic 29): files.handleCheckErrors 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":"services/repository/files/update.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"278d7a38caca16bb8dec2a925e7bd8e120ffff45790e17a5b0f02cfaafa2e84c"}},{"ruleId":"D1","level":"warning","message":{"text":"git.walkGitLog (cyclomatic 28): git.walkGitLog 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":"modules/git/log_name_status_nogogit.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"27643525ee4fcd14f8909bc55a38545903e49e548bb93e4c48ac5b0dc5de25c8"}},{"ruleId":"D1","level":"warning","message":{"text":"v1.checkTokenPublicOnly (cyclomatic 28): v1.checkTokenPublicOnly has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to one function literal inside it that branches (line 249). 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":"routers/api/v1/api.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffdce2df7851f12390dae02a7ad3edc7884e93411f1bd677684583d4639334e2"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.handleOAuth2SignIn (cyclomatic 28): auth.handleOAuth2SignIn 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":"routers/web/auth/oauth.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"26090f02d226c47d7b4140b64ba27b19bd11db1fc835d585011519fda48c297c"}},{"ruleId":"D1","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxStatusCheckData (cyclomatic 28): pullRequestViewInfo.prepareMergeBoxStatusCheckData has cyclomatic complexity 28 (threshold 15). Of this number, 24 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":"routers/web/repo/pull.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3310bcf5dd975f15a7e5385411f9cb7e7f7ccae9275d2111380bcac99f9e3b"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.createRepositoryInDB (cyclomatic 28): repository.createRepositoryInDB 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":"services/repository/create.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e5118dda67a8b42b60febd25f2cc071660bafc6e5d30ae385d6ba95a6fc8b4"}},{"ruleId":"D1","level":"warning","message":{"text":"openapi3gen.extractSharedEnums (cyclomatic 27): openapi3gen.extractSharedEnums 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":"build/openapi3gen/convert.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d608e3fc7d2537e3d85c521d93fea552c35bfe0a87af75b1d513511c823ac5"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.InitWorkPathAndCfgProvider (cyclomatic 27): setting.InitWorkPathAndCfgProvider has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 13 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/setting/path.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b1384f3b1fffd7f6dbf685c7d0feb42d6c9949952e7bd29c1390f2c38cd7c0"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.updateMirror (cyclomatic 27): repo.updateMirror 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":"routers/api/v1/repo/repo.go"},"region":{"startLine":1021}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa862c6443452e29db65115feb48608c373bd04452cf5896b47f966af7a5d2bf"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.ServeAttachment (cyclomatic 27): repo.ServeAttachment 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":"routers/web/repo/attachment.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"545e61a15418df64b400e0b639109354a4fc3cf73de419fd3a0a4ce723e02d26"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.SearchRepoIssuesJSON (cyclomatic 27): repo.SearchRepoIssuesJSON 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":"routers/web/repo/issue_list.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"c35a0951018b14752d8361005c069359a9d4c8f481682c6d807157debc98ddd2"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaLocalUploader.updateGitForPullRequest (cyclomatic 27): GiteaLocalUploader.updateGitForPullRequest has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/gitea_uploader.go"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39152526093dd81d87c601aa4cfe3ca6656c1dd513ce953de3b0ce0faf9ddf6"}},{"ruleId":"D1","level":"warning","message":{"text":"release.UpdateRelease (cyclomatic 27): release.UpdateRelease has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 278). 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":"services/release/release.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"da48188358948c5862158df7a321d0e852196615645bdddb013558b802d75f3d"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.GenerateRepository (cyclomatic 27): repository.GenerateRepository 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, 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":"services/repository/template.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fe63ad653bb59642233ab4cf08131d87db967e38107408791b3e028b13e4773"}},{"ruleId":"D1","level":"warning","message":{"text":"user.UpdateUser (cyclomatic 27): user.UpdateUser 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":"services/user/update.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"77bfb4568d9df7851fb78202c973c496994bc5375caadb2edae4e17a8d1435b1"}},{"ruleId":"D1","level":"warning","message":{"text":"pipeline.findLFSFileFunc (cyclomatic 26): pipeline.findLFSFileFunc 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":"modules/git/pipeline/lfs_find.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"157a238e5d12d11e0ba31e5d60a239684ac8458d9205560cbdd8041ad7455c1e"}},{"ruleId":"D1","level":"warning","message":{"text":"MarshalEncoder.marshalIntInternal (cyclomatic 26): MarshalEncoder.marshalIntInternal has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/rubygems/marshal.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f458a43a908d764315b1a508d01563c82c64775478f96f69ebddea2d04801a59"}},{"ruleId":"D1","level":"warning","message":{"text":"Conn.readV2ProxyHeader (cyclomatic 26): Conn.readV2ProxyHeader has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/proxyprotocol/conn.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aafd5982221648dd44d6cdb9a5e58138bcb0d58d1f04a80d71be6fa180fae3f"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.SyncRepoBranchesWithRepo (cyclomatic 26): repository.SyncRepoBranchesWithRepo has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/repository/branch.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba31bcf0a6b451c1681adcb50ae04a99be4a5ee04d138994caa07e46d25aa29"}},{"ruleId":"D1","level":"warning","message":{"text":"eval.exec (cyclomatic 26): eval.exec has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/templates/eval/eval.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b085fbf28bf48766d3321178bf6b0a152fdb079220722eb2ace7bf62978be1"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.EditUserPost (cyclomatic 26): admin.EditUserPost has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/admin/users.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a65dd9d7f18fdc8db6e47ee7960a02f6ae3fbce04a6897d513f54009d2bf03d"}},{"ruleId":"D1","level":"warning","message":{"text":"asymkey.parseCommitWithGPGSignature (cyclomatic 26): asymkey.parseCommitWithGPGSignature 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":"services/asymkey/commit.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2202f45455271122893cb8cf319610bbf17866f7dab41ba5b902182bdecb4d1"}},{"ruleId":"D1","level":"warning","message":{"text":"asymkey.SignMerge (cyclomatic 26): asymkey.SignMerge 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":"services/asymkey/sign.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ccb3f6a42d6cbf22d2cdf93ab9fd944720cc2a725c5e2a2834cf5ecb8079d9"}},{"ruleId":"D1","level":"warning","message":{"text":"mailer.composeIssueCommentMessages (cyclomatic 26): mailer.composeIssueCommentMessages 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":"services/mailer/mail_issue_common.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fcf051bce594271d5de0b8cbe61a9f165bbaa1647871087e76b90d6e9ff27a8"}},{"ruleId":"D1","level":"warning","message":{"text":"arch.buildPackagesIndex (cyclomatic 26): arch.buildPackagesIndex 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":"services/packages/arch/repository.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d373d489a3241f063c5a955b859f9f054f31dca0c5833bbf01a28b41bbf49f1"}},{"ruleId":"D1","level":"warning","message":{"text":"git.syncGitConfig (cyclomatic 25): git.syncGitConfig 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":"modules/git/config.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"989c193a62503483d1189b2f3f6270f1978009ae9a46f97a5a3fbdd6f156a59c"}},{"ruleId":"D1","level":"warning","message":{"text":"globCompiler.compile (cyclomatic 25): globCompiler.compile 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":"modules/glob/glob.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b346dfa353e81c621e677b3629e1e87bcfe790af4ef76c2454722ffc887c97"}},{"ruleId":"D1","level":"warning","message":{"text":"markup.issueIndexPatternProcessor (cyclomatic 25): markup.issueIndexPatternProcessor 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":"modules/markup/html_issue.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"f379363f46a6bcc23c1e4ea11004a79924f4ce83511d9b4d6d7dae4646c31814"}},{"ruleId":"D1","level":"warning","message":{"text":"middleware.Validate (cyclomatic 25): middleware.Validate has cyclomatic complexity 25 (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":"modules/web/middleware/binding.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"1773927082b9e9e3eb173b816e82091781a97f69189178bda0ef460fd1576b0b"}},{"ruleId":"D1","level":"warning","message":{"text":"web.verifyAuthWithOptions (cyclomatic 25): web.verifyAuthWithOptions has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 173). 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":"routers/web/web.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"712d232ddf2fe24d8bc7c1398b657a9d9451a79d7acbbe5907ba075639cd69df"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.SearchRepo (cyclomatic 25): repo.SearchRepo 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":"routers/web/repo/repo.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"53bb8368e7a5012231726fd6a9cef2d2b4c323df370170d56d36e7eb6e4b5a0e"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.prepareFileView (cyclomatic 25): repo.prepareFileView 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":"routers/web/repo/view_file.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdcc6f83da4057d08d4688d2d05e05987b62eeaf99010ca3c5d6883ec6f100de"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.renderViewPage (cyclomatic 25): repo.renderViewPage 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":"routers/web/repo/wiki.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"79282f92b4a54e68fe76f1084273c37dad3343183eb160b63213a90809214c64"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.Repos (cyclomatic 25): setting.Repos has cyclomatic complexity 25 (threshold 15). Of this number, 16 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":"routers/web/user/setting/profile.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddc4f6d4d14fc7a20ae311ee85d342fdbb2b092827b60a177a85eac2abc323ef"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.checkJobsOfCurrentRunAttempt (cyclomatic 25): actions.checkJobsOfCurrentRunAttempt has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 280). 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":"services/actions/job_emitter.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"b878a6e59a1a354bc44d37fe1b51ca7da2b3685e173dcfe0faf2dc3934990814"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.InsertRun (cyclomatic 25): actions.InsertRun has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/run.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dbfacec8ede886fc1259cdf3cd59c7541626fd44d535ea7c1300ee647771f60"}},{"ruleId":"D1","level":"warning","message":{"text":"jobStatusResolver.resolve (cyclomatic 25): jobStatusResolver.resolve 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":"services/actions/job_emitter.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"925db644af166a1719da7c2f961cb32cdf6081bb3445832ed653a7ac2f3c87a0"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.checkStorage (cyclomatic 25): doctor.checkStorage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 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":"services/doctor/storage.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7428cca1d93e9fbe7e01b01890ef21c2d1224ea468149fb36db3e922ed9d39a5"}},{"ruleId":"D1","level":"warning","message":{"text":"ReplyHandler.Handle (cyclomatic 25): ReplyHandler.Handle 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":"services/mailer/incoming/incoming_handler.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f5124ac687248da81b96e4f32901da41303d5e7257994ba52e337261cae07d"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.createCodeComment (cyclomatic 25): pull.createCodeComment 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":"services/pull/review.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"45fb945ede7f6a58bacbc8a71cc31b02ce8d3dd6ea0a38d06013ee347ea75d8d"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.ForkRepository (cyclomatic 25): repository.ForkRepository has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 3 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":"services/repository/fork.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de4a1f093f389ee1031a169960e321546f8e318ca639a970654f377a4adacab"}},{"ruleId":"D1","level":"warning","message":{"text":"db.CheckCollations (cyclomatic 24): db.CheckCollations 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":"models/db/collation.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f1045c3900d36bac70dcffbddb411e6b29bea9ac7ef3eeeac3e40b6027daabb"}},{"ruleId":"D1","level":"warning","message":{"text":"access.GetIndividualUserRepoPermission (cyclomatic 24): access.GetIndividualUserRepoPermission has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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":"models/perm/access/repo_permission.go"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69867746dce681a6c39b6fc884fb430ea104e6df3c7cc04c9c7869968c50372"}},{"ruleId":"D1","level":"warning","message":{"text":"fixturesHookStruct.BeforeProcess (cyclomatic 24): fixturesHookStruct.BeforeProcess has cyclomatic complexity 24 (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":"models/unittest/fixtures.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfef305494f909de87486f9150be877b492d38dbedffe97af776d143edf21979"}},{"ruleId":"D1","level":"warning","message":{"text":"code.Init (cyclomatic 24): code.Init has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 149, 216, 128, \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":"modules/indexer/code/indexer.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb3492e84742feb1d46a10fd1e83f385795186b27ebe40eee8767504ec42534"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.ToSearchOptions (cyclomatic 24): issues.ToSearchOptions has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, 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":"modules/indexer/issues/dboptions.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c1d2759863398986e9af311ca704029cff92160c0931038115a6acbbacfd47"}},{"ruleId":"D1","level":"warning","message":{"text":"template.validateOptions (cyclomatic 24): template.validateOptions 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":"modules/issue/template/template.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"be0c9d7bd92b7a6ab47fabdc225b50e2c13cd3d6388c1258a23de6c85161e0c6"}},{"ruleId":"D1","level":"warning","message":{"text":"debian.ParseControlFile (cyclomatic 24): debian.ParseControlFile 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":"modules/packages/debian/metadata.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"85d0adfe1fa156f58932b580dd646fb6520a8d65f0f2a4f967635e15e3e72f99"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.GetAllCommits (cyclomatic 24): repo.GetAllCommits 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":"routers/api/v1/repo/commits.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d9ffe9ce961db5e33b5a863620f61267103b97bbbe71753c88f1ba3f5588c3f"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.apiReviewRequest (cyclomatic 24): repo.apiReviewRequest 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":"routers/api/v1/repo/pull_review.go"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"77497d5dbf47163981686a93da5df07095ed7a9c178d430d182ae5bff1075c8f"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.handleSettingsPostMirror (cyclomatic 24): setting.handleSettingsPostMirror 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"092f4aa0863ff91aae7710fe52e0ab488844f4a83237ab377e2e0e5be4649ae0"}},{"ruleId":"D1","level":"warning","message":{"text":"automerge.handlePullRequestAutoMerge (cyclomatic 24): automerge.handlePullRequestAutoMerge 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":"services/automerge/automerge.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"b399ea35d46d9aa9aa94e745c2ddcef876aecf076c9bc4183bd3d119d6031f03"}},{"ruleId":"D1","level":"warning","message":{"text":"context.determineAccessMode (cyclomatic 24): context.determineAccessMode 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":"services/context/package.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"821841f5d76ae7bb2c34154827dfa820e4a21d46142b34d540fefeb5bb79202a"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.createTemporaryRepoForPR (cyclomatic 24): pull.createTemporaryRepoForPR 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, 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":"services/pull/temp_repo.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be47b34b7861e635b35924241b5fb938bdac9fffaea8d871a9358d9277117ad"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.adoptRepository (cyclomatic 24): repository.adoptRepository 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":"services/repository/adopt.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d1199cb9ebde2fc738ae9cceb6144d7ad37702fd6e7d58a73df97a774bae60"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.DeleteBranchAfterMerge (cyclomatic 24): repository.DeleteBranchAfterMerge 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":"services/repository/branch.go"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ed0e40185580eb48b1ee14b0d449a826ad09b2a7ec69b0a799361ba187ffa2"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.runDumpRepository (cyclomatic 23): cmd.runDumpRepository 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/dump_repo.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e0cb63e3c8a18835b42a60f256c312e02cd77d6a3b4b28d05a18e023f8b8993"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_16.UnwrapLDAPSourceCfg (cyclomatic 23): v1_16.UnwrapLDAPSourceCfg has cyclomatic complexity 23 (threshold 15). Of this number, 13 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":"modelmigration/v1_16/v189.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"06abdd5a165aaf9b710a6d3f7ce42f444240746cd68a7e1849e0109c570a6af0"}},{"ruleId":"D1","level":"warning","message":{"text":"git.RenameBranch (cyclomatic 23): git.RenameBranch has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 320). 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":"models/git/branch.go"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3dd21521bb1b7d90acbc620cbaf775fb1b756b88cd4d163bacc72eded3d8491"}},{"ruleId":"D1","level":"warning","message":{"text":"user.GetUsersByEmails (cyclomatic 23): user.GetUsersByEmails 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":"models/user/user.go"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"083d4a9cfaaa8ad3019a781d1f70c2cedbfd6beca12d9e7d7eec18a5c6bfc6bb"}},{"ruleId":"D1","level":"warning","message":{"text":"git.GrepSearch (cyclomatic 23): git.GrepSearch has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 85). 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":"modules/git/grep.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c41c63aa147f1df01dd39f5b0c6185098e18d2179eb6b56a95c41468d04251"}},{"ruleId":"D1","level":"warning","message":{"text":"code.nonGenesisChanges (cyclomatic 23): code.nonGenesisChanges has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/indexer/code/git.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a90990dc7dffe00e91bd076e298a52de4266bd414c72c237553a379a356468"}},{"ruleId":"D1","level":"warning","message":{"text":"template.validateYaml (cyclomatic 23): template.validateYaml 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":"modules/issue/template/template.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae77f4432fcd2db5b4c832d7135c8b3c81153e1a952478d0446d0c4b7222ae2e"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.Diff (cyclomatic 23): repo.Diff 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":"routers/web/repo/commit.go"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"c941a500bc086a9fb4887c5dad4bd1426490681fa09d3075f92b822c5651fb1b"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.CompareAndPullRequestPost (cyclomatic 23): repo.CompareAndPullRequestPost 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":"routers/web/repo/pull.go"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3487cf81c512c3147613fb90ea8994c6baa06cf798efc9030deb4d5db75fd92"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.expandReusableWorkflowCaller (cyclomatic 23): actions.expandReusableWorkflowCaller 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":"services/actions/reusable_workflow.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f1ada958caad7a2a6613ab24a8c9d1de8764e5b109428fb825f8844c850112"}},{"ruleId":"D1","level":"warning","message":{"text":"context.PrepareCommitFormOptions (cyclomatic 23): context.PrepareCommitFormOptions 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":"services/context/repo.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c082454f804d60843f5ca16a830d365dc71d10930dd88e389933d97e7e40d04"}},{"ruleId":"D1","level":"warning","message":{"text":"convert.innerToRepo (cyclomatic 23): convert.innerToRepo 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":"services/convert/repository.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"6526949cb9de02e6599b74340bc97028eb801e2f265ee2a49b611c38bfdf9945"}},{"ruleId":"D1","level":"warning","message":{"text":"issue.PullRequestCodeOwnersReview (cyclomatic 23): issue.PullRequestCodeOwnersReview has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/issue/pull.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"b689350a8a28a8ba111b02981ffb98714e9b34aadc165223badee37bfd3fec16"}},{"ruleId":"D1","level":"warning","message":{"text":"lfs.BatchHandler (cyclomatic 23): lfs.BatchHandler 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":"services/lfs/server.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"e581282162b5ac762fcbb2fa6b6e7559715035efd27291cef4495aa6be225fed"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaLocalUploader.CreateComments (cyclomatic 23): GiteaLocalUploader.CreateComments 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":"services/migrations/gitea_uploader.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9f599f54166ae6717e423acbd643ee7b3ad9bbb23344fb1bd202b93c7c21c8"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.CheckPullMergeable (cyclomatic 23): pull.CheckPullMergeable has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 142). 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":"services/pull/check.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e54d1af9f90d4fd51d20ff3ae2566656442ff360b32171b2ee6bf3ba5c3aa0"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.unmergedFiles (cyclomatic 23): pull.unmergedFiles 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 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":"services/pull/patch_unmerged.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"93baf7ccf953c57a6d9b0f22dee76b98d623d7f7e325002e02a2177a36754298"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.AggregateJobStatus (cyclomatic 22): actions.AggregateJobStatus 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":"models/actions/run_job.go"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed863d6975340ef7f284a35bb4d3758a93bede9bb7a73b0f8bfe6ed98e4eaeb"}},{"ruleId":"D1","level":"warning","message":{"text":"asymkey.AddGPGKey (cyclomatic 22): asymkey.AddGPGKey has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 75). 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":"models/asymkey/gpg_key_add.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"6134f5088127ce0dadab5e2d278eeb168d83f8d7f86d9d4e37f2f4b9ec78b8a7"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.findCodeComments (cyclomatic 22): issues.findCodeComments 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":"models/issues/comment_code.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"49bd0b41acb13220e919d088d9d73bc8f942d6b8d3e685c5b82aa76b8f89400f"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.NewIssueWithIndex (cyclomatic 22): issues.NewIssueWithIndex 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":"models/issues/issue_update.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"1946a8e3ffbfdd5ff18e245e3381e86686772cbea1cc2dbf68b7f721c007005b"}},{"ruleId":"D1","level":"warning","message":{"text":"Repository.GetCodeActivityStats (cyclomatic 22): Repository.GetCodeActivityStats has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 69). 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":"modules/git/repo_stats.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"a39d107082848142b8783acf98ed92fd7f24ecf0d8a7f65139cb2441590334cb"}},{"ruleId":"D1","level":"warning","message":{"text":"Renderer.Render (cyclomatic 22): Renderer.Render 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":"modules/markup/csv/csv.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"e517c86c20861f5c4ea6bd087fc4fbe50b7a24b9c4e6fabecbd01cff1c92b50c"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.StoreMissingLfsObjectsInRepository (cyclomatic 22): repository.StoreMissingLfsObjectsInRepository has cyclomatic complexity 22 (threshold 15). Of this number, 15 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":"modules/repository/repo.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b7180be7fc973f51b4120eb0a07e172b4542e9b93d32753b0dff3fb30d80505"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.SearchIssues (cyclomatic 22): repo.SearchIssues 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":"routers/api/v1/repo/issue.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"68cd8de31dacac034d14659963ebebb2cb32c950617bcbcf14601cdd0a26d92a"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.combineLabelComments (cyclomatic 22): repo.combineLabelComments 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":"routers/web/repo/issue_view.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"486ba0b7709f77b214ed75dfa0402cbb72eae1f801f6038c10ac412ce15e7117"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.NewReleasePost (cyclomatic 22): repo.NewReleasePost has cyclomatic complexity 22 (threshold 15). 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: 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":"routers/web/repo/release.go"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e7bbbae722e36ffa30184c95e7eb6cf8258487194688f3e2e7e55cb2a9b246"}},{"ruleId":"D1","level":"warning","message":{"text":"user.NotificationSubscriptions (cyclomatic 22): user.NotificationSubscriptions has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/user/notification.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"86789615db835478d1591d318b221ba7af883ffa83b41cc722256523ea2d5ffb"}},{"ruleId":"D1","level":"warning","message":{"text":"issue.HasAllRequiredCodeownerReviews (cyclomatic 22): issue.HasAllRequiredCodeownerReviews 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":"services/issue/pull.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c4bd35a216a8a23c6ee26f2928df313af8bc8ea28695be395b49698f8a0281b"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaLocalUploader.CreateReleases (cyclomatic 22): GiteaLocalUploader.CreateReleases has cyclomatic complexity 22 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/gitea_uploader.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1d550727be67aaaa85570b5800633c87d3b2b54cdc1fd4e31eca551b248a64b"}},{"ruleId":"D1","level":"warning","message":{"text":"mirror.SyncPullMirror (cyclomatic 22): mirror.SyncPullMirror 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":"services/mirror/mirror_pull.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"a39a4036648aedf0bc93c18a3be89f668515afb3fe3cb7bec6c2ca33e721e324"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.getMergeMessage (cyclomatic 22): pull.getMergeMessage 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":"services/pull/merge.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca4f6597eeeff1c7db556534f7e427d7d667d039d5907a509abc6f27d802f9d3"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.CreateRepositoryDirectly (cyclomatic 22): repository.CreateRepositoryDirectly 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, 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":"services/repository/create.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15900642e2f762b8fad1f18adcf5d80338f4fb0d5c8b552913875ea861b00d8"}},{"ruleId":"D1","level":"warning","message":{"text":"openapi3gen.ScanSwaggerEnumTypes (cyclomatic 21): openapi3gen.ScanSwaggerEnumTypes 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":"build/openapi3gen/enumscan.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8d86571b762845a5bf88bb21e26cf5ec72caa7ae490b626a3d2ae4bc68c1e1"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_9.FixReleaseSha1OnReleaseTable (cyclomatic 21): v1_9.FixReleaseSha1OnReleaseTable 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":"modelmigration/v1_9/v82.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ce765ab4ccc58b3d147f5ca54976ef7b7f647727ecf67f7c7fc5620c73a0ea"}},{"ruleId":"D1","level":"warning","message":{"text":"activities.createOrUpdateIssueNotifications (cyclomatic 21): activities.createOrUpdateIssueNotifications 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":"models/activities/notification_list.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f4d931cb8b304edb628d035c61b0f33f3d6a32b2d2f6270b15017863cea066"}},{"ruleId":"D1","level":"warning","message":{"text":"access.GetActionsUserRepoPermission (cyclomatic 21): access.GetActionsUserRepoPermission 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":"models/perm/access/repo_permission.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2885197a8b718299b008dbed2ec3099f12fc213b8e27ec913580de319bda588"}},{"ruleId":"D1","level":"warning","message":{"text":"db.ToDBOptions (cyclomatic 21): db.ToDBOptions has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/indexer/issues/db/options.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"23e5a39f9cc5ce5a4f5483d2f655a6dd9e1c91ac119b41b257439cc56c2e1b62"}},{"ruleId":"D1","level":"warning","message":{"text":"typesniffer.DetectContentType (cyclomatic 21): typesniffer.DetectContentType 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":"modules/typesniffer/typesniffer.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"7749a6a84cbf3652dd35ef2fe8773b9433d3d237465cadc752e6ba349277b1a3"}},{"ruleId":"D1","level":"warning","message":{"text":"util.ToSnakeCase (cyclomatic 21): util.ToSnakeCase 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":"modules/util/string.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e95fcbfcf78657ab2d9d9706c53708a49c5785e9959d24dfcbd8b77f543fca"}},{"ruleId":"D1","level":"warning","message":{"text":"conan.uploadFile (cyclomatic 21): conan.uploadFile 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":"routers/api/packages/conan/conan.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23c3518a6fc569419ed34f8800bb94fd863809745ecee6c0b58d3ff89e8357c"}},{"ruleId":"D1","level":"warning","message":{"text":"conan.searchPackages (cyclomatic 21): conan.searchPackages 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":"routers/api/packages/conan/search.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"105dda0b732dba471560dd3f0d771275cb52de3b59ab1d63a0f831de50d9a953"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.parseCompareInfo (cyclomatic 21): repo.parseCompareInfo has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/pull.go"},"region":{"startLine":1085}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1928b69744f61d7ec0cfadf2f024c5668f5a6df2f1341dba555c49089951e7f"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.signInOpenIDVerify (cyclomatic 21): auth.signInOpenIDVerify 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":"routers/web/auth/openid.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7b54ef81f61dd15df606797e55ba5bbe46217294b2c92cf125ed098480b638a"}},{"ruleId":"D1","level":"warning","message":{"text":"devtest.MockActionsRunsJobs (cyclomatic 21): devtest.MockActionsRunsJobs 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":"routers/web/devtest/mock_actions.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"c23fe0eed41eebac807b6efec89606befd049e4f6d557b30cccdeeddc1c1a683"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.ChangeCommentReaction (cyclomatic 21): repo.ChangeCommentReaction 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":"routers/web/repo/issue_comment.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"873fa05db24119f309c4f9a8429b8d80b97b07f3809ce32dcaa95222bea37970"}},{"ruleId":"D1","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxIconColor (cyclomatic 21): pullRequestViewInfo.prepareMergeBoxIconColor has cyclomatic complexity 21 (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":"routers/web/repo/pull_merge_box.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bdf6c26501ebb19edd182cfe351321a9f3f51cd91c06df6381f7b7fa5fe899f"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.EmailPost (cyclomatic 21): setting.EmailPost 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":"routers/web/user/setting/account.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4aae4c54499ea73c7a5e2f462296d9d48d02c2a0852ffc0e3a1b90e8390ac4"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.detectAndHandleScopedWorkflows (cyclomatic 21): actions.detectAndHandleScopedWorkflows 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":"services/actions/notifier_helper.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"0059e85b77cafd64d53f60ac88478067d075828fbd9c5b63c4cbf26cd32ef131"}},{"ruleId":"D1","level":"warning","message":{"text":"rerunPlan.expandRerunJobIDs (cyclomatic 21): rerunPlan.expandRerunJobIDs 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":"services/actions/rerun.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"585220af45b27a0e2085f65bd1f1901f12b0083528ce8c74b6033c89a611049f"}},{"ruleId":"D1","level":"warning","message":{"text":"convert.ToCommit (cyclomatic 21): convert.ToCommit 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":"services/convert/git_commit.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4ccd7fc3f69a3f9c9ab89883746fa27559fbea6ac7eba9e295713eb942f9bf0"}},{"ruleId":"D1","level":"warning","message":{"text":"convert.toIssue (cyclomatic 21): convert.toIssue 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":"services/convert/issue.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e53b92e85e6abc95a066ff5a928fda87fe420d45ad6bd71c262060cfdd807ae"}},{"ruleId":"D1","level":"warning","message":{"text":"issue.isValidReviewRequest (cyclomatic 21): issue.isValidReviewRequest 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":"services/issue/review_request.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"20e384e96aab9282ccbfca6932c7975c6d5e120ccefdfc6341db87265c48a66d"}},{"ruleId":"D1","level":"warning","message":{"text":"incoming.processMessages (cyclomatic 21): incoming.processMessages has cyclomatic complexity 21 (threshold 15). Of this number, 13 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":"services/mailer/incoming/incoming.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47d19724b06282c3afcb5afee921833f5766a0e865ab161dd8cfd7fa8c014f8"}},{"ruleId":"D1","level":"warning","message":{"text":"mailer.composeAndSendActionsWorkflowRunStatusEmail (cyclomatic 21): mailer.composeAndSendActionsWorkflowRunStatusEmail 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 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":"services/mailer/mail_workflow_run.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d060abf1ec47bdd39c53aad1d34a47a7ed6fc3920843b5598f44b35a32b9fb4"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaLocalUploader.newPullRequest (cyclomatic 21): GiteaLocalUploader.newPullRequest 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":"services/migrations/gitea_uploader.go"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"d07afd62554baa060aff3af01d5fa143048b3c39d1be14cfb92592e19443731c"}},{"ruleId":"D1","level":"warning","message":{"text":"org.RemoveOrgUser (cyclomatic 21): org.RemoveOrgUser has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 50). 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":"services/org/user.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"edc2a1088264a3a3175819c71ef8137e42b1e61fecc56eb3c010c0ec3c7730a1"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.AdjustPullsCausedByBranchDeleted (cyclomatic 21): pull.AdjustPullsCausedByBranchDeleted 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":"services/pull/pull.go"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ac9379952930cee188e9a1fd1605ceade87feb482b38d4b363f431477e7c987"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.CheckUserAllowedToUpdate (cyclomatic 21): pull.CheckUserAllowedToUpdate 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":"services/pull/update.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"753e21b8df6cce6287daad6375b630860917d00c44287a227655a9561ab45ec7"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.RenameBranch (cyclomatic 21): repository.RenameBranch has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 5 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":"services/repository/branch.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"e11c6a99f104bc94907f3dd5de431f4675c688a868b2528898cf7369bdd44103"}},{"ruleId":"D1","level":"warning","message":{"text":"files.modifyFile (cyclomatic 21): files.modifyFile 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":"services/repository/files/update.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64e95ca1dc853fad82b8e9424dcf017bff1e1b58a640ad2124373f35b0bc0de"}},{"ruleId":"D1","level":"warning","message":{"text":"task.runMigrateTask (cyclomatic 21): task.runMigrateTask has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 9 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":"services/task/migrate.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"90955755a4141dbc944d1d06365a6fcb0f255f30b6d2c5dd03d59e1865bf1b41"}},{"ruleId":"D1","level":"warning","message":{"text":"user.RenameUser (cyclomatic 21): user.RenameUser 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":"services/user/user.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b006debb504a4add82916675eae609aa9ecfaa1bc635f0858d5909803bcc6cd"}},{"ruleId":"D1","level":"warning","message":{"text":"webhook.Deliver (cyclomatic 21): webhook.Deliver has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 6 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":"services/webhook/deliver.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"3219b7a021a79ad39b2f18c4322d5dc9a6d41ade6fc3bbef08dedb666d61a3a3"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.StopTask (cyclomatic 20): actions.StopTask 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":"models/actions/task.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"762e77505ca1af867bd68bdb8f88041265bab5199959f34000a41cf4215c0097"}},{"ruleId":"D1","level":"warning","message":{"text":"activities.GetFeeds (cyclomatic 20): activities.GetFeeds 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":"models/activities/action_list.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"3effd3f731d66cc092667fe3bc902589daf2691a83c752050aa5f335e066b859"}},{"ruleId":"D1","level":"warning","message":{"text":"asymkey.parseKeyString (cyclomatic 20): asymkey.parseKeyString 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":"models/asymkey/ssh_key_parse.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c59190238a28fe393342ba074a75ecfb706a5cfde8a2ff6b16a39788cd745f3"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.detectWorkflowMatch (cyclomatic 20): actions.detectWorkflowMatch 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":"modules/actions/workflows.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a9c9558a406e61df0f230fc027bb408e0f26df681d318a89b2fa3ac689f713"}},{"ruleId":"D1","level":"warning","message":{"text":"BlameReader.NextPart (cyclomatic 20): BlameReader.NextPart 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":"modules/git/blame.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"25acebb77a91ba3b5b6e77eb6247b9f6946f8d7609f0b7148799a27d49e7bd7a"}},{"ruleId":"D1","level":"warning","message":{"text":"Indexer.Search (cyclomatic 20): Indexer.Search 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":"modules/indexer/code/bleve/bleve.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e451729b5198db23d3958e084eae7711c029c30c021de750e805c69405501a"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.InitIssueIndexer (cyclomatic 20): issues.InitIssueIndexer has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 75, 147). 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":"modules/indexer/issues/indexer.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7ac3a305c38def7b9977daaa6549a8d2db58e1d90307f8ebe0e833a64209704"}},{"ruleId":"D1","level":"warning","message":{"text":"valuedField.WriteTo (cyclomatic 20): valuedField.WriteTo 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":"modules/issue/template/template.go"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de790a15768e60400f2c18c1414087cd7c63285911e9f3b434b16c03755f17c"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaBackend.Batch (cyclomatic 20): GiteaBackend.Batch 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":"modules/lfstransfer/backend/backend.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab107cbbf061c24d2f7d0d320a1131fc6049ce5f1452dfdd82b71b4ef4e3b06e"}},{"ruleId":"D1","level":"warning","message":{"text":"rpm.getEntries (cyclomatic 20): rpm.getEntries 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":"modules/packages/rpm/metadata.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aebc3f456e49b9d1f44989f745c729b0309a72131748338262ad6c255c67579"}},{"ruleId":"D1","level":"warning","message":{"text":"swift.ParsePackage (cyclomatic 20): swift.ParsePackage 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":"modules/packages/swift/metadata.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce322cb0a4214f577a2f7eb4d9c28f4dd6b7cf36a54687365adcf770ea4df70c"}},{"ruleId":"D1","level":"warning","message":{"text":"WorkerPoolQueue.doFlush (cyclomatic 20): WorkerPoolQueue.doFlush 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":"modules/queue/workergroup.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"be2800c29e697d8a17f5ecddccc59ae1e5fbb81c7ed702e112cbd0056dd1d6fc"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.loadMarkupFrom (cyclomatic 20): setting.loadMarkupFrom has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. 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":"modules/setting/markup.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dc95d5f8aab2d3b692da7dee13be94a2352240b1076a13265fb3658dc68b865"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.loadRepositoryFrom (cyclomatic 20): setting.loadRepositoryFrom 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":"modules/setting/repository.go"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"67505e8d0225013957023f49e5424292299675b9aac91d48f7c28db7688cdca4"}},{"ruleId":"D1","level":"warning","message":{"text":"ssh.publicKeyHandler (cyclomatic 20): ssh.publicKeyHandler 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":"modules/ssh/ssh.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af6d76eee1fcb8063b000aa07876d0c2a7c695a8d6f32db420a3096ca7b4d12"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.CreateUser (cyclomatic 20): admin.CreateUser 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":"routers/api/v1/admin/user.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"d79d29d088d05eea601cddc342c2157eccaeab6c9bcd12b5167aa55472c321a0"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.NewUserPost (cyclomatic 20): admin.NewUserPost 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":"routers/web/admin/users.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"5496cf14daa1f3bc596bed7d409db982b6b5176450055dad0515e095780389c4"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.LinkAccountPostRegister (cyclomatic 20): auth.LinkAccountPostRegister 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":"routers/web/auth/linkaccount.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"48e93f979de055d2cfa70507a2d95ce40904ff8938fc54cd5309d146fa0e9fd4"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.oAuth2UserLoginCallback (cyclomatic 20): auth.oAuth2UserLoginCallback 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":"routers/web/auth/oauth.go"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cad767ae132b6aedff668ada71eaa61cd5a5eeb93db0ee7cdab4a6b519c773"}},{"ruleId":"D1","level":"warning","message":{"text":"explore.RenderUserSearch (cyclomatic 20): explore.RenderUserSearch has cyclomatic complexity 20 (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":"routers/web/explore/user.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"06a3a6eb0dab391affc31c87870c2067371875b1825ea34a0973a713d813baa4"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.roleDescriptor (cyclomatic 20): repo.roleDescriptor 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":"routers/web/repo/issue_view.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b829c3d02af4209cea6b0083222c0eb5abf14c83c40afe79441462bdcb3189f"}},{"ruleId":"D1","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxInfoItems (cyclomatic 20): pullRequestViewInfo.prepareMergeBoxInfoItems 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":"routers/web/repo/pull_merge_box.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"69eac30ab282b87a84540be2eb77fcdd4ef7bfdc81a48ce93e122e723f97b3c6"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.LFSFileGet (cyclomatic 20): setting.LFSFileGet 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":"routers/web/repo/setting/lfs.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c61de2478d3cf9b31a53812986f048e3e32ec38b5cf6c9779a80272928b983f"}},{"ruleId":"D1","level":"warning","message":{"text":"container.executeCleanupOneRule (cyclomatic 20): container.executeCleanupOneRule 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":"services/packages/cleanup/cleanup.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"82858aa29559449449b3efdbfb1823d102dce5672d01db8688f556992a2849fd"}},{"ruleId":"D1","level":"warning","message":{"text":"rpm.BuildSpecificRepositoryFiles (cyclomatic 20): rpm.BuildSpecificRepositoryFiles 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":"services/packages/rpm/repository.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"f74d169f5533a151e5a92851e67bed184c2e52336cdaaa35fb2f3de53c19ba50"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.doMergeAndPush (cyclomatic 20): pull.doMergeAndPush 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":"services/pull/merge.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"5219067f9e4d45e88f46682efd7f6e377d74051069d8a7b5812d992077d8d1ff"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.checkPullRequestMergeableByMergeTree (cyclomatic 20): pull.checkPullRequestMergeableByMergeTree 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":"services/pull/merge_tree.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"245389f691a02b9c15bfb76001079c95befe11e6642bfa8be60d79bd2581a7a5"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.ChangeTargetBranch (cyclomatic 20): pull.ChangeTargetBranch has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, 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":"services/pull/pull.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b44a2de63d0e398d831b796ae43dadeacc4756b3f3cd6aaa6079d6660d27b31"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.ListUnadoptedRepositories (cyclomatic 20): repository.ListUnadoptedRepositories has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 327). 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":"services/repository/adopt.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"3215578c933534e26fcb8e27e6ef6894a363801e354cd5e9b67af1cab93ed347"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.loadOneBranch (cyclomatic 20): repository.loadOneBranch 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":"services/repository/branch.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"5522426e9c9a3ea68537b73b2a458e228504fd75dde47ae0659105f072ffdefc"}},{"ruleId":"D1","level":"warning","message":{"text":"commitstatus.FindReposLatestCommitStatuses (cyclomatic 20): commitstatus.FindReposLatestCommitStatuses 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":"services/repository/commitstatus/commitstatus.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ded065aaa5d47d69acbdf97d88e3f9e1887d2dad48cfd6570f03aaca905bfe"}},{"ruleId":"D1","level":"warning","message":{"text":"wiki.DeleteWikiPage (cyclomatic 20): wiki.DeleteWikiPage 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":"services/wiki/wiki.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6a73b2dea112f42276747f5c9c7d5159af17370d3dc08a18ffcb89554bb253b"}},{"ruleId":"D1","level":"warning","message":{"text":"openapi3gen.extractEnumTypeName (cyclomatic 19): openapi3gen.extractEnumTypeName 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":"build/openapi3gen/convert.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5a1395df724c51622d43b488f3a913c457f56ab7fca560d310c8a97b0e3266"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.runHookPreReceive (cyclomatic 19): cmd.runHookPreReceive 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/hook.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7c40d26ab73b192407be87c9079d10184fd7e465ab26c7c6c63cfef72cd44e4"}},{"ruleId":"D1","level":"warning","message":{"text":"asymkey.CalculateTrustStatus (cyclomatic 19): asymkey.CalculateTrustStatus 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":"models/asymkey/gpg_key_commit_verification.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"059fee0dcde687fe9b784effa70d1cac82fff168b1cdf2c561dac073f00b9288"}},{"ruleId":"D1","level":"warning","message":{"text":"access.refreshAccesses (cyclomatic 19): access.refreshAccesses 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":"models/perm/access/access.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"432b0d4d1f430bebfb0c997078eb153038d60b29a79fc2ef980e8ab2a1273dd8"}},{"ruleId":"D1","level":"warning","message":{"text":"charset.DetectEncoding (cyclomatic 19): charset.DetectEncoding 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":"modules/charset/charset.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe5c802d4e4597a418b33f0fa59236f2ab4085d8e99739e195851c302b6c2df9"}},{"ruleId":"D1","level":"warning","message":{"text":"git.WalkShowRef (cyclomatic 19): git.WalkShowRef has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 104). 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":"modules/git/repo_branch_nogogit.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f227e0f20092b23e177d04622576cfacc2e0e6ec3b488e36986d1e287f372b"}},{"ruleId":"D1","level":"warning","message":{"text":"code.index (cyclomatic 19): code.index 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":"modules/indexer/code/indexer.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"07c832bea47f8be867c15a0650634e437531f1babcfbb535f12450ef2bc0c01c"}},{"ruleId":"D1","level":"warning","message":{"text":"blockParser.Open (cyclomatic 19): blockParser.Open 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":"modules/markup/markdown/math/block_parser.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ef1c65a3ba8d6c2a4ccf873c953377e701af04b85355682b374bf597405ada"}},{"ruleId":"D1","level":"warning","message":{"text":"nosql.ToRedisURI (cyclomatic 19): nosql.ToRedisURI 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":"modules/nosql/redis.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a8517724003ca8916018a8d36222f5108eed148814b3ffb51a2de89844dad4"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.loadActionsFrom (cyclomatic 19): setting.loadActionsFrom 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":"modules/setting/actions.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7a6f67ccce3e34cc769b91d65d68189bda601c394e91b41a7c4ff03817a459c"}},{"ruleId":"D1","level":"warning","message":{"text":"translation.InitLocales (cyclomatic 19): translation.InitLocales has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 68). 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":"modules/translation/translation.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eca541f00631b6c5850c608f44d87f3da6735c1e85245e66a7beff2068d0195"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.listOrderedChunksForArtifact (cyclomatic 19): actions.listOrderedChunksForArtifact has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/actions/artifacts_chunks.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"8268382a75663b3eb9718da90379e94c1d5b035147ab0b3feb28b646214a81e1"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.mergeChunksForArtifact (cyclomatic 19): actions.mergeChunksForArtifact has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/actions/artifacts_chunks.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"72260e81b253307839c5270c85a332659807fcc345ef8cf471d098bf615c4b17"}},{"ruleId":"D1","level":"warning","message":{"text":"cran.enumeratePackages (cyclomatic 19): cran.enumeratePackages 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":"routers/api/packages/cran/cran.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc6c72a7a3440463d529d6dd8d6c7f22a7bf57a577b774ed7a32312c9355fbc7"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.Transfer (cyclomatic 19): repo.Transfer 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":"routers/api/v1/repo/transfer.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b5f1368b5cc9b9f40fab782f88d873a5fcd112ce656d707d59dd78327ec0fc6"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.SignInPost (cyclomatic 19): auth.SignInPost 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":"routers/web/auth/auth.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b217cc6a996b7ff3347a1da67cba38ddd3a9b883da901325ef583aabe0d63bc"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.createUserInContext (cyclomatic 19): auth.createUserInContext 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":"routers/web/auth/auth.go"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e719093c44e3dc414402e121957621ec400cbd33a2dab1413bc548ceba3aff0"}},{"ruleId":"D1","level":"warning","message":{"text":"explore.Code (cyclomatic 19): explore.Code 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":"routers/web/explore/code.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8018a9069efc656c35630506937a2308830f6564845181d19978571e5c7fb2c8"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.getForkRepository (cyclomatic 19): repo.getForkRepository 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":"routers/web/repo/fork.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"3381681ca69577663e257b270a5c27f96ed5c92947bfabc0e3584f6405e46690"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.ChangeIssueReaction (cyclomatic 19): repo.ChangeIssueReaction 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":"routers/web/repo/issue.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a95e2d53075a26217defd15c08ed85959d859b85b1442a06adcb0d2266790dc"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.MigratePost (cyclomatic 19): repo.MigratePost 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":"routers/web/repo/migrate.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"fadee98c28e3c3eb0db2d9d6c6be5c5bc40f8bd9098eec956934d4e290d699f2"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.MoveIssues (cyclomatic 19): repo.MoveIssues 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":"routers/web/repo/projects.go"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"78877e371caff2994053e8540215982650d8312df3a0b490f48ad18c6cc5b382"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.UpdatePullReviewRequest (cyclomatic 19): repo.UpdatePullReviewRequest 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":"routers/web/repo/pull_review.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2c032081d78acbd1d88b6ced249cd13fa402dabe5a5d85253fcb12935ba7a98"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.GenerateGiteaContext (cyclomatic 19): actions.GenerateGiteaContext 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":"services/actions/context.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f05c972de90dd352a72b9dace255b531c1c3f520dd40fb8f4694fa5a736d8044"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.insertRunJob (cyclomatic 19): actions.insertRunJob 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":"services/actions/run.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"96f546f3e91b3de0eabcac264a07cb231c2352321796cbb45b0574ee1dc65a44"}},{"ruleId":"D1","level":"warning","message":{"text":"convert.ToNotificationThread (cyclomatic 19): convert.ToNotificationThread 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":"services/convert/notification.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1254fdfd40f10c03fb96b1889b074ae56138e2247f10d4b829fb04ace28fb31"}},{"ruleId":"D1","level":"warning","message":{"text":"mailer.actionToTemplate (cyclomatic 19): mailer.actionToTemplate has cyclomatic complexity 19 (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":"services/mailer/mail_issue_common.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"1594484d8dd2e23b99c733289e977c74edb030ce79b082e9be3d682bf03c5c76"}},{"ruleId":"D1","level":"warning","message":{"text":"debian.buildReleaseFiles (cyclomatic 19): debian.buildReleaseFiles 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":"services/packages/debian/repository.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0010317e564d0587a76713efda1a94facdc4efb6cc8f41e6200e4bcbad8ec3"}},{"ruleId":"D1","level":"warning","message":{"text":"release.createTag (cyclomatic 19): release.createTag 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":"services/release/release.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"dca8d14af4347edf11c255356ca1f36f8da37de674215abec1e5a787dd6540ec"}},{"ruleId":"D1","level":"warning","message":{"text":"gitgraph.GetCommitGraph (cyclomatic 19): gitgraph.GetCommitGraph has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 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":"services/repository/gitgraph/graph.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0d38171930eea1fd0639fbf1a61e7b4da8364275a222f7a49e05be500a1a3ff"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_11.RenameExistingUserAvatarName (cyclomatic 18): v1_11.RenameExistingUserAvatarName 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":"modelmigration/v1_11/v115.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"114c9b762eb5db007d48a7e44b5a960aafe555565ed392bd2266989a64e32de1"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.UpdateTaskByState (cyclomatic 18): actions.UpdateTaskByState has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 490). 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":"models/actions/task.go"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"fefa9ee60b240c31f5730c3463dd42273251fe68b00b61b1e459e7e13fb6b0dc"}},{"ruleId":"D1","level":"warning","message":{"text":"git.FindRecentlyPushedNewBranches (cyclomatic 18): git.FindRecentlyPushedNewBranches 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":"models/git/branch.go"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c1cfc466d165eff4c0409845b15441465eef43aa27ad4f426b18dd77099c2f"}},{"ruleId":"D1","level":"warning","message":{"text":"git.UpdateProtectBranch (cyclomatic 18): git.UpdateProtectBranch 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":"models/git/protected_branch.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"245f1deb2076d543c7e3792b5adbe0a31a68d3b2e775279e336ec02a4a7e9093"}},{"ruleId":"D1","level":"warning","message":{"text":"PackageFileSearchOptions.toConds (cyclomatic 18): PackageFileSearchOptions.toConds 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":"models/packages/package_file.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca2fcf97d88bfe3bdd2bbed7bf6ab585a88c017c908a7f696548de710a36c73e"}},{"ruleId":"D1","level":"warning","message":{"text":"unittest.ResetTestDatabase (cyclomatic 18): unittest.ResetTestDatabase has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 9 belong to 5 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":"models/unittest/testdb.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b7e5f9f8549613fd68f07c2acc947f99ab6b5e65403a084a11bf8050101d3ac"}},{"ruleId":"D1","level":"warning","message":{"text":"SearchUserOptions.toSearchQueryBase (cyclomatic 18): SearchUserOptions.toSearchQueryBase 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":"models/user/search.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9359e34c75f823dc016ebb088709ba22d745845c521e7dd1f4f7c535ca11ec4"}},{"ruleId":"D1","level":"warning","message":{"text":"htmlChunkReader.readRunes (cyclomatic 18): htmlChunkReader.readRunes 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":"modules/charset/escape_stream.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1b976e8673f50a7d8ad2d7983abbc76079904cb12c9389cac287c5934489af"}},{"ruleId":"D1","level":"warning","message":{"text":"httplib.ServeUserContentByReader (cyclomatic 18): httplib.ServeUserContentByReader 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":"modules/httplib/serve.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5b42908a1dfc004d11a4e120f2dd253d2e963f47837f75b014f3f5c18e715b0"}},{"ruleId":"D1","level":"warning","message":{"text":"ASTTransformer.Transform (cyclomatic 18): ASTTransformer.Transform 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, 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":"modules/markup/markdown/goldmark.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae158393e1e9f4ad30797d03656a7a0d97a1e5f48dbbc55afd7e2ed3d08d114"}},{"ruleId":"D1","level":"warning","message":{"text":"conda.parsePackageTar (cyclomatic 18): conda.parsePackageTar 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":"modules/packages/conda/metadata.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e91f0830d64901fe472e8b1f3bd90910f33cfe7935590cf1de581f934dc387"}},{"ruleId":"D1","level":"warning","message":{"text":"npm.parseUploadPackage (cyclomatic 18): npm.parseUploadPackage 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/npm/creator.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f9854dc112895f974ea22d319826dfdd67280b9e99038321bd2877cdaf709c"}},{"ruleId":"D1","level":"warning","message":{"text":"nuget.ParseNuspecMetaData (cyclomatic 18): nuget.ParseNuspecMetaData 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":"modules/packages/nuget/metadata.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"73ee98fbdeb12d285f23aa9ef55c2dd58995de1c760020d0aa9203043dd5e497"}},{"ruleId":"D1","level":"warning","message":{"text":"nuget.ParseDebugHeaderID (cyclomatic 18): nuget.ParseDebugHeaderID has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/nuget/symbol_extractor.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"00bd156560925d4aee9540477a4b40cfa6d4bcd000ae0f7012a81b997cfcd652"}},{"ruleId":"D1","level":"warning","message":{"text":"WorkerPoolQueue.doRun (cyclomatic 18): WorkerPoolQueue.doRun has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/queue/workergroup.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c0cd3d12a5a68b8b9126b6c96418bd237d0953334f1ad0d2445356d8b1aaf9"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.loadServiceFrom (cyclomatic 18): setting.loadServiceFrom 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":"modules/setting/service.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb9ce8e979e005424e2062319e8c10c9bc1e9e246baf0a167da059d471b8de5e"}},{"ruleId":"D1","level":"warning","message":{"text":"arch.UploadPackageFile (cyclomatic 18): arch.UploadPackageFile 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":"routers/api/packages/arch/arch.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f5d467589e5831515067c6bbc632c098f640483d0e6d3574838d9893f2ea30a"}},{"ruleId":"D1","level":"warning","message":{"text":"arch.GetPackageOrRepositoryFile (cyclomatic 18): arch.GetPackageOrRepositoryFile 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":"routers/api/packages/arch/arch.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf3af36ebc2ff2af558441001ac75cab9d79bd6cc114ae1dfb172cb0df94831"}},{"ruleId":"D1","level":"warning","message":{"text":"container.createPackageAndVersion (cyclomatic 18): container.createPackageAndVersion 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":"routers/api/packages/container/manifest.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"3094a1c8ee144d197590f95cb9f66512e587be68d5ce76065b930eeaf46c011e"}},{"ruleId":"D1","level":"warning","message":{"text":"v1.repoAssignment (cyclomatic 18): v1.repoAssignment has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 137). 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":"routers/api/v1/api.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"d41f11bee3bd116f17fb460a7a09b0f46d906451cb7e01ea75622119dbed4c6b"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.CreateBranch (cyclomatic 18): repo.CreateBranch 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":"routers/api/v1/repo/branch.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b899d0e70b394b15f61d79772800964fb0536ee43813fd85f572b55ae05a19"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.CreateIssue (cyclomatic 18): repo.CreateIssue 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":"routers/api/v1/repo/issue.go"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"602a7954ef24d8cc65234fa1ce02bbfe0624321fb1a4f7a792cf6eb467c0f881"}},{"ruleId":"D1","level":"warning","message":{"text":"shared.ListRuns (cyclomatic 18): shared.ListRuns 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":"routers/api/v1/shared/action.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e4047da0c43a9fdc3dc3f61df738f30485f1e4d356d3e8d113ea1c1f27f8eb"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.viewSummaryBranchFromRun (cyclomatic 18): actions.viewSummaryBranchFromRun 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":"routers/web/repo/actions/view.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9eb5cd63f536171c087fcca99840e0be4c5ed90408a81bbf5797b4cad5649cb"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.editorHandleFileOperationError (cyclomatic 18): repo.editorHandleFileOperationError 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":"routers/web/repo/editor_error.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"f35fea25eae387a63f6d0db6c6cd25ca737ce38e3e853862da219cb9382b969a"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.UpdateCommentContent (cyclomatic 18): repo.UpdateCommentContent 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":"routers/web/repo/issue_comment.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ae1f1c34a672a431a4d3407969e534dbb5eb8f441bf4afc1fc987a2c56d799"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.UpdateIssueLabel (cyclomatic 18): repo.UpdateIssueLabel 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":"routers/web/repo/issue_label.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9cfb96fb97f28a74cc9cb2120d1b568159549e8db169d9cd228411311490de1"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.handleMigrateError (cyclomatic 18): repo.handleMigrateError has cyclomatic complexity 18 (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":"routers/web/repo/migrate.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d92dc4ca153c7129901f625d4bd574d60570347afa060ba26f9345f4a35c7be"}},{"ruleId":"D1","level":"warning","message":{"text":"packages.SetRulePreviewContext (cyclomatic 18): packages.SetRulePreviewContext 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":"routers/web/shared/packages/packages.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"15302c28dfbb20350b913110c4b4563d8b35186cd0f6e3f33a584c123dff81b3"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.CreateSkippedCommitStatusForFilteredWorkflow (cyclomatic 18): actions.CreateSkippedCommitStatusForFilteredWorkflow 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":"services/actions/commit_status.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"979be3b1bcfb01aa73b227f33bf79dbeffdbeb7d30e6fe03e29fc33ead5f03cd"}},{"ruleId":"D1","level":"warning","message":{"text":"asymkey.SignCRUDAction (cyclomatic 18): asymkey.SignCRUDAction 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":"services/asymkey/sign.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3d133be3df0d94261e7b9e2142dafd5f01563f90e3dba80cf5af6b18738826"}},{"ruleId":"D1","level":"warning","message":{"text":"Source.SearchEntries (cyclomatic 18): Source.SearchEntries 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":"services/auth/source/ldap/source_search.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"671d03e9ccb466965ec6fbb0ec58c05f5eaf89ab663329172c7b6a2943acd14e"}},{"ruleId":"D1","level":"warning","message":{"text":"lfs.GetListLockHandler (cyclomatic 18): lfs.GetListLockHandler 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":"services/lfs/locks.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d598d08995081cbc9c5896c2e9e12df1c152696c4a499b9995348ce3c19b18d"}},{"ruleId":"D1","level":"warning","message":{"text":"markup.renderRepoFileCodePreview (cyclomatic 18): markup.renderRepoFileCodePreview 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":"services/markup/renderhelper_codepreview.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"c346886a53479ad27a09c69253dce95ee50080939e10f3f2fb12cf5fd3aeeede"}},{"ruleId":"D1","level":"warning","message":{"text":"migrations.IsMigrateURLAllowed (cyclomatic 18): migrations.IsMigrateURLAllowed 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":"services/migrations/migrate.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e4735a84a0cae5154980234d4c055dd7b7c8baff6d8caac441ef2619e3ca99"}},{"ruleId":"D1","level":"warning","message":{"text":"mirror.Update (cyclomatic 18): mirror.Update has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 42, 92, 106). 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":"services/mirror/mirror.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"d801b46a47ebddccfb9ab741563615449ca878ed1e41893995edb7a67ca32ac0"}},{"ruleId":"D1","level":"warning","message":{"text":"oauth2_provider.CreateJWTSigningKey (cyclomatic 18): oauth2_provider.CreateJWTSigningKey has cyclomatic complexity 18 (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":"services/oauth2_provider/jwtsigningkey.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce2cb83cb6b6b21fb9a4db54f2e27f2f54779391ad86b8ab0c648f2008c9561"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.DismissReview (cyclomatic 18): pull.DismissReview 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":"services/pull/review.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"f89b78371c13462402dfcb459d97079c6e82b03ef9d2c6019a8059571510a4e1"}},{"ruleId":"D1","level":"warning","message":{"text":"cmd.listen (cyclomatic 17): cmd.listen 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/web.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"cab402dea8a3cdcaebed7a55e5fd9f6f93c31b6f67ced658f1f124c7b71a792a"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_14.RecalculateUserEmptyPWD (cyclomatic 17): v1_14.RecalculateUserEmptyPWD has cyclomatic complexity 17 (threshold 15). Of this number, 9 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":"modelmigration/v1_14/v166.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"190c62d9f78b1d3c737775d6a466330317cc9afc8ddd48246113fd897477e785"}},{"ruleId":"D1","level":"warning","message":{"text":"activities.ActivityQueryCondition (cyclomatic 17): activities.ActivityQueryCondition 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":"models/activities/action.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"59120ecee4b2253e373da6c03abd0d89cecd23ef8e9cd766d40d83b061cae418"}},{"ruleId":"D1","level":"warning","message":{"text":"organization.CreateOrganization (cyclomatic 17): organization.CreateOrganization has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 343). 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":"models/organization/org.go"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a38527dbf14ca3e025d4912d1f2b8819ba577c166dd302e779d4882b6a6f9a"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.getIssueIndexerData (cyclomatic 17): issues.getIssueIndexerData 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":"modules/indexer/issues/util.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ffeedcb9ffa76d8ce0e9df12895c54b22b5c8603e2f8848616eb1c64497049c"}},{"ruleId":"D1","level":"warning","message":{"text":"EventWriterBaseImpl.Run (cyclomatic 17): EventWriterBaseImpl.Run has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/log/event_writer_base.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"a00969024713a9949fa0c82c9e0d4020b793d7a0f981326bb430f25f41f65325"}},{"ruleId":"D1","level":"warning","message":{"text":"Renderer.CanRender (cyclomatic 17): Renderer.CanRender has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/console/console.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cc0b3755bd9819bf667df9e638e394a5b635a0f8d98d85e5b19c392d81115f5"}},{"ruleId":"D1","level":"warning","message":{"text":"arch.ParsePackage (cyclomatic 17): arch.ParsePackage 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":"modules/packages/arch/metadata.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f7882d034208f5872b34204f12c99cbcc7926e9e2c69632193a05513cf3804"}},{"ruleId":"D1","level":"warning","message":{"text":"conan.ParseConanfile (cyclomatic 17): conan.ParseConanfile 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":"modules/packages/conan/conanfile_parser.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"3698dac85e0922b5dbb4cd6a8ae3952c77cf23d805b19e49778d2c9ab0a9f2ba"}},{"ruleId":"D1","level":"warning","message":{"text":"debian.ParsePackage (cyclomatic 17): debian.ParsePackage 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":"modules/packages/debian/metadata.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcf37d3c66b00b630408a0d5a0a40dc05150cbbe446def124aa6d5dedba15130"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.GetQueueSettings (cyclomatic 17): setting.GetQueueSettings 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":"modules/setting/queue.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc91f359773bb6c4b4d3fcfc83e071658b1c1b1e82e27ac9b4afc9c1ff463d1"}},{"ruleId":"D1","level":"warning","message":{"text":"scopedtmpl.newScopedTemplateSet (cyclomatic 17): scopedtmpl.newScopedTemplateSet has cyclomatic complexity 17 (threshold 15). 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 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":"modules/templates/scopedtmpl/scopedtmpl.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"e677315d18f2086dba4cd1a9d0ee8ec3f16f77e6f2ecdf1b76b048b25b6368f4"}},{"ruleId":"D1","level":"warning","message":{"text":"maven.servePackageFile (cyclomatic 17): maven.servePackageFile 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":"routers/api/packages/maven/maven.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0ad179e29d14046d8f380ddf4c3de96daf227f2b4a890f43a2f1dff52e3c5a5"}},{"ruleId":"D1","level":"warning","message":{"text":"npm.UploadPackage (cyclomatic 17): npm.UploadPackage 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":"routers/api/packages/npm/npm.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"17a1ee9a3d06133fa5c4e427aad5b39f2059c2124892e17f46446a21f9830e5d"}},{"ruleId":"D1","level":"warning","message":{"text":"swift.UploadPackageFile (cyclomatic 17): swift.UploadPackageFile 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":"routers/api/packages/swift/swift.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e320ce36d611a043efcc015dac430416d2e46829f54c2ef128967076d0d2d4"}},{"ruleId":"D1","level":"warning","message":{"text":"terraform.UploadState (cyclomatic 17): terraform.UploadState 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":"routers/api/packages/terraform/terraform.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"072c7b7defd3f0d6f4bd03721269ced3e2d18d1899a3970be323b92b948eeb0f"}},{"ruleId":"D1","level":"warning","message":{"text":"org.EditTeam (cyclomatic 17): org.EditTeam 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":"routers/api/v1/org/team.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a711275265789fa6d1bb69de2df046954fdc5d0d0bc11d2ead8f6aac0dcbdf"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.UpdatePullRequest (cyclomatic 17): repo.UpdatePullRequest 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":"routers/api/v1/repo/pull.go"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"292e7b2d5c26bcd4f3a2257d0aacc4f46bd11e87c4c88320aab3329e53a4d6c5"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.Search (cyclomatic 17): repo.Search 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":"routers/api/v1/repo/repo.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"a396d4f47f5e592a97429543032b4eb6d01d7fc7df2feb92941cf84edf846944"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.Generate (cyclomatic 17): repo.Generate 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":"routers/api/v1/repo/repo.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"594a9afaccb9462370a497d937bde5341710b8adce6f45b55d9e2c14dda5f88d"}},{"ruleId":"D1","level":"warning","message":{"text":"shared.ListJobs (cyclomatic 17): shared.ListJobs 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":"routers/api/v1/shared/action.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a95b9bcc827729748c97e51aab0c4f20ba700d7268569bcc35643c77348402"}},{"ruleId":"D1","level":"warning","message":{"text":"common.RenderMarkup (cyclomatic 17): common.RenderMarkup 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":"routers/common/markup.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"be2215064b13998c7abebf5abf70297a8a612fe67e8d2d08196ac6fdc256966b"}},{"ruleId":"D1","level":"warning","message":{"text":"private.AddLogger (cyclomatic 17): private.AddLogger 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":"routers/private/manager.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"742a28070f8a7c085559e0da8756cb5a3829b6fb116a57bf2bdd5848801c9a5a"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.NewAuthSourcePost (cyclomatic 17): admin.NewAuthSourcePost 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":"routers/web/admin/auths.go"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"8748d38d4a3c912de1623b4ba4caf3e74f6c024e58e799a66bf01a966257e228"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.handleAuthorizationCode (cyclomatic 17): auth.handleAuthorizationCode 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":"routers/web/auth/oauth2_provider.go"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae6a7336c24d3c80f43c2370ec3e6b18b7e3d2020caf2bdf3700a7999de9640"}},{"ruleId":"D1","level":"warning","message":{"text":"auth.ResetPasswdPost (cyclomatic 17): auth.ResetPasswdPost 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":"routers/web/auth/password.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"044a66aec9a8476280dcac31459514f2c96e8ef7fb95e4db987360052a96abb5"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.ArtifactsDownloadView (cyclomatic 17): actions.ArtifactsDownloadView 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, 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":"routers/web/repo/actions/view.go"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"37c675f9807ac4a69b9069071dcf1e82a69715004bf9b70139b0edf476c3fb4b"}},{"ruleId":"D1","level":"warning","message":{"text":"comparePageInfoType.prepareCreatePullRequestPage (cyclomatic 17): comparePageInfoType.prepareCreatePullRequestPage 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":"routers/web/repo/compare.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b529ef0654ff2babe4dc2ece0e9948b618189c3aa9ff9247473b422e1338ea0"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.ScopedWorkflowSetRequired (cyclomatic 17): actions.ScopedWorkflowSetRequired 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":"routers/web/shared/actions/scoped_workflows.go"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d98db33d978ad9933fe5d115c21e6447a3d0ec99f648e46c441221af9c46b6"}},{"ruleId":"D1","level":"warning","message":{"text":"user.prepareContextForProfileBigAvatar (cyclomatic 17): user.prepareContextForProfileBigAvatar 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":"routers/web/shared/user/header.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"87d4f90a226a6d3c957add504605ffc0e389505d46a35729ee15e40f485f13d5"}},{"ruleId":"D1","level":"warning","message":{"text":"security.EnrollTwoFactorPost (cyclomatic 17): security.EnrollTwoFactorPost 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":"routers/web/user/setting/security/2fa.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c78955dc2078a2404dfcf96b30e95baf58e5eadefa1126c3b5e418741d07ae"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.checkJobsByRunID (cyclomatic 17): actions.checkJobsByRunID has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/job_emitter.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"42878700a19af019ca1e9b7a805ac35466ef2696f92b0caf23f86d15b352eb0d"}},{"ruleId":"D1","level":"warning","message":{"text":"Source.Authenticate (cyclomatic 17): Source.Authenticate 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":"services/auth/source/smtp/source_authenticate.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"94bf4cd72f597bbc93d5c4d8686e2ebc4ed4b98d6cf3808c58fae1439dc32a3c"}},{"ruleId":"D1","level":"warning","message":{"text":"source.syncGroupsToTeamsCached (cyclomatic 17): source.syncGroupsToTeamsCached 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":"services/auth/source/source_group_sync.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74cb55799e20efff5919b42c4f29de99f99fe71a6366f86f76f564d9c027dc1"}},{"ruleId":"D1","level":"warning","message":{"text":"feed.notifyWatchers (cyclomatic 17): feed.notifyWatchers 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":"services/feed/feed.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"743fb1ef364b2ecf7f8e620457b5e2aed913128d38b3fc6ec1e92cf4a00766ab"}},{"ruleId":"D1","level":"warning","message":{"text":"DiffFile.prepareDiffRenderDetail (cyclomatic 17): DiffFile.prepareDiffRenderDetail has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"e397087cdc8fab8870bb4ca1991c2caed372cbf740c43bbdfcb58f972d74137b"}},{"ruleId":"D1","level":"warning","message":{"text":"mailer.mailIssueCommentToParticipants (cyclomatic 17): mailer.mailIssueCommentToParticipants 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":"services/mailer/mail_issue.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a3bb94e9daa53ce55bf893712b61b30cf4dea2c6730e44acace217a3016651f"}},{"ruleId":"D1","level":"warning","message":{"text":"GitlabDownloader.GetComments (cyclomatic 17): GitlabDownloader.GetComments 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":"services/migrations/gitlab.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"023ac3c09dc5c9b7ad947ffde669c7888ff48639024d0ce543397e86e9c5a65d"}},{"ruleId":"D1","level":"warning","message":{"text":"GitlabDownloader.GetPullRequests (cyclomatic 17): GitlabDownloader.GetPullRequests 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":"services/migrations/gitlab.go"},"region":{"startLine":602}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a2270840538d03c0f4f7c148d292a68a394a2098cf1f0bc66bf4819e8046808"}},{"ruleId":"D1","level":"warning","message":{"text":"org.UpdateTeam (cyclomatic 17): org.UpdateTeam has cyclomatic complexity 17 (threshold 15). 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 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/org/team.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed24292a0c16a45835f1b21fe751ba18758f4668a29189aeb0fc139aa1aebfe"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.setOutFlow (cyclomatic 17): Parser.setOutFlow 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":"services/repository/gitgraph/parser.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee302c2b499bdb7f27b8de76e96d578b81645f876cda06659d8ba1cdd327ba7"}},{"ruleId":"D1","level":"warning","message":{"text":"v1_12.FixMergeBase (cyclomatic 16): v1_12.FixMergeBase 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":"modelmigration/v1_12/v128.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ba7ed0a7f521652dc83f2000e1b4ab2620b9cf4ebbb3182ce292b6257e22e0"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.GetRunningTaskByToken (cyclomatic 16): actions.GetRunningTaskByToken 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":"models/actions/task.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"897492e39a465b29b1de2560fe77a29d44a420d0c0d87205d266019f5a825731"}},{"ruleId":"D1","level":"warning","message":{"text":"issues.IssueAssignOrRemoveProject (cyclomatic 16): issues.IssueAssignOrRemoveProject has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 70). 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":"models/issues/issue_project.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b990bd540415bf56dcb6cdc04f0c0a044e486440a502efc105f9c44a74b3ef"}},{"ruleId":"D1","level":"warning","message":{"text":"Issue.verifyReferencedIssue (cyclomatic 16): Issue.verifyReferencedIssue 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":"models/issues/issue_xref.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"e99ebed2d06ef5ffe5a2ceacfca682d2816dcddb1bdbdafc3ae4fcbf686e4e7f"}},{"ruleId":"D1","level":"warning","message":{"text":"conan.SearchRecipes (cyclomatic 16): conan.SearchRecipes 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":"models/packages/conan/search.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f8d4f795d53f236bbfc19bf5efd165c73fcd07848f407f0892301bc8f4435a"}},{"ruleId":"D1","level":"warning","message":{"text":"PackageSearchOptions.ToConds (cyclomatic 16): PackageSearchOptions.ToConds 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":"models/packages/package_version.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e17a1ce4c34a4568d963451a8c4ed734844f27cd40d15100168858f28e36fc0"}},{"ruleId":"D1","level":"warning","message":{"text":"access.finalProcessRepoUnitPermission (cyclomatic 16): access.finalProcessRepoUnitPermission 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":"models/perm/access/repo_permission.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c8bb1a54a9da097fe5f20edd349fcd6a4e368189144e32a236dd53795597e6"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.watchRepoMode (cyclomatic 16): repo.watchRepoMode 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":"models/repo/watch.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a11cd92de6783a9bb27a31c99a18b8c487a2524132956d57506865d17f548f65"}},{"ruleId":"D1","level":"warning","message":{"text":"unittest.SyncDirs (cyclomatic 16): unittest.SyncDirs 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":"models/unittest/fscopy.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"04135ef2ea9a6fd95045c1a12a4918db74a76ccc93fb071fbb94997e9f246dad"}},{"ruleId":"D1","level":"warning","message":{"text":"jobparser.rewriteSubExpression (cyclomatic 16): jobparser.rewriteSubExpression 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":"modules/actions/jobparser/evaluator.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba3045d92fb593cf0dbcb188e3ba6a160c295ee8da6b886fbb3e84d92fa6d8ef"}},{"ruleId":"D1","level":"warning","message":{"text":"escapeStreamer.writeDetectResults (cyclomatic 16): escapeStreamer.writeDetectResults 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":"modules/charset/escape_stream.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"044c6bc7be43a24a06f7b42ab66684b222c2774972e1e8cf01fd0af99bdec9db"}},{"ruleId":"D1","level":"warning","message":{"text":"git.configParseSubModules (cyclomatic 16): git.configParseSubModules 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":"modules/git/config_submodule.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"c765d724fe20bf1411d060729e88720779b7e6cd057e3827990ce27c147ff7c4"}},{"ruleId":"D1","level":"warning","message":{"text":"Repository.getTag (cyclomatic 16): Repository.getTag 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":"modules/git/repo_tag_nogogit.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"9400ac645b5f5fbf9d4b1f343f785a5d3a5e94003bd958b5d20c57719e3516da"}},{"ruleId":"D1","level":"warning","message":{"text":"graceful.getProvidedFDs (cyclomatic 16): graceful.getProvidedFDs has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 51). 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":"modules/graceful/net_unix.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"f09175535ef58525333f3bb8add75e719d81a6bdec234a0fb9e84df6a5cab3dd"}},{"ruleId":"D1","level":"warning","message":{"text":"lfs.performSingleOperation (cyclomatic 16): lfs.performSingleOperation 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":"modules/lfs/http_client.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"045634910b9f3f74412d591dfc5ed4d65c562870de640c1df4b5d3928b906270"}},{"ruleId":"D1","level":"warning","message":{"text":"markup.postProcess (cyclomatic 16): markup.postProcess 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":"modules/markup/html.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"c084f512ea1f574521222b1a8b261dbff1ddcd582472e59b93b08e4509be8470"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.SyncReleasesWithTags (cyclomatic 16): repository.SyncReleasesWithTags has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 189). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/repository/repo.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"582f18dba4598ac2cd1000a35113d7b7c6bbc203b42c3ed98ef09e9e5f7ddecb"}},{"ruleId":"D1","level":"warning","message":{"text":"Router.normalizeRequestPath (cyclomatic 16): Router.normalizeRequestPath 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":"modules/web/router.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"54816444be143f2d18a76eb19c02152cfd943deb77cad3f812d701dc5944adf4"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.UpdateLog (cyclomatic 16): Service.UpdateLog 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":"routers/api/actions/runner/runner.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ca2867c0a589d2048c7a54f385d14c70338fd737cc8dfb09c6f54e8b058560"}},{"ruleId":"D1","level":"warning","message":{"text":"rpm.UploadPackageFile (cyclomatic 16): rpm.UploadPackageFile 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":"routers/api/packages/rpm/rpm.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"56bd46dea5f52700feb9475a8925044b4059929d0d81a726c4e45fdf3fa716f2"}},{"ruleId":"D1","level":"warning","message":{"text":"v1.verifyAuthWithOptions (cyclomatic 16): v1.verifyAuthWithOptions has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 867). 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":"routers/api/v1/api.go"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f5be1d313610342725b645c1300a48dcd5af4585fb9cce14ba47d651e30e01"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.EditTagProtection (cyclomatic 16): repo.EditTagProtection 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":"routers/api/v1/repo/tag.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d76b5399ee38690288d3eb147c5a08ce5f36a659e0f637bbf2120ba46be260"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.EditAuthSourcePost (cyclomatic 16): admin.EditAuthSourcePost 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":"routers/web/admin/auths.go"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"86bb7a6cd35a93af074b8689a0cc766c843299203a95326cb8e18f4f6b8c476f"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.List (cyclomatic 16): actions.List 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"758276dbfc141b55fb0b8266eb23217346b719d296474bb17a9d10fbc77206b2"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.workflowDispatchConfig (cyclomatic 16): actions.workflowDispatchConfig 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"af8cdbffe487c72ae8f0c57c7a966007f2c0681e3b10e6aba21dfa1cafff6c7b"}},{"ruleId":"D1","level":"warning","message":{"text":"actionRunListData.processActionRuns (cyclomatic 16): actionRunListData.processActionRuns 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"a616686095313d9bb6f612309cbb66f5c9bf5edc7c17c769e5c751ef3cc6702a"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.CreateBranch (cyclomatic 16): repo.CreateBranch 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":"routers/web/repo/branch.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7255beeafb7363afdf54b0c98af9e672ef7e912bee37ddfd89ade897c6c6467"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.UpdateIssueStatus (cyclomatic 16): repo.UpdateIssueStatus 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":"routers/web/repo/issue_list.go"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad60ca463e011d4381e4d65a55f4575b8d76969070bf72372ec48c2ba0c69439"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.ValidateRepoMetasForNewIssue (cyclomatic 16): repo.ValidateRepoMetasForNewIssue 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":"routers/web/repo/issue_new.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c8fd38c3937a45a25c68a05cc250fdf9429e75bab02d3408fc9ce1e054406b"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.NewIssuePost (cyclomatic 16): repo.NewIssuePost 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":"routers/web/repo/issue_new.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d97af253a7019da998238bcc1a81d6b6bc01d866769b282ae6c31503c9a3c4e"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.UpdatePullRequest (cyclomatic 16): repo.UpdatePullRequest 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":"routers/web/repo/pull.go"},"region":{"startLine":969}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aaeea8ab514871d8de64d7ef0ec0b4b94c731fcb09d5e30f10190b82610c528"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.getReleaseInfos (cyclomatic 16): repo.getReleaseInfos 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":"routers/web/repo/release.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"fba43971ea1fb6e8fead48640b3152780bc63fb0821489ee623013b001a36938"}},{"ruleId":"D1","level":"warning","message":{"text":"repo.Home (cyclomatic 16): repo.Home 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":"routers/web/repo/view_home.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd13819d60f0c99e4918cc0cfbd7903a451acda56ad2ec43eac29826bc84234"}},{"ruleId":"D1","level":"warning","message":{"text":"comparePageInfoType.prepareCompareDiff (cyclomatic 16): comparePageInfoType.prepareCompareDiff 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":"routers/web/repo/compare.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c02620ad673316b85e242fd0da9a7a4e6385ddac4363823c5db8f304ad8cd9b"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.LFSPointerFiles (cyclomatic 16): setting.LFSPointerFiles has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 406). 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":"routers/web/repo/setting/lfs.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"78b67d4f919178d827c1b43f9057c8ae0d7164b4b4d990597c646870a8999e06"}},{"ruleId":"D1","level":"warning","message":{"text":"setting.handleSettingsPostTransfer (cyclomatic 16): setting.handleSettingsPostTransfer 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"508babd0cae806b026ff94ed1c699acf5dad060253883746a00a9aaaedb829b6"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.RunnerBulkActionPost (cyclomatic 16): actions.RunnerBulkActionPost 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":"routers/web/shared/actions/runners.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc8c4621c9a8b806d5429446fd3f0332000aebaeb1b918bd44c1080ea674622"}},{"ruleId":"D1","level":"warning","message":{"text":"user.UsernameSubRoute (cyclomatic 16): user.UsernameSubRoute has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/user/home.go"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"329229c0a364319400c5ede05d71ab7f927319ce90a8b8b639ed9a76918ab9b8"}},{"ruleId":"D1","level":"warning","message":{"text":"user.getUserIssueStats (cyclomatic 16): user.getUserIssueStats 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":"routers/web/user/home.go"},"region":{"startLine":771}}}],"partialFingerprints":{"codehealthFindingId/v1":"3787d3c029e2f68bb5382059c6a927a5c73ba7413c9d91226548ed077b6e5a1d"}},{"ruleId":"D1","level":"warning","message":{"text":"actions.insertCallerChildren (cyclomatic 16): actions.insertCallerChildren 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":"services/actions/reusable_workflow.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2b6a5a0fda8d1feb61fe1273fd057f28ed7545b51013ad0239f19bcae56bfea"}},{"ruleId":"D1","level":"warning","message":{"text":"asymkey.SignWikiCommit (cyclomatic 16): asymkey.SignWikiCommit 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":"services/asymkey/sign.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4e1f454e9ec5fbe84769997366f58f35143d70147767c3200442f0f4e7fde78"}},{"ruleId":"D1","level":"warning","message":{"text":"doctor.checkDaemonExport (cyclomatic 16): doctor.checkDaemonExport has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 79). 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":"services/doctor/misc.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"50f2ebade40942da922c69eec9f090029b094fcf7850f4420bc92cfab20c3cb3"}},{"ruleId":"D1","level":"warning","message":{"text":"gitdiff.GetDiffForRender (cyclomatic 16): gitdiff.GetDiffForRender 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":1387}}}],"partialFingerprints":{"codehealthFindingId/v1":"644ddbb67fc228565c3cde6788f1c0b0ecb5443da078a4b5b968fabd9d386404"}},{"ruleId":"D1","level":"warning","message":{"text":"highlightCodeDiff.diffLineWithHighlight (cyclomatic 16): highlightCodeDiff.diffLineWithHighlight 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":"services/gitdiff/highlightdiff.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"682d17859e82196bb26ab159d96a7d8119550cb5d21b37c7b23aa092b9ec3860"}},{"ruleId":"D1","level":"warning","message":{"text":"highlightCodeDiff.recoverOneDiff (cyclomatic 16): highlightCodeDiff.recoverOneDiff 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":"services/gitdiff/highlightdiff.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"d593a8310a6c52139e962ba6ab14d1d0a42fd5bf47f9ddd8c6da24522aa79208"}},{"ruleId":"D1","level":"warning","message":{"text":"issue.NewIssue (cyclomatic 16): issue.NewIssue has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, 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":"services/issue/issue.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"d226c330f7dac9e8c16118092abb4b48a8ea0f72d25b19df9fb298db77efe22e"}},{"ruleId":"D1","level":"warning","message":{"text":"lfs.UploadHandler (cyclomatic 16): lfs.UploadHandler has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 323). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/lfs/server.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"4827a91722c637c871448a61e7701d5dbdeddabe2805525a5cd6c8ae2c504625"}},{"ruleId":"D1","level":"warning","message":{"text":"RepositoryDumper.CreateRepo (cyclomatic 16): RepositoryDumper.CreateRepo 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":"services/migrations/dump.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eeb4a633ef82c68da09fd02b45749fcd121b368366bc60db8fdf76eb874fae5"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaDownloader.GetPullRequests (cyclomatic 16): GiteaDownloader.GetPullRequests 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":"services/migrations/gitea_downloader.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"39e1ed8af53acd7988f7440f206a871d0071fc357207cac339b5bd429396e6c5"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaLocalUploader.CreateIssues (cyclomatic 16): GiteaLocalUploader.CreateIssues 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":"services/migrations/gitea_uploader.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"94a051118f7e930c177ea23dfd8e89d3b249161e5486283c623f25cb58601b9f"}},{"ruleId":"D1","level":"warning","message":{"text":"GiteaLocalUploader.CreateReviews (cyclomatic 16): GiteaLocalUploader.CreateReviews 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":"services/migrations/gitea_uploader.go"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1d9a9ba0c0199b3444ffca85a8125cfa28e2198ddd915c2d9799d148343df5"}},{"ruleId":"D1","level":"warning","message":{"text":"mirror.checkAndUpdateEmptyRepository (cyclomatic 16): mirror.checkAndUpdateEmptyRepository 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":"services/mirror/mirror_pull.go"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1ef4b164d9d371587cbdbae1b1e2754571f38a8c2ea0bce2936d2edd5da3796"}},{"ruleId":"D1","level":"warning","message":{"text":"rpm.buildUpdateInfo (cyclomatic 16): rpm.buildUpdateInfo 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":"services/packages/rpm/repository.go"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4b8c03e39d40c9078cfe9ea99645b6697223e16a3978a09df4a7bfd44040e3c"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.AddCommitMessageTailer (cyclomatic 16): pull.AddCommitMessageTailer has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/merge.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e414df11a257e979f3becc66476511ce66fb277f3178527090ba00b802ec705"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.collectSquashMergeCommitCoAuthors (cyclomatic 16): pull.collectSquashMergeCommitCoAuthors 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":"services/pull/pull.go"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe4dbb6473a4655549e9813eb2b24ea0b72c961cd6e93a2b6d26c6ce42765004"}},{"ruleId":"D1","level":"warning","message":{"text":"pull.CreateCodeComment (cyclomatic 16): pull.CreateCodeComment 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":"services/pull/review.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"8303112de2c43464bde45425b7100286ff5f7b6e562af3adb9a514d0acdad77c"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.SyncBranchesToDB (cyclomatic 16): repository.SyncBranchesToDB has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 307). 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":"services/repository/branch.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc2f5776a12261ef8ad45c23f566bc44fea0c8a3196399aadba5ddcee7d5dd6"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.pushUpdateAddTags (cyclomatic 16): repository.pushUpdateAddTags 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":"services/repository/push.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bbf7de7d4ef1ae87fe2f444dbdf30f5a6785796362b644d964f4f7f66a3af32"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.MakeRepoPrivate (cyclomatic 16): repository.MakeRepoPrivate has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/repository.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4e80d5f62963c0970290e2f76a72ab84bb252fdb88a732769898f8e88fb318"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.updateRepository (cyclomatic 16): repository.updateRepository 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":"services/repository/repository.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b98f5558f65c6cac19af81f98cc47561eb5ca68be68c3d157c6c03b7ab8d82"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser.setInFlow (cyclomatic 16): Parser.setInFlow has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/gitgraph/parser.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7a5f1919568fc7ccd5b933fa720841dfe227d0d970f7286c3cc7ebad81ab75"}},{"ruleId":"D2","level":"warning","message":{"text":"migrations.migrateRepository (cognitive 254): migrations.migrateRepository has cognitive complexity 254 (threshold 15). Drivers by points: if/else 219, loops 31, boolean chains 4 (nesting depth added 170). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/migrate.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da7af182b9d344ba5007bb1ab4a23ec6fa751dd6ed32c14e6ee0229a98c7bf5"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.ParsePatch (cognitive 181): gitdiff.ParsePatch has cognitive complexity 181 (threshold 15). Drivers by points: if/else 147, loops 22, jumps 5, boolean chains 4, match/switch 3 (nesting depth added 122). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/gitdiff/gitdiff.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c80bfc98df7ae683b1154ac2401f50aa0252f8239bb8a74da79d9f9a0bc4aa"}},{"ruleId":"D2","level":"warning","message":{"text":"jobparser.ParseRawOn (cognitive 172): jobparser.ParseRawOn has cognitive complexity 172 (threshold 15). Drivers by points: if/else 132, loops 26, match/switch 13, boolean chains 1 (nesting depth added 135). 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":"modules/actions/jobparser/model.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"05fe59bc570c9eeaab68136b083072527efac4904d4b13dab397bd0c79f772b2"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.EditBranchProtection (cognitive 172): repo.EditBranchProtection has cognitive complexity 172 (threshold 15). Drivers by points: if/else 166, boolean chains 3, loops 3 (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/branch.go"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"05553a418c3214b5919d78005590f6f4bfa89ddf71e1875dc75a6018361490d6"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.prepareIssueViewCommentsAndSidebarParticipants (cognitive 142): repo.prepareIssueViewCommentsAndSidebarParticipants has cognitive complexity 142 (threshold 15). Drivers by points: if/else 114, loops 17, boolean chains 11 (nesting depth added 82). Of this number, 141 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":"routers/web/repo/issue_view.go"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5c144b7333267cdcfe52d07e6ff116dca8cf041bd676260edf4a266216ff471"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.createCsvDiff (cognitive 128): gitdiff.createCsvDiff has cognitive complexity 128 (threshold 15). Drivers by points: if/else 104, boolean chains 12, loops 12 (nesting depth added 69). Of this number, 27 points are the body\u0027s own statements and 101 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":"services/gitdiff/csv.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"58f6067092db33313dd5110ac1c5195dea936a3a5ef80f573afecc2bfe8da829"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.pushQueueHandleUpdates (cognitive 110): repository.pushQueueHandleUpdates has cognitive complexity 110 (threshold 15). Drivers by points: if/else 106, boolean chains 3, loops 1 (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/push.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2f1cbdf2d6b47b945430da0b9432ce8ddbcf16c9b89c1549c0f816bf4f9a5a"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.AddTestPullRequestTask (cognitive 107): pull.AddTestPullRequestTask has cognitive complexity 107 (threshold 15). Drivers by points: if/else 99, loops 5, boolean chains 3 (nesting depth added 72). Most of this is not in the body itself: 0 of the 107 points are its own statements and the rest belongs to one function literal inside it that branches (line 396). 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":"services/pull/pull.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a2876198671c52a32183a01516115c6d3c32e839c6e84cac14643fedbcd32f"}},{"ruleId":"D2","level":"warning","message":{"text":"rpm.UploadErrata (cognitive 106): rpm.UploadErrata has cognitive complexity 106 (threshold 15). Drivers by points: if/else 73, loops 32, boolean chains 1 (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/rpm/rpm.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecde4214475e2e5f613a60557a2c632282117bf7cab3f8c00e5957d5d769f577"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.parseHunks (cognitive 106): gitdiff.parseHunks has cognitive complexity 106 (threshold 15). Drivers by points: if/else 86, boolean chains 9, loops 9, match/switch 2 (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/gitdiff/gitdiff.go"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd1a8fa53281efaa9e52d317cf4686bb77423dbf70d59134f24e2d7ca4e6555"}},{"ruleId":"D2","level":"warning","message":{"text":"Source.Sync (cognitive 104): Source.Sync has cognitive complexity 104 (threshold 15). Drivers by points: if/else 84, boolean chains 12, loops 4, match/switch 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":"services/auth/source/ldap/source_sync.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9bdc53bab3476884d8b01e72e86cf4bdbc8e395154432c75707e707332cf5e2"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_11.AddBranchProtectionCanPushAndEnableWhitelist (cognitive 103): v1_11.AddBranchProtectionCanPushAndEnableWhitelist has cognitive complexity 103 (threshold 15). Drivers by points: if/else 77, loops 17, boolean chains 9 (nesting depth added 32). Most of this is not in the body itself: 10 of the 103 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 136, 309, 380). 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":"modelmigration/v1_11/v111.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"225fc054470fbfe4ca4e472eaf04075b17bb718c7602159aeaead91d7b02fdac"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.updateRepoUnits (cognitive 101): repo.updateRepoUnits has cognitive complexity 101 (threshold 15). Drivers by points: if/else 86, boolean chains 15 (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":"routers/api/v1/repo/repo.go"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3e0b86dc50ee57cbd2c8aaa5d9635829b39ccd738907f92639980bbd449f70"}},{"ruleId":"D2","level":"warning","message":{"text":"private.ServCommand (cognitive 100): private.ServCommand has cognitive complexity 100 (threshold 15). Drivers by points: if/else 89, boolean chains 11 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/private/serv.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"4451f59fa078b2918b342ca6d5cfcc2e80d0a3382c532da0134a8a9041eb950b"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.NewComment (cognitive 99): repo.NewComment has cognitive complexity 99 (threshold 15). Drivers by points: if/else 86, boolean chains 13 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_comment.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c508b737c433ce3b3412b8e40871bf8e5f8c511859c67f2c9a2fc9695f6e141"}},{"ruleId":"D2","level":"warning","message":{"text":"base.RecreateTable (cognitive 98): base.RecreateTable has cognitive complexity 98 (threshold 15). Drivers by points: if/else 83, loops 9, boolean chains 5, match/switch 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":"modelmigration/base/db.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c120523fcb78f33a444fd4228e163f936ecd7014d6977d7b40dd237eb2f5eb3"}},{"ruleId":"D2","level":"warning","message":{"text":"IssuePageMetaData.retrieveReviewersData (cognitive 97): IssuePageMetaData.retrieveReviewersData has cognitive complexity 97 (threshold 15). Drivers by points: if/else 74, loops 13, boolean chains 8, jumps 2 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_page_meta.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fdd64c10ad7acc64f4fa4d9ca2edcb84133ff5f11e8e875c3658bab23d93822"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.ProcessStacktraces (cognitive 94): Manager.ProcessStacktraces has cognitive complexity 94 (threshold 15). Drivers by points: if/else 68, loops 16, boolean chains 10 (nesting depth added 51). Of this number, 91 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":"modules/process/manager_stacktraces.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"edbbb606ebcac4b82e945f00d6f58ccd7f1833db59c500122869107b6c6e9888"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runDump (cognitive 93): cmd.runDump has cognitive complexity 93 (threshold 15). Drivers by points: if/else 83, boolean chains 10 (nesting depth added 28). Of this number, 86 points are the body\u0027s own statements and 7 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/dump.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"5354157eb1943a7269ecb05d6ff02ae01dad1fdf5e78db463071deca56823b5a"}},{"ruleId":"D2","level":"warning","message":{"text":"files.ChangeRepoFiles (cognitive 91): files.ChangeRepoFiles has cognitive complexity 91 (threshold 15). Drivers by points: if/else 76, loops 8, boolean chains 5, match/switch 2 (nesting depth added 37). Of this number, 85 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":"services/repository/files/update.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"14a10b74c328e724161abd50c26226ca4598fef6dc340abfd9be3441e9df89b9"}},{"ruleId":"D2","level":"warning","message":{"text":"base.DropTableColumns (cognitive 90): base.DropTableColumns has cognitive complexity 90 (threshold 15). Drivers by points: if/else 69, loops 19, boolean chains 1, match/switch 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":"modelmigration/base/db.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb60cd5f94b52ffc372aaf4e0353c25a3b0923a9a9ddb279862f36570841ac8b"}},{"ruleId":"D2","level":"warning","message":{"text":"logNameStatusRepoParser.walkNext (cognitive 90): logNameStatusRepoParser.walkNext has cognitive complexity 90 (threshold 15). Drivers by points: if/else 73, match/switch 7, jumps 5, boolean chains 4, loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/log_name_status_nogogit.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"f80b792a3cbdc24e4111d3b52f85f0dd792d2680b5ea7d1f79e68210d90c671c"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.UpdateIssuesCommit (cognitive 89): issue.UpdateIssuesCommit has cognitive complexity 89 (threshold 15). Drivers by points: if/else 79, boolean chains 7, loops 3 (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":"services/issue/commit.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a85f24cb15ef10897dea2fb3e294c22dda1f2899519554563bf14ab39636492"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.EditPullRequest (cognitive 84): repo.EditPullRequest has cognitive complexity 84 (threshold 15). Drivers by points: if/else 74, boolean chains 10 (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":"routers/api/v1/repo/pull.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"736af456a655c2cfd203c330a5c0d80a7fcb979b98b62c1397b7f22c9d357fe3"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.httpBase (cognitive 83): repo.httpBase has cognitive complexity 83 (threshold 15). Drivers by points: if/else 70, boolean chains 12, match/switch 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/githttp.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d3868109153a034de1e8bcbb165d22d94cbc61692a8629a3ad0ab8a36b37b0"}},{"ruleId":"D2","level":"warning","message":{"text":"agit.ProcReceive (cognitive 83): agit.ProcReceive has cognitive complexity 83 (threshold 15). Drivers by points: if/else 77, boolean chains 5, loops 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":"services/agit/agit.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa6b3da91d736604a247ab31cdd96aedeb0049d0111fc0179e941ae4c5d1316"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.transferOwnership (cognitive 83): repository.transferOwnership has cognitive complexity 83 (threshold 15). Drivers by points: if/else 77, loops 4, boolean chains 2 (nesting depth added 28). Of this number, 72 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":"services/repository/transfer.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c145a56f5d826740ec79d45a6e42b12d9a1929b11119f8488e46926d6e0ccdb"}},{"ruleId":"D2","level":"warning","message":{"text":"log.EventFormatTextMessage (cognitive 82): log.EventFormatTextMessage has cognitive complexity 82 (threshold 15). Drivers by points: if/else 73, boolean chains 5, loops 4 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/log/event_format.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe654656e890bbba5819b437e107acd833bc183b914cf767b1f06fe71a5da0ec"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_14.FixPublisherIDforTagReleases (cognitive 81): v1_14.FixPublisherIDforTagReleases has cognitive complexity 81 (threshold 15). Drivers by points: if/else 76, loops 3, boolean chains 2 (nesting depth added 53). Of this number, 80 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":"modelmigration/v1_14/v156.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2377e47850502656b9a4df950952ebbd4f2bd7e1b0a40d448c430671f8670c"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.EditIssue (cognitive 80): repo.EditIssue has cognitive complexity 80 (threshold 15). Drivers by points: if/else 70, boolean chains 10 (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":"routers/api/v1/repo/issue.go"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2282f8103ee258282a0917296cb88d390969d0796728fca776b16cf4a7acf9e"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.viewPullFiles (cognitive 80): repo.viewPullFiles has cognitive complexity 80 (threshold 15). Drivers by points: if/else 58, boolean chains 13, loops 9 (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":"routers/web/repo/pull.go"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"970894c2abd97e1ae514b8937994661bbddc505ecb94da7f5ddd4be29d2ccb63"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.DeleteRepositoryDirectly (cognitive 80): repository.DeleteRepositoryDirectly has cognitive complexity 80 (threshold 15). Drivers by points: if/else 65, loops 13, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/delete.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"10660cec426583a0727433f8803823906df5974afc1c2033b63a0a010a4f0655"}},{"ruleId":"D2","level":"warning","message":{"text":"private.preReceiveBranch (cognitive 77): private.preReceiveBranch has cognitive complexity 77 (threshold 15). Drivers by points: if/else 69, boolean chains 8 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/private/hook_pre_receive.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"463c011f4113ef8a25e924b781b748da494444ed27e083abd8ebce1ddbd7994a"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.MigrateRepositoryGitData (cognitive 77): repository.MigrateRepositoryGitData has cognitive complexity 77 (threshold 15). Drivers by points: if/else 75, boolean chains 2 (nesting depth added 32). Of this number, 42 points are the body\u0027s own statements and 35 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/migrate.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12a48ef664994aa3c3ae000726d8175e7b90d5114681e30a496f5de8ab8cf81"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.ResolveIssueMentionsByVisibility (cognitive 76): issues.ResolveIssueMentionsByVisibility has cognitive complexity 76 (threshold 15). Drivers by points: if/else 60, loops 11, boolean chains 5 (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":"models/issues/issue_update.go"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e19693ae0c74b9c320d5d009f9f0767b70adf94e05498e4a5fb04df56143c1"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.shortLinkProcessor (cognitive 76): markup.shortLinkProcessor has cognitive complexity 76 (threshold 15). Drivers by points: if/else 62, boolean chains 9, loops 3, match/switch 2 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/html_link.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"57f3ad28127209846805a0a7e1c3e4252bc7b9852b1688f525595007f1029628"}},{"ruleId":"D2","level":"warning","message":{"text":"languagestats.GetLanguageStats (cognitive 74): languagestats.GetLanguageStats has cognitive complexity 74 (threshold 15). Drivers by points: if/else 62, boolean chains 9, match/switch 2, loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/languagestats/language_stats_get.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b91eec725addff113d496fe35a5ffbb674248336a79dd7b7bc97d046483d5a5"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.execRerunPlan (cognitive 74): actions.execRerunPlan has cognitive complexity 74 (threshold 15). Drivers by points: if/else 65, boolean chains 7, loops 2 (nesting depth added 32). Most of this is not in the body itself: 12 of the 74 points are its own statements and the rest belongs to one function literal inside it that branches (line 223). 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":"services/actions/rerun.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d192a75d3a4f55979e15f23ba8bad9a8f4d42936ba258061aee6bdd779a2041"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.ToAPIPullRequests (cognitive 73): convert.ToAPIPullRequests has cognitive complexity 73 (threshold 15). Drivers by points: if/else 64, loops 7, 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":"services/convert/pull.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"b66ccc959d8f3e057bcc98331310738fa15f4352b42a10f8a32413546f9e5efa"}},{"ruleId":"D2","level":"warning","message":{"text":"pipeline.findLFSFileFunc (cognitive 72): pipeline.findLFSFileFunc has cognitive complexity 72 (threshold 15). Drivers by points: if/else 58, loops 10, match/switch 3, jumps 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/pipeline/lfs_find.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"49b045d3648fc48777cbb99f5366c05f27ebd73d5ea4d656c8741e378904b364"}},{"ruleId":"D2","level":"warning","message":{"text":"references.findAllIssueReferencesBytes (cognitive 71): references.findAllIssueReferencesBytes has cognitive complexity 71 (threshold 15). Drivers by points: if/else 57, loops 6, boolean chains 5, match/switch 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/references/references.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7264f5dd3ff7fd6f5bfdf91d3a688e415783f1c8536f6373d85e93c2dba31fb"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.loadMailerFrom (cognitive 71): setting.loadMailerFrom has cognitive complexity 71 (threshold 15). Drivers by points: if/else 49, boolean chains 11, match/switch 7, loops 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":"modules/setting/mailer.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"952040f641287b49e50bfa14e59a2f7e84a8fe031fbb15689b566302d8ba46cd"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.SearchRepositoryCondition (cognitive 70): repo.SearchRepositoryCondition has cognitive complexity 70 (threshold 15). Drivers by points: if/else 59, boolean chains 6, loops 5 (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":"models/repo/repo_list.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c1b4450760c450bf9547753650223066d42d145e539fc49f8dd828e7e4226c"}},{"ruleId":"D2","level":"warning","message":{"text":"context.OrgAssignment (cognitive 70): context.OrgAssignment has cognitive complexity 70 (threshold 15). Drivers by points: if/else 55, boolean chains 12, loops 2, match/switch 1 (nesting depth added 24). Most of this is not in the body itself: 0 of the 70 points are its own statements and the rest belongs to one function literal inside it that branches (line 74). 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":"services/context/org.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4056e32859bbe3d655f8429287d0a7ab22ce59764f3f6d298dc9ff5afa6925d"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runHookProcReceive (cognitive 68): cmd.runHookProcReceive has cognitive complexity 68 (threshold 15). Drivers by points: if/else 60, loops 7, boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/hook.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef7fc63179e0339058b6417b612d337762a78ce6ed94d36b6bcdf828132e9319"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.ApproveRuns (cognitive 68): actions.ApproveRuns has cognitive complexity 68 (threshold 15). Drivers by points: if/else 58, loops 8, boolean chains 2 (nesting depth added 39). Most of this is not in the body itself: 9 of the 68 points are its own statements and the rest belongs to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/approve.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b4a1f984ccea2572f217257eae0302f1325e7ceb194b6ccec809590aba9aabb"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.matchPushEvent (cognitive 67): actions.matchPushEvent has cognitive complexity 67 (threshold 15). Drivers by points: if/else 63, match/switch 2, boolean chains 1, 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":"modules/actions/workflows.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e35a978379e94671a514cbbe69ef60324efa768141b2fbb6cb28ff64828996"}},{"ruleId":"D2","level":"warning","message":{"text":"git.walkGitLog (cognitive 67): git.walkGitLog has cognitive complexity 67 (threshold 15). Drivers by points: if/else 50, loops 13, jumps 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":"modules/git/log_name_status_nogogit.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a25e5b360ee29dc6e8d4adea960d6b4a393dfabed3d193c7634fe52f1eb75b5"}},{"ruleId":"D2","level":"warning","message":{"text":"install.SubmitInstall (cognitive 67): install.SubmitInstall has cognitive complexity 67 (threshold 15). Drivers by points: if/else 63, boolean chains 4 (nesting depth added 18). Of this number, 66 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":"routers/install/install.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"4209971b3fe15eb2cd9320b1539c28823d1a9b52845f59ada98958481788030e"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.combineLabelComments (cognitive 65): repo.combineLabelComments has cognitive complexity 65 (threshold 15). Drivers by points: if/else 50, loops 11, boolean chains 4 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_view.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf46fa34b7ac29b241aeadc596fcaece6953c621e17398fd492c8c34557269a"}},{"ruleId":"D2","level":"warning","message":{"text":"context.RepoRefByType (cognitive 65): context.RepoRefByType has cognitive complexity 65 (threshold 15). Drivers by points: if/else 59, boolean chains 6 (nesting depth added 28). Most of this is not in the body itself: 0 of the 65 points are its own statements and the rest belongs to one function literal inside it that branches (line 907). 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":"services/context/repo.go"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"21a5acc586c2beae0e69ab16f89b49603c49abc2e328bbcce27fb8d12b65f1e3"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_16.RemigrateU2FCredentials (cognitive 63): v1_16.RemigrateU2FCredentials has cognitive complexity 63 (threshold 15). Drivers by points: if/else 59, loops 3, match/switch 1 (nesting depth added 35). Of this number, 26 points are the body\u0027s own statements and 37 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":"modelmigration/v1_16/v210.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"810e58cbcfe0f5013291c03c9d3c277714469163995070638291a4a3a39bba9b"}},{"ruleId":"D2","level":"warning","message":{"text":"org.TeamsAction (cognitive 63): org.TeamsAction has cognitive complexity 63 (threshold 15). Drivers by points: if/else 60, match/switch 2, 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":"routers/web/org/teams.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"94edeab49126bc5b0c1864c7212a6754f03d653df339d8d0ff41e0e62571e8a1"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.AddGPGKey (cognitive 62): asymkey.AddGPGKey has cognitive complexity 62 (threshold 15). Drivers by points: if/else 46, loops 16 (nesting depth added 41). Most of this is not in the body itself: 1 of the 62 points is its own statement and the rest belongs to one function literal inside it that branches (line 75). 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":"models/asymkey/gpg_key_add.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"0519b0f2f07cbb8c6a2de1b5b037c56ab24a937123f1e010363fee3b59a3deeb"}},{"ruleId":"D2","level":"warning","message":{"text":"template.validateOptions (cognitive 62): template.validateOptions has cognitive complexity 62 (threshold 15). Drivers by points: if/else 45, loops 10, boolean chains 5, match/switch 2 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/issue/template/template.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3fa220c545711832703c3e8f88cd75b9e77be756311319fc5ea7da21663fbf"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.loadServerFrom (cognitive 62): setting.loadServerFrom has cognitive complexity 62 (threshold 15). Drivers by points: if/else 47, boolean chains 10, match/switch 5 (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":"modules/setting/server.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"f935fcc46c9e67cfc58ae31623bf13ade39f16ee0afd88ed24dc3b8d8e47f3ca"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreateBranchProtection (cognitive 62): repo.CreateBranchProtection has cognitive complexity 62 (threshold 15). Drivers by points: if/else 56, boolean chains 6 (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":"routers/api/v1/repo/branch.go"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f463530b86935b6a85d22e23c66a13eaf93a47e51c950c3aaafd22d78b3e3a2"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.notify (cognitive 62): actions.notify has cognitive complexity 62 (threshold 15). Drivers by points: if/else 52, loops 7, 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":"services/actions/notifier_helper.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"a136d35706d844c79869c8f20a2589f60bb958abbedc96c5c4469c2994880ce1"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.ToAPIPullRequest (cognitive 61): convert.ToAPIPullRequest has cognitive complexity 61 (threshold 15). Drivers by points: if/else 54, boolean chains 5, 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":"services/convert/pull.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0967058038026ed948ae64cd02e1d39bc7ed1ba4cd9bf754c983dc8fd3d03fc"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.SignInOAuthCallback (cognitive 60): auth.SignInOAuthCallback has cognitive complexity 60 (threshold 15). Drivers by points: if/else 46, match/switch 7, loops 5, 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":"routers/web/auth/oauth.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd1a2c7d9d20c63842fb04a3ac9954c4a0515fb7dbeef3177e11de3d75a1466"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.KeysPost (cognitive 60): setting.KeysPost has cognitive complexity 60 (threshold 15). Drivers by points: if/else 39, match/switch 16, boolean chains 3, loops 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/user/setting/keys.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d89abf400021b92bf530d6bb527cdc41c926f1214f8aa909da9c4990b8b4243b"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.UserSignIn (cognitive 59): auth.UserSignIn has cognitive complexity 59 (threshold 15). Drivers by points: if/else 55, 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":"services/auth/signin.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac71239f8859f872718f64c5231e176b9b653e5b9fcac8eeac8403f73b11ef23"}},{"ruleId":"D2","level":"warning","message":{"text":"user.DeleteUser (cognitive 59): user.DeleteUser has cognitive complexity 59 (threshold 15). Drivers by points: if/else 53, loops 5, boolean chains 1 (nesting depth added 29). Of this number, 51 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":"services/user/user.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc240aec9ae0a7e5a2b8b561df6774df12b0ecd3373c97232a0a3135125e9add"}},{"ruleId":"D2","level":"warning","message":{"text":"git.CutDiffAroundLine (cognitive 58): git.CutDiffAroundLine has cognitive complexity 58 (threshold 15). Drivers by points: if/else 45, loops 5, match/switch 5, boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/diff.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"a700e5370fbadaac93c6e18a9e20251b0cd962748c1fbe7bc3618cfa6cb08f8e"}},{"ruleId":"D2","level":"warning","message":{"text":"eval.exec (cognitive 58): eval.exec has cognitive complexity 58 (threshold 15). Drivers by points: if/else 36, loops 16, boolean chains 4, match/switch 2 (nesting depth added 33). Of this number, 55 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":"modules/templates/eval/eval.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a47a1c9ffcd44ec5db082767a55915e85b959ffc9a883c8100dc831c3ddfe5"}},{"ruleId":"D2","level":"warning","message":{"text":"maven.UploadPackageFile (cognitive 58): maven.UploadPackageFile has cognitive complexity 58 (threshold 15). Drivers by points: if/else 48, boolean chains 8, match/switch 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/maven/maven.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb4d0db54201e7b965641b86e3d4254bf4c6f09b57c719bc4409fd158430c2fb"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.MergePullRequest (cognitive 58): repo.MergePullRequest has cognitive complexity 58 (threshold 15). Drivers by points: if/else 58 (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":"routers/api/v1/repo/pull.go"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"b481d2054b2e1bfd9eaa58306ce087d92733bc2ea830e2e86e5250f3552f7f8d"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runServ (cognitive 57): cmd.runServ has cognitive complexity 57 (threshold 15). Drivers by points: if/else 53, boolean chains 2, match/switch 2 (nesting depth added 17). Of this number, 56 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/serv.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb77e3f619ab878ecd576d5cee47a6f45d5192b21c0685e085d0e56921cd876"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_9.FixReleaseSha1OnReleaseTable (cognitive 57): v1_9.FixReleaseSha1OnReleaseTable has cognitive complexity 57 (threshold 15). Drivers by points: if/else 53, loops 3, boolean chains 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_9/v82.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"312b1d228fdd3ecb7769f875f769248240cf6808245f004789393bb2e8542704"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.UpdateRunJob (cognitive 57): actions.UpdateRunJob has cognitive complexity 57 (threshold 15). Drivers by points: if/else 46, boolean chains 9, match/switch 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":"models/actions/run_job.go"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"e33bac3a8e1e489a7a95eebd97cb652e325d35cb6b7221dd473775df216fab92"}},{"ruleId":"D2","level":"warning","message":{"text":"org.ViewProject (cognitive 57): org.ViewProject has cognitive complexity 57 (threshold 15). Drivers by points: if/else 39, loops 16, boolean chains 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":"routers/web/org/projects.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f6df387951b99899a229ca29d192f3d49623ede5208f5601957fd65772da0f"}},{"ruleId":"D2","level":"warning","message":{"text":"Source.Authenticate (cognitive 57): Source.Authenticate has cognitive complexity 57 (threshold 15). Drivers by points: if/else 49, boolean chains 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":"services/auth/source/ldap/source_authenticate.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"73cce0128637554147c6480be0af0f97a73cd2f7c37316e8ada4565a34515aea"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaLocalUploader.updateGitForPullRequest (cognitive 57): GiteaLocalUploader.updateGitForPullRequest has cognitive complexity 57 (threshold 15). Drivers by points: if/else 51, loops 4, boolean chains 2 (nesting depth added 28). Of this number, 54 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":"services/migrations/gitea_uploader.go"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"0279e4c17f0816821dcc1634b042e57d3c97515abd84b3b7195975314c95a514"}},{"ruleId":"D2","level":"warning","message":{"text":"mirror.runSync (cognitive 57): mirror.runSync has cognitive complexity 57 (threshold 15). Drivers by points: if/else 54, boolean chains 1, loops 1, match/switch 1 (nesting depth added 28). Of this number, 56 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":"services/mirror/mirror_pull.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"7212eff67825fd87be9ee131c0658afe5cf3f2cf0d99243754a9a2504bf3e138"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.SubmitReview (cognitive 56): issues.SubmitReview has cognitive complexity 56 (threshold 15). Drivers by points: if/else 47, boolean chains 7, loops 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":"models/issues/review.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"a45e51315bc84537000218cda6d7f85f09ed9ac3778cb3da87d734f610717299"}},{"ruleId":"D2","level":"warning","message":{"text":"util.SanitizeCredentialURLs (cognitive 56): util.SanitizeCredentialURLs has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24, boolean chains 16, loops 6, match/switch 6, jumps 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":"modules/util/sanitize.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f770c252ffe45e519baf879e5db322d71e34e21e5870a3155c6b942d7388c5b"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ViewProject (cognitive 56): repo.ViewProject has cognitive complexity 56 (threshold 15). Drivers by points: if/else 38, loops 16, boolean chains 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":"routers/web/repo/projects.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"464c7249a8a78dc2776535f0ffe61179df2430322499b93810b38b07588973e7"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.SettingsProtectedBranchPost (cognitive 56): setting.SettingsProtectedBranchPost has cognitive complexity 56 (threshold 15). Drivers by points: if/else 51, loops 2, match/switch 2, 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":"routers/web/repo/setting/protected_branch.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"a916e73e3b6400e7d6096e853049c2937ec8ac5b7d48a53cd0dc760dde218027"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaLocalUploader.CreateReleases (cognitive 56): GiteaLocalUploader.CreateReleases has cognitive complexity 56 (threshold 15). Drivers by points: if/else 51, loops 3, boolean chains 2 (nesting depth added 33). Of this number, 41 points are the body\u0027s own statements and 15 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/gitea_uploader.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a20fb1a1908a08e8902c323022cee6669a127c7afac23af2d55c40c6a539775"}},{"ruleId":"D2","level":"warning","message":{"text":"feed.feedActionsToFeedItems (cognitive 55): feed.feedActionsToFeedItems has cognitive complexity 55 (threshold 15). Drivers by points: if/else 47, loops 4, match/switch 4 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/feed/convert.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc345b47069c7fdc48547a9a91d60bd119e3e55edeb72396d81da636c81945dc"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.prepareIssueFilterAndList (cognitive 55): repo.prepareIssueFilterAndList has cognitive complexity 55 (threshold 15). Drivers by points: if/else 40, boolean chains 6, loops 5, match/switch 4 (nesting depth added 13). Of this number, 49 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":"routers/web/repo/issue_list.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"c973a71868088b6887c157ef5e45ae3dfec5bf713d796b9e736117b0ebf37217"}},{"ruleId":"D2","level":"warning","message":{"text":"Indexer.Search (cognitive 54): Indexer.Search has cognitive complexity 54 (threshold 15). Drivers by points: if/else 34, loops 16, boolean chains 3, match/switch 1 (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":"modules/indexer/issues/bleve/bleve.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d20c62c286d99e8aabd242c31aed96ba12f4d3c1ab3ab82635983b9dd5071a"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ListIssues (cognitive 54): repo.ListIssues has cognitive complexity 54 (threshold 15). Drivers by points: if/else 45, boolean chains 4, loops 4, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/issue.go"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"a927c5af87c5718c9812afd8c7ca1fa29168c7ab83b929db400c90d1dd14bb11"}},{"ruleId":"D2","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBox (cognitive 54): pullRequestViewInfo.prepareMergeBox has cognitive complexity 54 (threshold 15). Drivers by points: if/else 38, boolean chains 16 (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":"routers/web/repo/issue_view.go"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"50f4273a1135823508a43847c13afd3d77ca5e3862a9b1c7782e5c352f7b42b9"}},{"ruleId":"D2","level":"warning","message":{"text":"SMTPSender.Send (cognitive 54): SMTPSender.Send has cognitive complexity 54 (threshold 15). Drivers by points: if/else 51, boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mailer/sender/smtp.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"3745862c8b7db0bb5d9e29c1b6dd56ae961a304ea730c3a5b71333272b1dc986"}},{"ruleId":"D2","level":"warning","message":{"text":"linkifyParser.Parse (cognitive 53): linkifyParser.Parse has cognitive complexity 53 (threshold 15). Drivers by points: if/else 38, loops 6, boolean chains 5, match/switch 4 (nesting depth added 25). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/common/linkify.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"f797bb5ac7c97633aaa8c1c6f030fec1d182f4a0212501ef84777194321070c9"}},{"ruleId":"D2","level":"warning","message":{"text":"conan.searchPackages (cognitive 53): conan.searchPackages has cognitive complexity 53 (threshold 15). Drivers by points: if/else 49, loops 3, 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":"routers/api/packages/conan/search.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"d600062c22a7f4277ff08d006170f6038a037751384ff70f578afbbc58cbb236"}},{"ruleId":"D2","level":"warning","message":{"text":"user.ViewPackageVersion (cognitive 53): user.ViewPackageVersion has cognitive complexity 53 (threshold 15). Drivers by points: loops 20, match/switch 17, if/else 15, boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/user/package.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae3540351826b787959ef924ea37b51be493ded13362151f18d7289d74c4156c"}},{"ruleId":"D2","level":"warning","message":{"text":"incoming.processMessages (cognitive 53): incoming.processMessages has cognitive complexity 53 (threshold 15). Drivers by points: if/else 48, match/switch 2, boolean chains 1, jumps 1, loops 1 (nesting depth added 33). Of this number, 28 points are the body\u0027s own statements and 25 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":"services/mailer/incoming/incoming.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"f80490b11d7eb0fa9b69dca8460500b9b5f55d82e5050ed80a7c85abc2e43b90"}},{"ruleId":"D2","level":"warning","message":{"text":"rpm.buildUpdateInfo (cognitive 53): rpm.buildUpdateInfo has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27, loops 25, boolean chains 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/packages/rpm/repository.go"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"744387d1af21c8588fe9ec6453ba974110ab2b33bfb18d978001a8abab67224d"}},{"ruleId":"D2","level":"warning","message":{"text":"globCompiler.compile (cognitive 52): globCompiler.compile has cognitive complexity 52 (threshold 15). Drivers by points: if/else 46, boolean chains 3, match/switch 2, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/glob/glob.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b21b1ba3787bfef8dd2bee90be4c33d13f5bb95f7f0f34121003f9ac0343539"}},{"ruleId":"D2","level":"warning","message":{"text":"templates.QueryBuild (cognitive 52): templates.QueryBuild has cognitive complexity 52 (threshold 15). Drivers by points: if/else 42, boolean chains 6, loops 4 (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":"modules/templates/helper.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c72246963082efa5a1cb7e93b67c1234dbcdbf0488fc1cef67efa5352f4c00f"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.MergePullRequest (cognitive 52): repo.MergePullRequest has cognitive complexity 52 (threshold 15). Drivers by points: if/else 47, match/switch 5 (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":"routers/web/repo/pull.go"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"718c3c08f866ea7d129dfd8457fb3e63c39fea0fe9aade719e4787b64d2dd55a"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.parseCommitWithGPGSignature (cognitive 52): asymkey.parseCommitWithGPGSignature has cognitive complexity 52 (threshold 15). Drivers by points: if/else 44, loops 6, 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":"services/asymkey/commit.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"2edea9eb14bde057f0f2d7af289256ad9a68f191d88886dbe06dcfffd08946a1"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.handleSettingsPostAdvanced (cognitive 51): setting.handleSettingsPostAdvanced has cognitive complexity 51 (threshold 15). Drivers by points: if/else 41, boolean chains 10 (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":"routers/web/repo/setting/setting.go"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"3070ba8112497666ff67de4eabbd710cb242be08a7f61ede6fabfa8bf7faab5d"}},{"ruleId":"D2","level":"warning","message":{"text":"user.Milestones (cognitive 51): user.Milestones has cognitive complexity 51 (threshold 15). Drivers by points: if/else 42, loops 6, 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":"routers/web/user/home.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"1939f028f55630cb2469517126a454180ae827852ce3468e82cb6a53509a68dc"}},{"ruleId":"D2","level":"warning","message":{"text":"alpine.buildPackagesIndex (cognitive 51): alpine.buildPackagesIndex has cognitive complexity 51 (threshold 15). Drivers by points: if/else 48, loops 2, 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":"services/packages/alpine/repository.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db538439238c1085b5270455dd84c8c6ca109940b205f4071cd8f92e8237098"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.NewPullRequest (cognitive 51): pull.NewPullRequest has cognitive complexity 51 (threshold 15). Drivers by points: if/else 44, loops 4, boolean chains 3 (nesting depth added 15). Of this number, 33 points are the body\u0027s own statements and 18 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":"services/pull/pull.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"541b6a782762f5c08b4761b9e5050474ec87f24ee8156e82c91d59ea094c23ff"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_13.SetDefaultPasswordToArgon2 (cognitive 50): v1_13.SetDefaultPasswordToArgon2 has cognitive complexity 50 (threshold 15). Drivers by points: if/else 39, loops 7, boolean chains 3, match/switch 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":"modelmigration/v1_13/v151.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ccf539ed43d199446ff646ce02b90028d1e857f75bfc5a0bc9138110e14ac07"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.matchPullRequestEvent (cognitive 50): actions.matchPullRequestEvent has cognitive complexity 50 (threshold 15). Drivers by points: if/else 40, match/switch 4, boolean chains 3, loops 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":"modules/actions/workflows.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce5d206291f8bb62bd6178b4ce157cc25bdb26251cee7531cd94a2c9c41c15b6"}},{"ruleId":"D2","level":"warning","message":{"text":"RepositoryDumper.handlePullRequest (cognitive 50): RepositoryDumper.handlePullRequest has cognitive complexity 50 (threshold 15). Drivers by points: if/else 45, loops 3, boolean chains 2 (nesting depth added 18). Of this number, 44 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":"services/migrations/dump.go"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"3612c3eeccd43c555641827de672092a2805214db0c186a4dd65eda2f3aae755"}},{"ruleId":"D2","level":"warning","message":{"text":"user.deleteUser (cognitive 50): user.deleteUser has cognitive complexity 50 (threshold 15). Drivers by points: if/else 39, loops 9, 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":"services/user/delete.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9b3c507e4e8860625faf0718b7e13cb0ce482afcd4908678922c8877c47d5b"}},{"ruleId":"D2","level":"warning","message":{"text":"user.createUser (cognitive 49): user.createUser has cognitive complexity 49 (threshold 15). Drivers by points: if/else 46, boolean chains 3 (nesting depth added 14). Of this number, 29 points are the body\u0027s own statements and 20 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":"models/user/user.go"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d433ace28285117d24e0832139bf21efe503eec329aabefa878c6d06aa629b"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.getMergeMessage (cognitive 49): pull.getMergeMessage has cognitive complexity 49 (threshold 15). Drivers by points: if/else 45, loops 4 (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":"services/pull/merge.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc0ef94597cc17d6f20e63681e327070fcc214a4319d951e74d03b535fc4ffa"}},{"ruleId":"D2","level":"warning","message":{"text":"util.ToSnakeCase (cognitive 48): util.ToSnakeCase has cognitive complexity 48 (threshold 15). Drivers by points: if/else 30, loops 13, boolean chains 5 (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":"modules/util/string.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"377e6047b8481741cc2d2a62d2713d3b1dd750b37a3c7cd8d7c4a944bbe87f1a"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreatePullRequest (cognitive 48): repo.CreatePullRequest has cognitive complexity 48 (threshold 15). Drivers by points: if/else 41, 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":"routers/api/v1/repo/pull.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc3bc7b6ed1da7d930e889d8665d191cb3b7205e17303b7769b5d437e3c63fa5"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.apiReviewRequest (cognitive 47): repo.apiReviewRequest has cognitive complexity 47 (threshold 15). Drivers by points: if/else 41, boolean chains 3, loops 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":"routers/api/v1/repo/pull_review.go"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"426523fdf2d34b9a061a08259368d65e1bf5ae259e4baa225c05f6b6635af74e"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.Repos (cognitive 47): setting.Repos has cognitive complexity 47 (threshold 15). Drivers by points: if/else 36, boolean chains 7, loops 4 (nesting depth added 22). Of this number, 31 points are the body\u0027s own statements and 16 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":"routers/web/user/setting/profile.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"db72f882ad32d76981a41a8e2d5bdb9596b7023e373cb33d58ebb6a783542ca2"}},{"ruleId":"D2","level":"warning","message":{"text":"jobStatusResolver.resolve (cognitive 47): jobStatusResolver.resolve has cognitive complexity 47 (threshold 15). Drivers by points: if/else 42, 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":"services/actions/job_emitter.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c4f74ae8bec54e437c379333d6e6ca394172befc3d15425183d5c91cd7dc0f"}},{"ruleId":"D2","level":"warning","message":{"text":"release.createTag (cognitive 47): release.createTag has cognitive complexity 47 (threshold 15). Drivers by points: if/else 47 (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":"services/release/release.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb75b50c5beb84d1a39c0525808dea3aa38d6aeca07e6d09e58e5136f884079a"}},{"ruleId":"D2","level":"warning","message":{"text":"template.validateYaml (cognitive 46): template.validateYaml has cognitive complexity 46 (threshold 15). Drivers by points: if/else 43, match/switch 2, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/issue/template/template.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2264c91f47277d7139adacbd7cdc7c93db5dd356151b0d2dc62e22a16962e2"}},{"ruleId":"D2","level":"warning","message":{"text":"source.syncGroupsToTeamsCached (cognitive 46): source.syncGroupsToTeamsCached has cognitive complexity 46 (threshold 15). Drivers by points: if/else 41, loops 3, 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":"services/auth/source/source_group_sync.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"eacb9870dbb9227212b168251230b23a9942fcdb87ec391c11b62ba79e7af9e4"}},{"ruleId":"D2","level":"warning","message":{"text":"files.handleCheckErrors (cognitive 46): files.handleCheckErrors has cognitive complexity 46 (threshold 15). Drivers by points: if/else 39, boolean chains 5, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/files/update.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01f3eb16e81c631c886f9b6586822024a90865c4af26c8fa95ef5bb651976ee"}},{"ruleId":"D2","level":"warning","message":{"text":"ssh.publicKeyHandler (cognitive 45): ssh.publicKeyHandler has cognitive complexity 45 (threshold 15). Drivers by points: if/else 38, loops 5, jumps 2 (nesting depth added 24). Of this number, 38 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":"modules/ssh/ssh.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61d52ddeb6b8252923879c7710f06414b3f1b7087daf63ccb7595f494d0355a"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdateIssueLabel (cognitive 45): repo.UpdateIssueLabel has cognitive complexity 45 (threshold 15). Drivers by points: if/else 32, loops 12, match/switch 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":"routers/web/repo/issue_label.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d3025b48ad89f587ea6b126a32fc23ed411254f7354b94e5aa53f53c1575c55"}},{"ruleId":"D2","level":"warning","message":{"text":"ldap.realSearchEntry (cognitive 45): ldap.realSearchEntry has cognitive complexity 45 (threshold 15). Drivers by points: if/else 42, 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":"services/auth/source/ldap/source_search.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"473e546f51296a74a0a575a64c2d92417c799ec491c1360b90527f5ce0cdf0bb"}},{"ruleId":"D2","level":"warning","message":{"text":"mailer.composeIssueCommentMessages (cognitive 45): mailer.composeIssueCommentMessages has cognitive complexity 45 (threshold 15). Drivers by points: if/else 34, loops 8, boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mailer/mail_issue_common.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"2988dcbdc61162e4e7ac38073cc8f63b3b8416d8cc896e06846021085d52fdd0"}},{"ruleId":"D2","level":"warning","message":{"text":"release.UpdateRelease (cognitive 45): release.UpdateRelease has cognitive complexity 45 (threshold 15). Drivers by points: if/else 34, loops 9, boolean chains 2 (nesting depth added 19). Most of this is not in the body itself: 12 of the 45 points are its own statements and the rest belongs to one function literal inside it that branches (line 278). 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":"services/release/release.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"d47555870b03597445e814a914de90f75909bfa0abc9bbb65690af7102c4bcdb"}},{"ruleId":"D2","level":"warning","message":{"text":"files.getFileContentsByEntryInternal (cognitive 45): files.getFileContentsByEntryInternal has cognitive complexity 45 (threshold 15). Drivers by points: if/else 41, 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":"services/repository/files/content.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d10b929de1c3e4459aeb7d1445d86953941d8c6fc4f1ab447b4e2385717f079"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.GetAllCommits (cognitive 44): repo.GetAllCommits has cognitive complexity 44 (threshold 15). Drivers by points: if/else 42, boolean chains 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/commits.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"10799f522bcfc2405b6cec0ea0e4a86e4aa8d52c23cc07b81e7d746081186a45"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.resolveCurrentRunForView (cognitive 44): actions.resolveCurrentRunForView has cognitive complexity 44 (threshold 15). Drivers by points: if/else 37, boolean chains 7 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/actions/view.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb4c238c94622a4bbf6a814ebc67d512371fda653850d2d3e5a68c9948ec710"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ServeAttachment (cognitive 44): repo.ServeAttachment has cognitive complexity 44 (threshold 15). Drivers by points: if/else 40, boolean chains 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":"routers/web/repo/attachment.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"4704326ed319733621f8671228a7a0660bb3ff1e66b4e409fccee66ff3f20bcf"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.SearchIssues (cognitive 44): repo.SearchIssues has cognitive complexity 44 (threshold 15). Drivers by points: if/else 43, 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":"routers/web/repo/issue_list.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"59d20db5e4fd2276162289029c8258e5fc577846733b3135f9a208447326914a"}},{"ruleId":"D2","level":"warning","message":{"text":"comparePageInfoType.parseCompareInfo (cognitive 44): comparePageInfoType.parseCompareInfo has cognitive complexity 44 (threshold 15). Drivers by points: if/else 37, boolean chains 7 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/compare.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb8a864a06132d23e931becfcbd83ee3deee85a5ac390455177be0986e953032"}},{"ruleId":"D2","level":"warning","message":{"text":"arch.buildPackagesIndex (cognitive 44): arch.buildPackagesIndex has cognitive complexity 44 (threshold 15). Drivers by points: if/else 41, loops 2, 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":"services/packages/arch/repository.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"1908fc10c4f9a0a3997118b0360669c74c2abf6f21d0b4212b6da367676f6eb1"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_12.FixMergeBase (cognitive 43): v1_12.FixMergeBase has cognitive complexity 43 (threshold 15). Drivers by points: if/else 37, loops 3, match/switch 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_12/v128.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd0893cfdf23161369963d27d773e5ea57cf727e010f002393a9a4b6d7824655"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaBackend.Batch (cognitive 43): GiteaBackend.Batch has cognitive complexity 43 (threshold 15). Drivers by points: if/else 39, loops 2, match/switch 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":"modules/lfstransfer/backend/backend.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"3445fd8fbe21cba5701cc270beedb5be8235a9be39e5d87282a9015d1a694de3"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.checkJobsOfCurrentRunAttempt (cognitive 43): actions.checkJobsOfCurrentRunAttempt has cognitive complexity 43 (threshold 15). Drivers by points: if/else 36, match/switch 3, boolean chains 2, loops 2 (nesting depth added 18). Most of this is not in the body itself: 14 of the 43 points are its own statements and the rest belongs to one function literal inside it that branches (line 280). 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":"services/actions/job_emitter.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea43622bed884b261f9fccebb4bfad14cc22694b69dca8ec22a78cf079b1f75a"}},{"ruleId":"D2","level":"warning","message":{"text":"code.nonGenesisChanges (cognitive 42): code.nonGenesisChanges has cognitive complexity 42 (threshold 15). Drivers by points: if/else 39, match/switch 2, loops 1 (nesting depth added 22). Of this number, 40 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/indexer/code/git.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2a43ada57d5014e54f56eb5fbe6ebd386b8872b986f2cf2b1ba7f651ff9438e"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdatePullReviewRequest (cognitive 42): repo.UpdatePullReviewRequest has cognitive complexity 42 (threshold 15). Drivers by points: if/else 40, boolean chains 1, loops 1 (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":"routers/web/repo/pull_review.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8138eb65534be316ee637f0d67e7962e31eef7865b272c2c0f896c7d47f4232"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.SignMerge (cognitive 42): asymkey.SignMerge has cognitive complexity 42 (threshold 15). Drivers by points: if/else 37, match/switch 2, boolean chains 1, jumps 1, 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":"services/asymkey/sign.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ccf2cc33ca7a6ed2ccd309391eb6a0207422dea9d80dbb9af54e5ce64e55259"}},{"ruleId":"D2","level":"warning","message":{"text":"context.determineAccessMode (cognitive 42): context.determineAccessMode has cognitive complexity 42 (threshold 15). Drivers by points: if/else 30, boolean chains 8, loops 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/context/package.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4d62624eb16c2cd0b119a5e34c43122a98f8a700a6f23353735fce8b17a556"}},{"ruleId":"D2","level":"warning","message":{"text":"openapi3gen.extractSharedEnums (cognitive 41): openapi3gen.extractSharedEnums has cognitive complexity 41 (threshold 15). Drivers by points: if/else 31, loops 6, boolean chains 4 (nesting depth added 18). Of this number, 40 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":"build/openapi3gen/convert.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f6b50461d8388aef53fb36c54c3b7f98e629d4e6403d89fc5c84b3152a9ac3"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.GetCodeActivityStats (cognitive 41): Repository.GetCodeActivityStats has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36, loops 2, match/switch 2, boolean chains 1 (nesting depth added 21). Most of this is not in the body itself: 5 of the 41 points are its own statements and the rest belongs to one function literal inside it that branches (line 69). 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":"modules/git/repo_stats.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b8b065d89f987321236e1d3d77bfe124d7b8367e3fcbebfe94c37b8709dde7e"}},{"ruleId":"D2","level":"warning","message":{"text":"Indexer.Search (cognitive 41): Indexer.Search has cognitive complexity 41 (threshold 15). Drivers by points: if/else 32, loops 7, boolean chains 1, match/switch 1 (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":"modules/indexer/issues/elasticsearch/elasticsearch.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"c284a446d7fb814acec449735b45f0ee10e046f64f5f4ef65d4c1d79a5ab5b75"}},{"ruleId":"D2","level":"warning","message":{"text":"debian.ParsePackage (cognitive 41): debian.ParsePackage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 34, loops 4, match/switch 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/debian/metadata.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cb833d1fb8e215314204978fe12a28ab58b6c135e812ef40a365641a7aed021"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.ToTimelineComment (cognitive 41): convert.ToTimelineComment has cognitive complexity 41 (threshold 15). Drivers by points: if/else 39, 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":"services/convert/issue_comment.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"d26bf54ab32e9bfe917499081745426e616f8b7c94b3aa83ee1d1f588257eaf6"}},{"ruleId":"D2","level":"warning","message":{"text":"highlightCodeDiff.recoverOneDiff (cognitive 41): highlightCodeDiff.recoverOneDiff has cognitive complexity 41 (threshold 15). Drivers by points: if/else 35, loops 5, 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":"services/gitdiff/highlightdiff.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"638face236d36352363504c2b5032d1d8eac41f83d3967e411de78d37f164e1a"}},{"ruleId":"D2","level":"warning","message":{"text":"wiki.updateWikiPage (cognitive 41): wiki.updateWikiPage has cognitive complexity 41 (threshold 15). Drivers by points: if/else 39, 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":"services/wiki/wiki.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"19cc5fbed27d06c1b7f5bf8f92f461f5731c0adc4cd3c68c911ce75087eac165"}},{"ruleId":"D2","level":"warning","message":{"text":"conan.uploadFile (cognitive 40): conan.uploadFile has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, boolean chains 2, 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":"routers/api/packages/conan/conan.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e663245511f6b3139067bebcb0203234aba5a98fac4f5a87c09b5f48745a7db"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.Migrate (cognitive 40): repo.Migrate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 33, boolean chains 7 (nesting depth added 8). Of this number, 36 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: 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":"routers/api/v1/repo/migrate.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2a123bfadafc717a6c10f769d578223ef7ec121264ebaa89626bc0faf4d7c0"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.AuthorizeOAuth (cognitive 40): auth.AuthorizeOAuth has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, boolean chains 2, loops 2, 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":"routers/web/auth/oauth2_provider.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"054fcd71daaaafe7ba50ae8a59ba724e05e85a4d175cd26463bb0a76c7ba4746"}},{"ruleId":"D2","level":"warning","message":{"text":"web.registerWebRoutes (cognitive 40): web.registerWebRoutes has cognitive complexity 40 (threshold 15). Drivers by points: if/else 31, boolean chains 7, match/switch 2 (nesting depth added 6). Most of this is not in the body itself: 4 of the 40 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 921, 425, 1082, \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":"routers/web/web.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f92f6f610c1a7c3bfa961ac2fee487afe9fea16fa2c44721ee8c1049434524"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.expandDeferredMatrix (cognitive 40): actions.expandDeferredMatrix has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, loops 4, boolean chains 1 (nesting depth added 11). Of this number, 36 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":"services/actions/matrix.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1a52c671472ea275b09beece0cc89da894bb781b1068f2740baa507d5db8aa"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.HasAllRequiredCodeownerReviews (cognitive 40): issue.HasAllRequiredCodeownerReviews has cognitive complexity 40 (threshold 15). Drivers by points: if/else 29, loops 10, boolean chains 1 (nesting depth added 19). 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":"services/issue/pull.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"4abb4f67f8c354e2b483fcce73065e614f6435e6dcbcb4ad5b25de2e764e6ba3"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.createCodeComment (cognitive 40): pull.createCodeComment has cognitive complexity 40 (threshold 15). Drivers by points: if/else 34, boolean chains 6 (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":"services/pull/review.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70c7d17d0758e5de9bbb85442115720180467aa1a308a2d8f218fda5ddb41dd"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runCreateUser (cognitive 39): cmd.runCreateUser has cognitive complexity 39 (threshold 15). Drivers by points: if/else 36, boolean chains 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/admin_user_create.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d57d8636f9877e75a5219c1d79705bca16ece4eeab4b92f19be38e5fd6e5517"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_16.UnwrapLDAPSourceCfg (cognitive 39): v1_16.UnwrapLDAPSourceCfg has cognitive complexity 39 (threshold 15). Drivers by points: if/else 32, loops 5, boolean chains 2 (nesting depth added 19). Of this number, 25 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":"modelmigration/v1_16/v189.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e135bff387a64ecafce3d8ee1a34e5214abfaae606262109c2463adc036985"}},{"ruleId":"D2","level":"warning","message":{"text":"git.syncGitConfig (cognitive 39): git.syncGitConfig has cognitive complexity 39 (threshold 15). Drivers by points: if/else 36, 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":"modules/git/config.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"51e2ef4cd28f6217bf862b22cbef7391e8a3195f5d4f45a0aead4845bbc02e21"}},{"ruleId":"D2","level":"warning","message":{"text":"conda.parsePackageTar (cognitive 39): conda.parsePackageTar has cognitive complexity 39 (threshold 15). Drivers by points: if/else 38, 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":"modules/packages/conda/metadata.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f87c825dc394da113d724380c6a9f04ed737bac46c623e3532746ff5de0603"}},{"ruleId":"D2","level":"warning","message":{"text":"actionRunListData.processActionRuns (cognitive 39): actionRunListData.processActionRuns has cognitive complexity 39 (threshold 15). Drivers by points: if/else 30, loops 7, 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8074fb5d654e84bf1237f4d52c7e4c64b839a4a825f8b907a5038ed6d97fb48"}},{"ruleId":"D2","level":"warning","message":{"text":"comparePageInfoType.prepareCreatePullRequestPage (cognitive 39): comparePageInfoType.prepareCreatePullRequestPage has cognitive complexity 39 (threshold 15). Drivers by points: if/else 33, 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":"routers/web/repo/compare.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"594aef2db7adc2f9a805051c4b66135ad9bfea9def897ea95cc6e064f477ab49"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.loadOneBranch (cognitive 39): repository.loadOneBranch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 35, 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":"services/repository/branch.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2488aa481a22538bb1a500f3bde1f63bad901dd7a9e30a7bac59df26b2a49be"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.parseKeyString (cognitive 38): asymkey.parseKeyString has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, loops 2, match/switch 2, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/asymkey/ssh_key_parse.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"a83052db607b187c872ab75ed92eb074adaf608cfdfce1e5623adc38dbd7a477"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.issueIndexPatternProcessor (cognitive 38): markup.issueIndexPatternProcessor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 28, boolean chains 7, match/switch 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/html_issue.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7ec87fceeab35e778ed79a38ad680c74fd02b35662e91ededad12c2ce689386"}},{"ruleId":"D2","level":"warning","message":{"text":"inlineParser.Parse (cognitive 38): inlineParser.Parse has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20, boolean chains 8, loops 5, match/switch 5 (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":"modules/markup/markdown/math/inline_parser.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2a832fe54ab5cbc3e091f85ce914ef8ce654dc32908cddf6010a5905b477c9f"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.StoreMissingLfsObjectsInRepository (cognitive 38): repository.StoreMissingLfsObjectsInRepository has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, boolean chains 2, match/switch 2, loops 1 (nesting depth added 16). Of this number, 29 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":"modules/repository/repo.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"abbe0c1adb71d52a74fc1b4eb8e32c516ea558c06bd6e814c5e70063e310a50f"}},{"ruleId":"D2","level":"warning","message":{"text":"v1.repoAssignment (cognitive 38): v1.repoAssignment has cognitive complexity 38 (threshold 15). Drivers by points: if/else 37, boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 0 of the 38 points are its own statements and the rest belongs to one function literal inside it that branches (line 137). 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":"routers/api/v1/api.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb8329768730536af56bf5e02b9045c710c7b790bafd8053c8216654ae88f57"}},{"ruleId":"D2","level":"warning","message":{"text":"commitstatus.FindReposLatestCommitStatuses (cognitive 38): commitstatus.FindReposLatestCommitStatuses has cognitive complexity 38 (threshold 15). Drivers by points: if/else 31, loops 7 (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":"services/repository/commitstatus/commitstatus.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f9b9c66993577ffc51eeeeb250f90492da4feeafc7a58a121bdeeecad8e365"}},{"ruleId":"D2","level":"warning","message":{"text":"openapi3gen.ScanSwaggerEnumTypes (cognitive 37): openapi3gen.ScanSwaggerEnumTypes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22, loops 11, boolean chains 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":"build/openapi3gen/enumscan.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"6180f2dbdf8f45fb0c4dd9970466ddfa329a1042eb639f3c52888fe4b895f2c0"}},{"ruleId":"D2","level":"warning","message":{"text":"db.CheckCollations (cognitive 37): db.CheckCollations has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26, boolean chains 6, loops 5 (nesting depth added 13). Of this number, 35 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":"models/db/collation.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"17b2dbf6481951fc8ac091557924396351c4a076540df67bdec615b7f58d6b9b"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.InitWorkPathAndCfgProvider (cognitive 37): setting.InitWorkPathAndCfgProvider has cognitive complexity 37 (threshold 15). Drivers by points: if/else 33, boolean chains 3, loops 1 (nesting depth added 12). Of this number, 16 points are the body\u0027s own statements and 21 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/setting/path.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"b424b8330a801ee05c2597563708273ec6f3f96fbbccff89b639e8af69bba2a4"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.SearchRepoIssuesJSON (cognitive 37): repo.SearchRepoIssuesJSON has cognitive complexity 37 (threshold 15). Drivers by points: if/else 32, boolean chains 2, loops 2, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_list.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e8b27bfc1c83e037e1a0b0ed0051353826ff10d1c3a26322e2d25114e4f475d"}},{"ruleId":"D2","level":"warning","message":{"text":"user.prepareUserProfileTabData (cognitive 37): user.prepareUserProfileTabData has cognitive complexity 37 (threshold 15). Drivers by points: if/else 31, boolean chains 5, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/user/profile.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"390e5c344b2069c6e30d971f59a6c3899760d292033bcd51988f9d0f69942b9d"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.detectAndHandleScopedWorkflows (cognitive 37): actions.detectAndHandleScopedWorkflows has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28, loops 7, 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":"services/actions/notifier_helper.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afc6ee78696666db3b4a914f9b92394f35cebd5294e33c2eb042e82c2c4277a"}},{"ruleId":"D2","level":"warning","message":{"text":"rerunPlan.expandRerunJobIDs (cognitive 37): rerunPlan.expandRerunJobIDs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24, loops 11, 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":"services/actions/rerun.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"e927666c2a6e482b06605b21659cf1ebf2a9102d9749f8307230e91e53e94803"}},{"ruleId":"D2","level":"warning","message":{"text":"ReplyHandler.Handle (cognitive 37): ReplyHandler.Handle has cognitive complexity 37 (threshold 15). Drivers by points: if/else 29, match/switch 4, boolean chains 2, loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mailer/incoming/incoming_handler.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"350790f80d3026b10e8c1879b0d84ffd3a99aae1265adb3e63c83d2914156515"}},{"ruleId":"D2","level":"warning","message":{"text":"RepositoryDumper.CreateReleases (cognitive 37): RepositoryDumper.CreateReleases has cognitive complexity 37 (threshold 15). Drivers by points: if/else 32, loops 5 (nesting depth added 23). Of this number, 18 points are the body\u0027s own statements and 19 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":"services/migrations/dump.go"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ff99530e6d6e59c7743578c7e2ae463f62593a3229f53245198bc179d71e68"}},{"ruleId":"D2","level":"warning","message":{"text":"container.executeCleanupOneRule (cognitive 37): container.executeCleanupOneRule has cognitive complexity 37 (threshold 15). Drivers by points: if/else 33, match/switch 2, boolean chains 1, 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":"services/packages/cleanup/cleanup.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4e856a5a7f956e98a9d753737307a6dd1fe2092592da57fded75929af60f6a7"}},{"ruleId":"D2","level":"warning","message":{"text":"activities.createOrUpdateIssueNotifications (cognitive 36): activities.createOrUpdateIssueNotifications has cognitive complexity 36 (threshold 15). Drivers by points: if/else 30, boolean chains 3, loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/activities/notification_list.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c7d33e74b5a1042347518f839b1041cfe74175f55abe58929f443752129de01"}},{"ruleId":"D2","level":"warning","message":{"text":"git.GrepSearch (cognitive 36): git.GrepSearch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 24, loops 6, boolean chains 5, match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 85). 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":"modules/git/grep.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d2a8756c966d207c75430b0d3919747fafc09adb70f1ac662cf5092bf73a58"}},{"ruleId":"D2","level":"warning","message":{"text":"BlameReader.NextPart (cognitive 36): BlameReader.NextPart has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, loops 7, 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":"modules/git/blame.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1d62c6efef438f3bba54228fc359b373933d8d1b42366b11d231a3f66d015a"}},{"ruleId":"D2","level":"warning","message":{"text":"Indexer.Search (cognitive 36): Indexer.Search has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, loops 6, match/switch 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, 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":"modules/indexer/issues/meilisearch/meilisearch.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"d737fb03e64b0d1004d69690b25b09613d3bf463b111132599e0b78f25992051"}},{"ruleId":"D2","level":"warning","message":{"text":"valuedField.WriteTo (cognitive 36): valuedField.WriteTo has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26, loops 8, boolean chains 1, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/issue/template/template.go"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b815685b292db185082fa81823f1a0d37aceda3304b0bb260feb93e4179c981"}},{"ruleId":"D2","level":"warning","message":{"text":"swift.ParsePackage (cognitive 36): swift.ParsePackage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/swift/metadata.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"639e5e747ca487a8a5bff4f6981da2da6427315463ae576fa763cc9c7caed89e"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.LFSPointerFiles (cognitive 36): setting.LFSPointerFiles has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, boolean chains 1, loops 1 (nesting depth added 20). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 406). 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":"routers/web/repo/setting/lfs.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ef861608e650b037d6a5f26a732b9eede3edf9725d6bbd4447be2f78d070ba"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.EmailPost (cognitive 36): setting.EmailPost has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, 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":"routers/web/user/setting/account.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1558be3e943eefc1c51325ad20eb873025c1fcfb1af9eedf502f8c6a1a5ea92"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.SignCRUDAction (cognitive 36): asymkey.SignCRUDAction has cognitive complexity 36 (threshold 15). Drivers by points: if/else 31, match/switch 2, boolean chains 1, jumps 1, 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":"services/asymkey/sign.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"95685abf68471a8573edf2f66d77d94c3f3b1ccdbe09f2209b713bf22c625acc"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_11.RenameExistingUserAvatarName (cognitive 35): v1_11.RenameExistingUserAvatarName has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, match/switch 5, loops 4, 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":"modelmigration/v1_11/v115.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"b40c89dd3ff9c53b2001bbcb0197d1e3e974c0dec2838fe4cd622ed6d41684b3"}},{"ruleId":"D2","level":"warning","message":{"text":"user.GetUsersByEmails (cognitive 35): user.GetUsersByEmails has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28, 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":"models/user/user.go"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"03cd6c9d7cdb88723fe5937d607b9ee3b97fd2a29a397181befef632c692e2ed"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.updateBasicProperties (cognitive 35): repo.updateBasicProperties has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28, boolean chains 4, match/switch 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/repo.go"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"af04a0139ab9b179f6f6a86cd7e02359387ad64fec22e570314780973a7b8d5c"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.updateMirror (cognitive 35): repo.updateMirror has cognitive complexity 35 (threshold 15). Drivers by points: if/else 31, boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/repo.go"},"region":{"startLine":1021}}}],"partialFingerprints":{"codehealthFindingId/v1":"76673b6469d642cee9344d4a160873480d05007ff2b28d372614a3597fcac8bb"}},{"ruleId":"D2","level":"warning","message":{"text":"private.writeProcess (cognitive 35): private.writeProcess has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23, loops 12 (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":"routers/private/manager_process.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"98d427a7b04ec7301d17a557e9693214acf9749eee0cb7d8b849e3a2aeef0719"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.fillViewRunResponseSummary (cognitive 35): actions.fillViewRunResponseSummary has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19, loops 9, boolean chains 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":"routers/web/repo/actions/view.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"08bdf7255a2fbf67ae4c009e6805e7160c5bd92a9eaf5e5554fa9d6d7d1314f2"}},{"ruleId":"D2","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxStatusCheckData (cognitive 35): pullRequestViewInfo.prepareMergeBoxStatusCheckData has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, boolean chains 5, loops 5 (nesting depth added 8). Of this number, 29 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":"routers/web/repo/pull.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"e764c5207e0826b92ac0e6c23abe638622c162c52898d9cb8985c85800f381f5"}},{"ruleId":"D2","level":"warning","message":{"text":"packages.SetRulePreviewContext (cognitive 35): packages.SetRulePreviewContext has cognitive complexity 35 (threshold 15). Drivers by points: if/else 30, loops 3, 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":"routers/web/shared/packages/packages.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"f849d18a9d25e4a6bffbc291561b55cd5704157f5ffa1d677f0ef67ac0c126e2"}},{"ruleId":"D2","level":"warning","message":{"text":"user.buildIssueOverview (cognitive 35): user.buildIssueOverview has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, boolean chains 4, loops 3, match/switch 3 (nesting depth added 4). Of this number, 29 points are the body\u0027s own statements and 6 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":"routers/web/user/home.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9c1c5c5336626bad659ca5ba3565cfedb74dd3ce17c7d541fd2326b1f3ba85"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.ToCommit (cognitive 35): convert.ToCommit has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27, loops 6, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/convert/git_commit.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"e998e11c3f0bffcf7049e48f98f6cfd0435f92d13d823df9d4a9a3f6c0db0c43"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaLocalUploader.CreateComments (cognitive 35): GiteaLocalUploader.CreateComments has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, loops 3, match/switch 2, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/gitea_uploader.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a49a770a4f2b3825584a42492e795060aacb8495f7bdc223c7a5e8b79d5c2d"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.attemptMerge (cognitive 35): pull.attemptMerge has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22, boolean chains 12, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/patch.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14d35c9857755ad44e3e4ea769a6e0dc1745ef94d4a2be01e29a7525690f7a5"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.createRepositoryInDB (cognitive 35): repository.createRepositoryInDB has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, loops 3, match/switch 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/create.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a8c198da6fbfee005691717b083c652700c0773ce0cc8733766b49ccc2e08c6"}},{"ruleId":"D2","level":"warning","message":{"text":"htmlChunkReader.readRunes (cognitive 34): htmlChunkReader.readRunes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, boolean chains 4, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/charset/escape_stream.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ea89da4b31851310b1e235ae20038c3676c0af13cc0cc1b896205b563479ad"}},{"ruleId":"D2","level":"warning","message":{"text":"Dumper.addFileOrDir (cognitive 34): Dumper.addFileOrDir has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, boolean chains 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/dump/dumper.go"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"a352441d5da4dfa742b7f637050b18c2bc179dd0f2adf5544922c17b503b5dca"}},{"ruleId":"D2","level":"warning","message":{"text":"code.Init (cognitive 34): code.Init has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25, match/switch 6, loops 2, boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 149, 128, 216, \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":"modules/indexer/code/indexer.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7a177967d35adbcf919e76031abdc0503006add131898d2a4d3d5f4be406cd1"}},{"ruleId":"D2","level":"warning","message":{"text":"debian.ParseControlFile (cognitive 34): debian.ParseControlFile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, match/switch 6, boolean chains 2, loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/debian/metadata.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aabfcf347d8fdecdc353fa57e9b04a2382d432d3eb3815fec75d49621700661"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreateIssue (cognitive 34): repo.CreateIssue has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, boolean chains 2, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/issue.go"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"f725653873266759abd01a8e1eae88c9e23fbda090267dda17d7123ba00da65e"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkStorage (cognitive 34): doctor.checkStorage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, boolean chains 7 (nesting depth added 10). Most of this is not in the body itself: 0 of the 34 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":"services/doctor/storage.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"00343df49b18971246e6b3750e1da0212e998aca6d3f27ae113190c95b6b4d1f"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaLocalUploader.CreateIssues (cognitive 34): GiteaLocalUploader.CreateIssues has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, loops 7 (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":"services/migrations/gitea_uploader.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0773ca21102fe245cb1451d0c3647e80b1e7b8586b8f9f7f8a9a2663de5ad5a"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaLocalUploader.CreateReviews (cognitive 34): GiteaLocalUploader.CreateReviews has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, 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":"services/migrations/gitea_uploader.go"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"2895125cda42ca1875456463d80d245d1a4f55527f32c132b320477b8d923e58"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.CheckPullMergeable (cognitive 34): pull.CheckPullMergeable has cognitive complexity 34 (threshold 15). Drivers by points: if/else 33, boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 0 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 142). 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":"services/pull/check.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ccd4c3ecc472825b72690c1ae952c841444ad499609b2760f182513fae6bdd"}},{"ruleId":"D2","level":"warning","message":{"text":"file.open (cognitive 33): file.open has cognitive complexity 33 (threshold 15). Drivers by points: if/else 33 (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":"models/dbfs/dbfile.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"7897741022725e2c2dcca2ff33b1c35c10a173a8625d800ba88e275dc525149c"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.IssueAssignOrRemoveProject (cognitive 33): issues.IssueAssignOrRemoveProject has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29, loops 4 (nesting depth added 18). Most of this is not in the body itself: 0 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 70). 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":"models/issues/issue_project.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"716900b2eaec1e39c48f6652a382e982b9580df6cfec63354f0833dbc5d376b3"}},{"ruleId":"D2","level":"warning","message":{"text":"Indexer.Search (cognitive 33): Indexer.Search has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, loops 6, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/indexer/code/bleve/bleve.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"68939715d53917e59b4358c069e3826071820d0bf75f175906947e22b783e6a1"}},{"ruleId":"D2","level":"warning","message":{"text":"template.unmarshal (cognitive 33): template.unmarshal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29, boolean chains 2, 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":"modules/issue/template/unmarshal.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b411357d6866edc088da565cd329dde5988360100cdaea313d2abe4ae2c39b2"}},{"ruleId":"D2","level":"warning","message":{"text":"lfs.performSingleOperation (cognitive 33): lfs.performSingleOperation has cognitive complexity 33 (threshold 15). Drivers by points: if/else 33 (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":"modules/lfs/http_client.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b577d84440f3b8ed1f0266cec03d3484bedaf4317d64de33052d498c53e191f"}},{"ruleId":"D2","level":"warning","message":{"text":"Renderer.Render (cognitive 33): Renderer.Render has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, boolean chains 5, 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":"modules/markup/csv/csv.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"abbb547588af7154b9cd8aa64a30a7dc4bb60ff15f3206e20f219908a611cee3"}},{"ruleId":"D2","level":"warning","message":{"text":"Conn.readV2ProxyHeader (cognitive 33): Conn.readV2ProxyHeader has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 2, match/switch 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, 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":"modules/proxyprotocol/conn.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"131a1c3ac2b2b04a99e3169cfe9ddd78e2c28181ef3338baaad29dc855f2beed"}},{"ruleId":"D2","level":"warning","message":{"text":"scopedtmpl.newScopedTemplateSet (cognitive 33): scopedtmpl.newScopedTemplateSet has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31, boolean chains 1, loops 1 (nesting depth added 16). Most of this is not in the body itself: 2 of the 33 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":"modules/templates/scopedtmpl/scopedtmpl.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e28e52134354ac8471b64faf11f0c46cfa1d6b91150f8308078f07227885b77"}},{"ruleId":"D2","level":"warning","message":{"text":"v1.checkTokenPublicOnly (cognitive 33): v1.checkTokenPublicOnly has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23, boolean chains 7, match/switch 2, loops 1 (nesting depth added 15). Most of this is not in the body itself: 0 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 249). 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":"routers/api/v1/api.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fcc14d946051bc326c4bdb5d1c1fadc42a4bd7e0581e73421f89b374a8126c0"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.createUserInContext (cognitive 33): auth.createUserInContext has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, match/switch 5, boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/auth/auth.go"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"af44039b61b578f5f56eb6f10028e79b905dd293b6b69b1ec2b108e7e36d4220"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.handleOAuth2SignIn (cognitive 33): auth.handleOAuth2SignIn has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/auth/oauth.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9dc9e8e66360d272e6f5ad50247bc5c853fee202d8f503d73ac4dd8ddd6273"}},{"ruleId":"D2","level":"warning","message":{"text":"web.verifyAuthWithOptions (cognitive 33): web.verifyAuthWithOptions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, boolean chains 6 (nesting depth added 11). Most of this is not in the body itself: 0 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 173). 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":"routers/web/web.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3ade6f10be0881ac552bddf774ffe0af83e0dfed6b9e4215d554d346785164"}},{"ruleId":"D2","level":"warning","message":{"text":"explore.Code (cognitive 33): explore.Code has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, loops 5, boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/explore/code.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ba96ea7a7b0ccef6ad06b7f550553a42fa23a9e4411b5089d01f9a91f0f5b2"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ViewIssue (cognitive 33): repo.ViewIssue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, boolean chains 7, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_view.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"de2689686a7d04c12f1eb40074f2e4a488330b818795ec9777ae0b0b7b35c23b"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.renderViewPage (cognitive 33): repo.renderViewPage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29, boolean chains 3, 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":"routers/web/repo/wiki.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"916d81cb9e083f4ac39b87adee0d77977c0f23b90261dfb76259cded79d7e324"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.parseRawPermissionsExplicit (cognitive 33): actions.parseRawPermissionsExplicit has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18, boolean chains 5, loops 5, match/switch 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":"services/actions/permission_parser.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"8805ba367fdab668953c911408e2f2fc61eb814559e1bd87a30fd3ed724e3032"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.CheckUserAllowedToUpdate (cognitive 33): pull.CheckUserAllowedToUpdate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29, 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":"services/pull/update.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bce5119f0694e2f9e3c49179cd881848e5d193f4e16c2509ec6286bce4e4f30"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.GenerateRepository (cognitive 33): repository.GenerateRepository has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 3 (nesting depth added 7). Of this number, 32 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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":"services/repository/template.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b0202e69e24500c76c8606e2b63f5d444592cc26138762f8ca37dc8bb0c0c8"}},{"ruleId":"D2","level":"warning","message":{"text":"git.RenameBranch (cognitive 32): git.RenameBranch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 30, boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 0 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 320). 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":"models/git/branch.go"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"21e725784446bab3872a328704060921f2cc7d25302c8a2d83b75a5dcdc5276a"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.NewIssueWithIndex (cognitive 32): issues.NewIssueWithIndex has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, boolean chains 2, 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":"models/issues/issue_update.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"8566694ff5d8ad0c95628eed8787b099c35a8d5e34f5f307137f9d231b177291"}},{"ruleId":"D2","level":"warning","message":{"text":"v1.orgAssignment (cognitive 32): v1.orgAssignment has cognitive complexity 32 (threshold 15). Drivers by points: if/else 32 (nesting depth added 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 674). 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":"routers/api/v1/api.go"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1f8ea219d9c30b4df076a582eb4d3782b0942180b3ec55e9057c0815924099"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.prepareWorkflowTemplate (cognitive 32): actions.prepareWorkflowTemplate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, loops 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ae8b02106b23489c523445fe96afaf8439bb8a5b96e6c82f65794d792d308e0"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ChangeCommentReaction (cognitive 32): repo.ChangeCommentReaction has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, boolean chains 3, 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":"routers/web/repo/issue_comment.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c478bb69720af00a865b6fafff9c753f594b960e5061445e3d4679474c7a112"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.PullRequestCodeOwnersReview (cognitive 32): issue.PullRequestCodeOwnersReview has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22, loops 8, boolean chains 2 (nesting depth added 10). Of this number, 28 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":"services/issue/pull.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf25741def06055d5bfd6c6b37904ba5e4531c03cfe8135ecb2ae2c0b5582c95"}},{"ruleId":"D2","level":"warning","message":{"text":"lfs.BatchHandler (cognitive 32): lfs.BatchHandler has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24, boolean chains 6, loops 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/lfs/server.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"673b2cbf92a5981cd7021f93eb627264b46058d014fa14d98bbb35faf7b8ce67"}},{"ruleId":"D2","level":"warning","message":{"text":"mirror.SyncPullMirror (cognitive 32): mirror.SyncPullMirror has cognitive complexity 32 (threshold 15). Drivers by points: if/else 31, loops 1 (nesting depth added 11). Of this number, 31 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mirror/mirror_pull.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"40e12b25858d886128933f3931a3af94ed36984cb8b8249ba74e7bb694b2456f"}},{"ruleId":"D2","level":"warning","message":{"text":"rpm.BuildSpecificRepositoryFiles (cognitive 32): rpm.BuildSpecificRepositoryFiles has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, 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":"services/packages/rpm/repository.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cd69b70d5e0dea449c917482474beeac1427d9827dbc2ef4c5c12d5d9e16c5"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.collectSquashMergeCommitCoAuthors (cognitive 32): pull.collectSquashMergeCommitCoAuthors has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, loops 6, boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/pull.go"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"2804cdb00cc76514cca920e59e6eb9242efcf22e9a4e76d0418692d851c84812"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.adoptRepository (cognitive 32): repository.adoptRepository has cognitive complexity 32 (threshold 15). Drivers by points: if/else 31, loops 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, 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":"services/repository/adopt.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"738e1685b4c8983665f912ef9f6558b4ac7a8ba8460ec797689dd8dd18112a13"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.parseLdapConfig (cognitive 31): cmd.parseLdapConfig has cognitive complexity 31 (threshold 15). Drivers by points: if/else 31 (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/admin_auth_ldap.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"abbf90a8ff52937f1b1a01e38ad3cb37e1a30fd3375291c8ff17f270f3e81064"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runHookPreReceive (cognitive 31): cmd.runHookPreReceive has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, 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":"cmd/hook.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1a2ff1b386beec62f5ae5fd16e86bd7dc407c181eff5147414573780733968"}},{"ruleId":"D2","level":"warning","message":{"text":"activities.GetFeeds (cognitive 31): activities.GetFeeds has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, boolean chains 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":"models/activities/action_list.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"2772b1156d6173509173fb3816ea165e2be8a42b04d95fd898c5579313d2d7b2"}},{"ruleId":"D2","level":"warning","message":{"text":"access.refreshAccesses (cognitive 31): access.refreshAccesses has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, loops 4, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/perm/access/access.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a86ce90b1338e6eb60e2e69605d87430a7a35998868a2fb7182c21a2f1661a"}},{"ruleId":"D2","level":"warning","message":{"text":"git.WalkShowRef (cognitive 31): git.WalkShowRef has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, loops 3, boolean chains 1 (nesting depth added 13). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 104). 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":"modules/git/repo_branch_nogogit.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de71c1a33852f3dfb7bad398f0f7262b9b75a315d3ecaae4f255df9536ee970"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.SyncRepoBranchesWithRepo (cognitive 31): repository.SyncRepoBranchesWithRepo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23, loops 5, boolean chains 3 (nesting depth added 7). Of this number, 22 points are the body\u0027s own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/repository/branch.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f23ccc945a6d00ad3485737ab82f34ed6ee373d67a5acf535fdd7d5e4d17583"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.startTasks (cognitive 31): actions.startTasks 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":"services/actions/schedule_tasks.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1b697d486aab91eeac7e142424b272b6c7da46c9d9201f9ebcfbe58a0060c56"}},{"ruleId":"D2","level":"warning","message":{"text":"Source.SearchEntries (cognitive 31): Source.SearchEntries has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, 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":"services/auth/source/ldap/source_search.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f62d9f14f5876759926eed7aaef7e65f8ed14c22a4a777ca548750de2be52bd"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.updateRepository (cognitive 31): repository.updateRepository has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, loops 2, 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":"services/repository/repository.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aa3ba9cfea8ba294ec694bb8b195c1250d8c6a1d5194a339c1b973921b3362d"}},{"ruleId":"D2","level":"warning","message":{"text":"user.UpdateUser (cognitive 31): user.UpdateUser has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, 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":"services/user/update.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"324ea1e90df3b14cf31661ad22540531f35020c5406fdbb0551854223f436f7a"}},{"ruleId":"D2","level":"warning","message":{"text":"authService.runUpdateOauth (cognitive 30): authService.runUpdateOauth has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, 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":"cmd/admin_auth_oauth.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc09f499127830bed4974c7d774980c5c62620e75fa4c0bb2c170eba5acf97b"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_22.expandHashReferencesToSha256 (cognitive 30): v1_22.expandHashReferencesToSha256 has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 8 (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":"modelmigration/v1_22/v286.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"be858ee1d04d37cf95f034e87a16c5e8ef7b3f8ab985b30f39b0416f273c7485"}},{"ruleId":"D2","level":"warning","message":{"text":"access.GetActionsUserRepoPermission (cognitive 30): access.GetActionsUserRepoPermission has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, 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":"models/perm/access/repo_permission.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2d1b8111aa1da8f5ae0d493c543a3a6eac1ab0b692504465cb46b2c284c5c8"}},{"ruleId":"D2","level":"warning","message":{"text":"jobparser.rewriteSubExpression (cognitive 30): jobparser.rewriteSubExpression has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, 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":"modules/actions/jobparser/evaluator.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"786b094e9ad2a384df154365574ff1b28bc6365c475c6a6f720619e29b08e85e"}},{"ruleId":"D2","level":"warning","message":{"text":"charset.escapeStream (cognitive 30): charset.escapeStream has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, loops 3, 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":"modules/charset/escape_stream.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0fe80615853bbaac26fc76d87d486114e9bc819a19931e493dee54720ba3795"}},{"ruleId":"D2","level":"warning","message":{"text":"alpine.ParsePackage (cognitive 30): alpine.ParsePackage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, loops 7 (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":"modules/packages/alpine/metadata.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"d175a0c362cdb9407ddfe5d0432b964ebf6eb044318c6828b7717433bce8f154"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.Processes (cognitive 30): Manager.Processes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 6, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/process/manager_stacktraces.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4529e607f7e4b3f1c8e60bddefe6566c826b2d35221b2a7ec0d08bfaf6473f1"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerPoolQueue.doFlush (cognitive 30): WorkerPoolQueue.doFlush has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17, match/switch 7, loops 4, boolean chains 1, jumps 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":"modules/queue/workergroup.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d349fe1a02caa48c6584d6de68b348283b30e6bb05bcc0671b05925f70994cd"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.loadRepositoryFrom (cognitive 30): setting.loadRepositoryFrom has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, 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":"modules/setting/repository.go"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd5716183c679e72dfb5feef0ae6affd2a590e9039229d34d94951f7aa98906"}},{"ruleId":"D2","level":"warning","message":{"text":"packages.reqPackageAccess (cognitive 30): packages.reqPackageAccess has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, match/switch 3, boolean chains 2 (nesting depth added 18). Most of this is not in the body itself: 0 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 42). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/api.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"37680194ca45bdf56aa70cea56a1e68e0b98b6ad598df3afb754c48773bf9b2d"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.oAuth2UserLoginCallback (cognitive 30): auth.oAuth2UserLoginCallback has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, boolean chains 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":"routers/web/auth/oauth.go"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc85646521100544495af0ebf2e5bd0c8e6ff2b5982b919a863cc6912811e2e0"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ChangeIssueReaction (cognitive 30): repo.ChangeIssueReaction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 3, 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":"routers/web/repo/issue.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b2a2c5bd84a10b2ff9ffdfe5a3c3171fbe919fef1975b62f973fb7d17c6b0b"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.checkHomeCodeViewable (cognitive 30): repo.checkHomeCodeViewable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 2, loops 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":"routers/web/repo/view.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c99e350a8ef407f00d5b1b5c84b3a95cee3bae6c3b6fb8d3e6a062c800bf996"}},{"ruleId":"D2","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxFormProps (cognitive 30): pullRequestViewInfo.prepareMergeBoxFormProps has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/pull_merge_form.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d513ac59edea4557c9ab6b46878dd220ff967be87b7d90d22bcc57e2ba1b4c1"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.InsertRun (cognitive 30): actions.InsertRun has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, boolean chains 4, loops 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/run.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"22869e232d4565c066eb8d8a77bed86e6f858e60773c8f918de02b7f59ca326a"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.innerToRepo (cognitive 30): convert.innerToRepo has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, boolean chains 3 (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":"services/convert/repository.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"951a4284cbaf4c29ffc05fc557ca09a788919a03be8bfd456f72bd877fb3ba46"}},{"ruleId":"D2","level":"warning","message":{"text":"mailer.composeAndSendActionsWorkflowRunStatusEmail (cognitive 30): mailer.composeAndSendActionsWorkflowRunStatusEmail has cognitive complexity 30 (threshold 15). Drivers by points: loops 15, if/else 12, match/switch 3 (nesting depth added 14). 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, 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":"services/mailer/mail_workflow_run.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"060da394eb981539a6c4924a09bb76d0385799ce021cbd68b9b54815d324f849"}},{"ruleId":"D2","level":"warning","message":{"text":"GitlabDownloader.GetComments (cognitive 30): GitlabDownloader.GetComments has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18, loops 9, match/switch 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/gitlab.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3bd878179ace4459c27a6c5f52c69e8e3a8f78c3c3c2d4b9f37d6790c9e333c"}},{"ruleId":"D2","level":"warning","message":{"text":"org.RemoveOrgUser (cognitive 30): org.RemoveOrgUser has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28, loops 2 (nesting depth added 10). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 50). 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":"services/org/user.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e19c7f30efab446fe9a25bface5c83d563fa3889038d44bc5b4a5892079ce7b"}},{"ruleId":"D2","level":"warning","message":{"text":"files.modifyFile (cognitive 30): files.modifyFile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 2, boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/files/update.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e120599cf51d238f481cc2985c4481197abc6c1786aaa09dbf3f7039e9579d3"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_12.ExpandWebhooks (cognitive 29): v1_12.ExpandWebhooks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, loops 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_12/v130.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"814b8953e675a1f6a5e0db94499755dfaa59a372ff444d1b8038d91a60687dea"}},{"ruleId":"D2","level":"warning","message":{"text":"Issue.createCrossReferences (cognitive 29): Issue.createCrossReferences has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, 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":"models/issues/issue_xref.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a10cfa9e7e3cb94c6ebb825000ed57c1d243b8b1a48a6576c71850eef94a8d"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.matchWorkflowRunEvent (cognitive 29): actions.matchWorkflowRunEvent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, loops 4, 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":"modules/actions/workflows.go"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"29acb12b19674ebede53f7cd609b4342a9c516333a24819d62349fa3506472bb"}},{"ruleId":"D2","level":"warning","message":{"text":"git.CommitFromReader (cognitive 29): git.CommitFromReader has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 4, 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":"modules/git/commit_reader.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fa31791821de2dd15efa07edb1b7e1c188a70aead2d58a01da2fb8f405f737"}},{"ruleId":"D2","level":"warning","message":{"text":"npm.parseUploadPackage (cognitive 29): npm.parseUploadPackage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, loops 5, boolean chains 2, match/switch 2 (nesting depth added 13). Of this number, 27 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/npm/creator.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd952fef886e53713595b3c9a69ef848ab94ecb1b7861947caefc55383092c50"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.EditUserPost (cognitive 29): admin.EditUserPost has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, match/switch 8 (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":"routers/web/admin/users.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbc60f2bda8fb9a40ca187ec03a9c94b733124637fabac44a37efa18c97a6a9c"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.signInOpenIDVerify (cognitive 29): auth.signInOpenIDVerify has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, 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":"routers/web/auth/openid.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"834eb496d19a8a95ee39f8917fe3e0a48ec0369d33c153538d34f4c512d43ce1"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.getForkRepository (cognitive 29): repo.getForkRepository has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, loops 5, 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":"routers/web/repo/fork.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"3515d841761076f3c8b8dfc97244f04701ec7477bc88d3e9057497dfc7331012"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CompareAndPullRequestPost (cognitive 29): repo.CompareAndPullRequestPost has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, match/switch 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/pull.go"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b33ac001842ecbf3b5492eaf88a5b788163f98c7bd20c7d5a1377201eadc621"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.SearchRepo (cognitive 29): repo.SearchRepo has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 3, loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/repo.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d547071a306d406fa53608062a9606df82178f62fd242e39f6c40f7344b3eb2"}},{"ruleId":"D2","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxInfoItems (cognitive 29): pullRequestViewInfo.prepareMergeBoxInfoItems has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, 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":"routers/web/repo/pull_merge_box.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c5608348cd9e37a6d8741661162c4b18abe4cf7a8e46d430fe372b98f9ca47a"}},{"ruleId":"D2","level":"warning","message":{"text":"GithubDownloaderV3.getComments (cognitive 29): GithubDownloaderV3.getComments has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17, loops 12 (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":"services/migrations/github.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"b674d27c836a65386ef112c1b16285e74bb916788b88a99d42c1b23548414046"}},{"ruleId":"D2","level":"warning","message":{"text":"GitlabDownloader.GetPullRequests (cognitive 29): GitlabDownloader.GetPullRequests has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 5, 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":"services/migrations/gitlab.go"},"region":{"startLine":602}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ca281f78055927167f3ca8a710586c3894f2af54d80024fae24feef072dd53"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.checkPullRequestMergeableByMergeTree (cognitive 29): pull.checkPullRequestMergeableByMergeTree has cognitive complexity 29 (threshold 15). Drivers by points: if/else 28, 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":"services/pull/merge_tree.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1847502fb1eeccb502046608eeae69b2e7a6841ff2338eee361b8b3d0ba45e"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.AddLineToGraph (cognitive 29): Parser.AddLineToGraph 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":"services/repository/gitgraph/parser.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"f09fb8faf3d87b11fda01c04e6d419210997054d05645b2dad6451baa0561353"}},{"ruleId":"D2","level":"warning","message":{"text":"git.FindRecentlyPushedNewBranches (cognitive 28): git.FindRecentlyPushedNewBranches has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, 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":"models/git/branch.go"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"3277ff0590e71fc84c191145fdf24e783a225eec54402b1733323e0ff2f254a2"}},{"ruleId":"D2","level":"warning","message":{"text":"conan.SearchRecipes (cognitive 28): conan.SearchRecipes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 5, 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":"models/packages/conan/search.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d2517eef6c47b8f37ba6ad8d7bf11b904b68bda0bee0cb38e4dd5e565a23bba"}},{"ruleId":"D2","level":"warning","message":{"text":"escapeStreamer.writeDetectResults (cognitive 28): escapeStreamer.writeDetectResults has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, match/switch 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/charset/escape_stream.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"3398e0170add869d57729660441401956a783787b4fe31eae5a6443488326160"}},{"ruleId":"D2","level":"warning","message":{"text":"arch.ParsePackage (cognitive 28): arch.ParsePackage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, 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":"modules/packages/arch/metadata.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03330e258641c48dd12ae41ef5711316560c8ae1b6ec91b29290ecffeb49bbc"}},{"ruleId":"D2","level":"warning","message":{"text":"container.createPackageAndVersion (cognitive 28): container.createPackageAndVersion has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, 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":"routers/api/packages/container/manifest.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"c381c52da55eda3fc2231b4ece98ede3ce87f8d949116f7b1ae76ab2c631b565"}},{"ruleId":"D2","level":"warning","message":{"text":"cran.enumeratePackages (cognitive 28): cran.enumeratePackages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, loops 3, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/cran/cran.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c260a4634efea3c0b13cf1e67307838026a4f00e96c3732929d914b4f45853"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.SearchIssues (cognitive 28): repo.SearchIssues has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, 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":"routers/api/v1/repo/issue.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b7ef23ff41fcae605ed9ba934d48ef9b7d31adfea4fa11740609c70b7dc3f0c"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreateBranch (cognitive 28): repo.CreateBranch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, 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":"routers/web/repo/branch.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2b0a6ceadf43432bf5f2c3ee0f85711850d25d0eb2ed375e8bfc5d1bce51a7b"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.Diff (cognitive 28): repo.Diff has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/commit.go"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5b6a389582dc7ad38eb99b6708b81cb2676b0f2df02cc724ca08e49f1f9efc"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ValidateRepoMetasForNewIssue (cognitive 28): repo.ValidateRepoMetasForNewIssue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 7, boolean chains 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":"routers/web/repo/issue_new.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"11daecd42d815a18f87b4996ac58f60e335bd3ad63cc18c152918e2d09cfb537"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkDaemonExport (cognitive 28): doctor.checkDaemonExport has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 3 (nesting depth added 10). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 79). 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":"services/doctor/misc.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3cf17268b2ac0b2fb1c81814664f2d73d0d6755a8e1b9a31fd46c03e07782de"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaLocalUploader.newPullRequest (cognitive 28): GiteaLocalUploader.newPullRequest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, 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":"services/migrations/gitea_uploader.go"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"664ab5b8000c8f85f0a3a06ad023a6710c3bdf8435316de2ab21a8d145b05704"}},{"ruleId":"D2","level":"warning","message":{"text":"mirror.Update (cognitive 28): mirror.Update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 2, match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 42, 92, 106). 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":"services/mirror/mirror.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d1ef8119ed741e7777ce2ddc75c07ff41f69d23029abcec049187ce643ae8a"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.pushUpdateAddTags (cognitive 28): repository.pushUpdateAddTags has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, 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":"services/repository/push.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bc8466a99256fe312bb627174b50250723c223361b190d73604fb76c0d7e8c0"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runConfigEditIni (cognitive 27): cmd.runConfigEditIni has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/config.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"783f1f521b68e6539990c8881b58b0648d69f4cae59642ef6ea16582ce33cc87"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_12.RefixMergeBase (cognitive 27): v1_12.RefixMergeBase has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, loops 3, match/switch 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":"modelmigration/v1_12/v134.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"3802f0eb94af1cff29e101d990f4c62fd8aa46da3fe62fe477bd8d2c652a4d55"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_12.AddCommitDivergenceToPulls (cognitive 27): v1_12.AddCommitDivergenceToPulls has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 3, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_12/v136.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"941606f3b13c3a40402216e68a225a4d6ccc5d783904ced3231696139fa9cd62"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.StopTask (cognitive 27): actions.StopTask has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, 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":"models/actions/task.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f3e57729bf83106defb6736fe1e65385a5d56b91c405363978361c460c2791"}},{"ruleId":"D2","level":"warning","message":{"text":"access.GetIndividualUserRepoPermission (cognitive 27): access.GetIndividualUserRepoPermission has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, loops 6, boolean chains 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/perm/access/repo_permission.go"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf329e818dde9edcfb486d78aa476ecd5627aff2a3d3eb32e776f59fdcf7377b"}},{"ruleId":"D2","level":"warning","message":{"text":"jobparser.Parse (cognitive 27): jobparser.Parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/actions/jobparser/jobparser.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"a113056dea203a8848894cf7f1d90017bf469834470d5281bbdf31fc14526b56"}},{"ruleId":"D2","level":"warning","message":{"text":"graceful.getProvidedFDs (cognitive 27): graceful.getProvidedFDs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, loops 2, boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 0 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 51). 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":"modules/graceful/net_unix.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8a53e3c6f8eaa18b167249956e1552eb5327fa3054ab9b90a2384cd26520497"}},{"ruleId":"D2","level":"warning","message":{"text":"nuget.ParseDebugHeaderID (cognitive 27): nuget.ParseDebugHeaderID has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, loops 2 (nesting depth added 10). Of this number, 22 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":"modules/packages/nuget/symbol_extractor.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d96d281375c5fb01226b2e37316c8b57f916208dd7e86ef9d89b24f9f989267"}},{"ruleId":"D2","level":"warning","message":{"text":"MarshalEncoder.marshalIntInternal (cognitive 27): MarshalEncoder.marshalIntInternal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, boolean chains 10, 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":"modules/packages/rubygems/marshal.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1f57ef0ece5110bd80a9f2c73ed3c3b8ffd589dc20fee9c7029bc05612c619"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.EnvironmentToConfig (cognitive 27): setting.EnvironmentToConfig has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, 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":"modules/setting/config_env.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0f00cff409f8a5ca6853c71eedacb77fd8c1af489af42160ac33bdadd9433a"}},{"ruleId":"D2","level":"warning","message":{"text":"devtest.MockActionsRunsJobs (cognitive 27): devtest.MockActionsRunsJobs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, boolean chains 5, loops 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":"routers/web/devtest/mock_actions.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e439cd4ff202f75299fae2f148c4b7fe408322092714f9913912108de2d549"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.prepareFileView (cognitive 27): repo.prepareFileView has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, 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":"routers/web/repo/view_file.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"f93964d30db971eca0e8bc663c61be5317c564515a4694708f920318583a14f1"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.expandReusableWorkflowCaller (cognitive 27): actions.expandReusableWorkflowCaller has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/reusable_workflow.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d3d60f1fcfc862aa8b666cbd398155c03e5f46bfe9628f75557c51f44312a9"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.checkKeyEmails (cognitive 27): asymkey.checkKeyEmails has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15, boolean chains 6, 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":"services/asymkey/commit.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"d46f9ffc143b0370b9aa08c59f1ba0a21abd44aa4dd9da6a2bee5d1aff7f7b28"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.SignWikiCommit (cognitive 27): asymkey.SignWikiCommit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, match/switch 2, boolean chains 1, jumps 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/asymkey/sign.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dced53071a4404e7b8a49bfdd710c272f427885b7b49828a7c46aa79f2e2d77"}},{"ruleId":"D2","level":"warning","message":{"text":"automerge.handlePullRequestAutoMerge (cognitive 27): automerge.handlePullRequestAutoMerge has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/automerge/automerge.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fd01bc781c2878f5dc7f7ef9c66d95907f43e33107c108c2d296f562f20bccf"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.toIssue (cognitive 27): convert.toIssue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, loops 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/convert/issue.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0760007e55f65179aa1fa0b76ce6461df258a788faf8f785c2c7e92b86038c8"}},{"ruleId":"D2","level":"warning","message":{"text":"highlightCodeDiff.convertToPlaceholders (cognitive 27): highlightCodeDiff.convertToPlaceholders has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, 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":"services/gitdiff/highlightdiff.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"90344c8e7779df92d117a3990a017345457de08570728ac85807251df229c5dd"}},{"ruleId":"D2","level":"warning","message":{"text":"lfs.UploadHandler (cognitive 27): lfs.UploadHandler has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, boolean chains 2 (nesting depth added 10). 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 323). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/lfs/server.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"b73983d2a3b5692e00900bbaf3378b6cd33a80e67ffefc61ba7aeda894451305"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.AdjustPullsCausedByBranchDeleted (cognitive 27): pull.AdjustPullsCausedByBranchDeleted has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/pull.go"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d482b8f774a7902b91a3d08a74fe816931104d923cf9fa290517329074537eb"}},{"ruleId":"D2","level":"warning","message":{"text":"Parser.releaseUnusedColors (cognitive 27): Parser.releaseUnusedColors has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, 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":"services/repository/gitgraph/parser.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"468856f9490d62dbaf3bc03e795002a4e3857a2719157017a1bfc9a4ca04536f"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.UpdateTaskByState (cognitive 26): actions.UpdateTaskByState has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, loops 2 (nesting depth added 7). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 490). 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":"models/actions/task.go"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e0411120be91eceac7591aebdccb5801819d9a36c93f1b9a4faaf4b8f18e8f"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.CalculateTrustStatus (cognitive 26): asymkey.CalculateTrustStatus has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, boolean chains 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":"models/asymkey/gpg_key_commit_verification.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de589d1c1e2d9e8720f118dc3ae63b85daad531426c3cb5c0071a1bcbe161b5"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.findCodeComments (cognitive 26): issues.findCodeComments has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, 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":"models/issues/comment_code.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e28e1937bbc009491ef93dbdd30a6361d47c29d976019947a2a354141ba9c15"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.ParseCodeOwnersLine (cognitive 26): issues.ParseCodeOwnersLine has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/issues/pull.go"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"0939690caf6f04631bbe139d5d8f9aea7feedbf93138c65e8a4742a7a794613e"}},{"ruleId":"D2","level":"warning","message":{"text":"db.ToDBOptions (cognitive 26): db.ToDBOptions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, loops 5, boolean chains 2, match/switch 1 (nesting depth added 10). Of this number, 24 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/indexer/issues/db/options.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f7909d857f03fce291746550fa6b56463032bbcdb5844342d253bb3e4e44d0"}},{"ruleId":"D2","level":"warning","message":{"text":"EventWriterBaseImpl.Run (cognitive 26): EventWriterBaseImpl.Run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, match/switch 7, boolean chains 1, loops 1 (nesting depth added 14). 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":"modules/log/event_writer_base.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"068944582e04114a217ea289bb965455f5e7107fadb799c25d2aaff7aba58174"}},{"ruleId":"D2","level":"warning","message":{"text":"jupyter.renderCellCodeOutput (cognitive 26): jupyter.renderCellCodeOutput has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, loops 5, match/switch 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":"modules/markup/jupyter/jupyter.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6421b43c236a4bcec8ff298d28d473cb47331e76fa6e7470c41c3f8fdac750"}},{"ruleId":"D2","level":"warning","message":{"text":"alpine.ParsePackageInfo (cognitive 26): alpine.ParsePackageInfo has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, 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":"modules/packages/alpine/metadata.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b5fbcacce1535a53cc655c2f80ef1a3c42449b9a914b42e92849c49060b27c8"}},{"ruleId":"D2","level":"warning","message":{"text":"nuget.ParseNuspecMetaData (cognitive 26): nuget.ParseNuspecMetaData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, loops 6, 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":"modules/packages/nuget/metadata.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"628b605496d2753e3c2f795d664e196103ea92bdf17f1e7e50e859a68c2f9322"}},{"ruleId":"D2","level":"warning","message":{"text":"rpm.getEntries (cognitive 26): rpm.getEntries has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, 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":"modules/packages/rpm/metadata.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fb04b2ebc0fa014b502e6d561b36b9fbe5328fe788b1d5b17388ff06c4031e6"}},{"ruleId":"D2","level":"warning","message":{"text":"typesniffer.DetectContentType (cognitive 26): typesniffer.DetectContentType has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, boolean chains 8 (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":"modules/typesniffer/typesniffer.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c19103f2aef82a619728f08fd258062f4bb6b329f6d4d6a94e448da413eeba"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.listOrderedChunksForArtifact (cognitive 26): actions.listOrderedChunksForArtifact has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 2 (nesting depth added 7). Of this number, 19 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":"routers/api/actions/artifacts_chunks.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b482b2179c996b436413035b0cb6cabbda97e85fda4841523678a7bf4e18759"}},{"ruleId":"D2","level":"warning","message":{"text":"npm.UploadPackage (cognitive 26): npm.UploadPackage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, 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":"routers/api/packages/npm/npm.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"378b7f02c3c196d94ac4ae9dab068d64c5820cf36b8985ee1a1319ac4fa37e56"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreateBranch (cognitive 26): repo.CreateBranch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, 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":"routers/api/v1/repo/branch.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeb4f645c30d3f5373f6378aee41cf107752e772b3cbcf37591a23a201e7a89b"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ListBranches (cognitive 26): repo.ListBranches has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, loops 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":"routers/api/v1/repo/branch.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eafec1809c435f6b2f07964fc40df7de3a6b12ef8b2a7584daf2a0feddf9eb5"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.workflowDispatchConfig (cognitive 26): actions.workflowDispatchConfig has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, loops 2, boolean chains 1, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/actions/actions.go"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7c1f7376a62bd7c150ba24cd9cb0f50a23f082a1383f82f7afcf09d74241ccd"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.handleSettingsPostMirror (cognitive 26): setting.handleSettingsPostMirror has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b64002c2a42d1058eb73dadab78fc5641c55c20d7a368a6e28f018975e6bac"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.GenerateGiteaContext (cognitive 26): actions.GenerateGiteaContext has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, 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":"services/actions/context.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"2db7e4695ca06d18c7a838cecc946aa65864aa862e8299051875e105d51396b7"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.FindTaskNeeds (cognitive 26): actions.FindTaskNeeds has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/context.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc78769c8e71c6f6d57ec7ad7f949eeac181d86a3754aa2c71dcb26ed488d141"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.insertCallerChildren (cognitive 26): actions.insertCallerChildren has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, 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":"services/actions/reusable_workflow.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"69fda587359aed5c49b880e1ec9a874c9b9fc88d35cbc382acbac2c20133bdb2"}},{"ruleId":"D2","level":"warning","message":{"text":"feed.notifyWatchers (cognitive 26): feed.notifyWatchers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, boolean chains 2, match/switch 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/feed/feed.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0d075a03b679eb4412d1673da075f50cafa39eae410e09598865cf0f551626b"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.GetDiffForRender (cognitive 26): gitdiff.GetDiffForRender has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":1387}}}],"partialFingerprints":{"codehealthFindingId/v1":"82fc21f3d6a0bc43806c5fac4e26f66bcc7cf70fd2ea356ff83cf930cb3ed663"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaDownloader.GetPullRequests (cognitive 26): GiteaDownloader.GetPullRequests has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 5, 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":"services/migrations/gitea_downloader.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"f086a99164fcead12eec4778dfa2e3d9c5985c9b726ea6b20dbb43910f740647"}},{"ruleId":"D2","level":"warning","message":{"text":"GithubDownloaderV3.GetIssues (cognitive 26): GithubDownloaderV3.GetIssues has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14, loops 12 (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":"services/migrations/github.go"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"603a691ba935643b638edb6aa90c40512b0a092f3b010b240c3d4edbdc87dc9f"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.SubmitReview (cognitive 26): pull.SubmitReview has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 6, 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":"services/pull/review.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f171b06f8834579f49c423898fc74ff506f18d4a24a2708cb5ab0b5e8e1b41"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.CreateRepositoryDirectly (cognitive 26): repository.CreateRepositoryDirectly has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, boolean chains 1 (nesting depth added 5). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/create.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef291d961f82298faac5176491d8e9303d5955239a30c3005009da118d6fa2e"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplyDiffPatchOptions.Validate (cognitive 26): ApplyDiffPatchOptions.Validate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, 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":"services/repository/files/patch.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e228380005c7b37e1ff5b61df04c6064e62b1ac92f6d17ff7959a2b15f99d4f"}},{"ruleId":"D2","level":"warning","message":{"text":"gitgraph.GetCommitGraph (cognitive 26): gitgraph.GetCommitGraph has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 6 of the 26 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":"services/repository/gitgraph/graph.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f1941daa76f19ccc0ac852319031ca0a19f6d0a7a294baa4358afdf3758375"}},{"ruleId":"D2","level":"warning","message":{"text":"openapi3gen.fixFileSchemas (cognitive 25): openapi3gen.fixFileSchemas has cognitive complexity 25 (threshold 15). Drivers by points: loops 14, if/else 10, boolean chains 1 (nesting depth added 16). 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":"build/openapi3gen/convert.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"1144a10aff995f584b03a100b1f1f869d3fc152d7715e0694f7b1edce8be1e70"}},{"ruleId":"D2","level":"warning","message":{"text":"openapi3gen.extractEnumTypeName (cognitive 25): openapi3gen.extractEnumTypeName has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, boolean chains 4, 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":"build/openapi3gen/convert.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6a536a878db79d70e6d6633bd355ab4010861ef1a05d112346c852c734ee0a"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_15.AddPrimaryEmail2EmailAddress (cognitive 25): v1_15.AddPrimaryEmail2EmailAddress has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_15/v181.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ed80700f8cc63cee116d73f146de2f60f18d81fe6987b79c2e831ac2ee654f"}},{"ruleId":"D2","level":"warning","message":{"text":"access.finalProcessRepoUnitPermission (cognitive 25): access.finalProcessRepoUnitPermission has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, loops 9, boolean chains 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":"models/perm/access/repo_permission.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"922cb3fecaf92412f8146a9154c00bcaa5e08380c35768a8c07934ff7415c483"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdateLanguageStats (cognitive 25): repo.UpdateLanguageStats has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 5 (nesting depth added 12). Most of this is not in the body itself: 0 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 144). 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":"models/repo/language_stats.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ac5c71a0f718fd121be5469699dd2d9c53d134bf8e12762de05922759361b3b"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.SaveTopics (cognitive 25): repo.SaveTopics has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, loops 8 (nesting depth added 11). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 277). 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":"models/repo/topic.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b968d5361da22aa7aab0781c27e91a1e39b3a2ee57a1ba8bd90187c0b10603"}},{"ruleId":"D2","level":"warning","message":{"text":"unittest.NewMockWebServer (cognitive 25): unittest.NewMockWebServer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, loops 11, boolean chains 1 (nesting depth added 11). 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 62). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/unittest/mock_http.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37ee1f7ca02166412f0006adda3e67f3bf163dc040df867ad46c6ec682ec917"}},{"ruleId":"D2","level":"warning","message":{"text":"assetfs.GenerateEmbedBindata (cognitive 25): assetfs.GenerateEmbedBindata has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, loops 1 (nesting depth added 12). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 315). 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":"modules/assetfs/embed.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d89b735df9adaeb0d0e4bc6ee1664ef0be99edae4c3d3591d369e8ceaf89e9"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerPoolQueue.doRun (cognitive 25): WorkerPoolQueue.doRun has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, match/switch 4, loops 3 (nesting depth added 11). Of this number, 17 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":"modules/queue/workergroup.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f50fd7d4f45fbb49acd711597fce1d3da2cc4a33ddd9a8a911d516cbc2bea3b"}},{"ruleId":"D2","level":"warning","message":{"text":"translation.InitLocales (cognitive 25): translation.InitLocales has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 4, boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 68). 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":"modules/translation/translation.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3b03c30769298f9df642c59760c3c1a45d9ff62352f539ca51fea8834ccfa5"}},{"ruleId":"D2","level":"warning","message":{"text":"conda.EnumeratePackages (cognitive 25): conda.EnumeratePackages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, 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":"routers/api/packages/conda/conda.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca278c4a27d26e10a9ab6685d1b67529cab10d83c5b535dbfb13911d0089249f"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.Generate (cognitive 25): repo.Generate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, 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":"routers/api/v1/repo/repo.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d1e98c6e4c5c7127acd96e3d8c3564673068037a09196c7df679dd7deb63586"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.editHook (cognitive 25): utils.editHook has cognitive complexity 25 (threshold 15). Drivers by points: if/else 25 (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":"routers/api/v1/utils/hook.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67fa9e60205e6f82ea302d70b9656b6d1c49cfd0b8492fb69b129aa9c68d446"}},{"ruleId":"D2","level":"warning","message":{"text":"common.GetHeadOwnerAndRepo (cognitive 25): common.GetHeadOwnerAndRepo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, 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":"routers/common/compare.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d04fcc52c33d251ea9954134c2b1e0e38c20cc49e316b46877a05cfe6abe5dc"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.ResetPasswdPost (cognitive 25): auth.ResetPasswdPost has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, 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":"routers/web/auth/password.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"026f9af203702c6b5b965699d6460ecc079b6e86ae067ef64fb7f624a98eacf3"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.viewSummaryBranchFromRun (cognitive 25): actions.viewSummaryBranchFromRun has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, 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":"routers/web/repo/actions/view.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d95283b8803517b3c55d93aeff3326957f48d86f04b004a52d8a0732c1cbde"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.getReleaseInfos (cognitive 25): repo.getReleaseInfos has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, 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":"routers/web/repo/release.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c81f14f012a19df3b3381f24773f8a4b845a17299207a3adc269f35ba5474a3"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.insertRunJob (cognitive 25): actions.insertRunJob has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, 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":"services/actions/run.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d3a1d3b29b4bcbbcb290a74faab04eec0d586689c3f62a55e0e1e969660378"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.parseCommitWithSSHSignature (cognitive 25): asymkey.parseCommitWithSSHSignature has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, 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":"services/asymkey/commit.go"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5f819a7627894dbaa8f7d5b16d5671173faae51687da7adbd301444ecd4503"}},{"ruleId":"D2","level":"warning","message":{"text":"context.PrepareCommitFormOptions (cognitive 25): context.PrepareCommitFormOptions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, 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, 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":"services/context/repo.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d3ef1cd4800d5d4644dae8f1e31cba9b5d1b11e191ce7a27006f17342efd76"}},{"ruleId":"D2","level":"warning","message":{"text":"GithubDownloaderV3.GetReviews (cognitive 25): GithubDownloaderV3.GetReviews has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, 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":"services/migrations/github.go"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf9328d42d4c5d5d07072565521b4e8677d8a37eba15d4b0cfae6b17ab23f0ff"}},{"ruleId":"D2","level":"warning","message":{"text":"GitlabDownloader.GetMilestones (cognitive 25): GitlabDownloader.GetMilestones has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, 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":"services/migrations/gitlab.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"7026080b21eb477b3b1566ea167db7956678da7dbc239c6987df3753a49a7f4e"}},{"ruleId":"D2","level":"warning","message":{"text":"packages.addFileToPackageVersionUnchecked (cognitive 25): packages.addFileToPackageVersionUnchecked 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":"services/packages/packages.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7694019aa0e93ae2438715f1de83845b0a74a71009db7bdeb54b499cb7cb0e2"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.createTemporaryRepoForPR (cognitive 25): pull.createTemporaryRepoForPR has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, boolean chains 1 (nesting depth added 1). Of this number, 21 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/temp_repo.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e3f10efc932526348d26163912a81382e69913bf1670dfebcdee2a540b9507"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.ListUnadoptedRepositories (cognitive 25): repository.ListUnadoptedRepositories has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 327). 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":"services/repository/adopt.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"e85512e641df755b6bd88dc632029c50ab8105b492a0bc1cc3abfb0a817edba0"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runDoctorCheck (cognitive 24): cmd.runDoctorCheck has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 6, 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/doctor.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc040977a42eca7120f81617c5d1b5da9bd22efd6b53b984c5d8f9674a158bfe"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_26.migrateCommitStatusTargetURLForGroup (cognitive 24): v1_26.migrateCommitStatusTargetURLForGroup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, 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":"modelmigration/v1_26/v326.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d382b6801aa2edcd1dc4bc62bc60f3963f9a463b022a453040180a825c2b233"}},{"ruleId":"D2","level":"warning","message":{"text":"unittest.SyncDirs (cognitive 24): unittest.SyncDirs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, 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":"models/unittest/fscopy.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0fa9b6ad3930b606f7cf1a669befe62cf9f384a1eef229730e61848d89522e6"}},{"ruleId":"D2","level":"warning","message":{"text":"charset.DetectEncoding (cognitive 24): charset.DetectEncoding has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, boolean chains 5, 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":"modules/charset/charset.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06df1a384ea9adcdf9e47d68ff31754a2137ec0f5c9f4337989d0b3b7dd4788"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.ToSearchOptions (cognitive 24): issues.ToSearchOptions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 3, loops 2, match/switch 1 (nesting depth added 4). Of this number, 22 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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":"modules/indexer/issues/dboptions.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bfbb3fc91c1e181069d0d5156d528249143613f1405db077c453fa377170fe5"}},{"ruleId":"D2","level":"warning","message":{"text":"nosql.ToRedisURI (cognitive 24): nosql.ToRedisURI has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, 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":"modules/nosql/redis.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f04d5bc056647385fa52d81ac47bc88c2f4f5172bcfc9824a78d51f08670cf"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.createMarkupSanitizerRule (cognitive 24): setting.createMarkupSanitizerRule has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 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":"modules/setting/markup.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"af8eb69736c1946ce01a883da2d8cd79468617fb71064554442016631e0b21a6"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.getStorageTargetSection (cognitive 24): setting.getStorageTargetSection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 2, match/switch 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/setting/storage.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"585bbc7ab0b10aafa8eec92fa5d1db292aa6c36bbd89dbbe9234520900a8257c"}},{"ruleId":"D2","level":"warning","message":{"text":"container.PostBlobsUploads (cognitive 24): container.PostBlobsUploads has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, 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":"routers/api/packages/container/container.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0925c5af8f606298bece5e2e4fbd9c90c63871302878d447a2612d0080eb954"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.EditTagProtection (cognitive 24): repo.EditTagProtection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, 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":"routers/api/v1/repo/tag.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1cd054fbe00c5b86d2c50912709610f02996b09bd4a031a53c3fac79da24d2a"}},{"ruleId":"D2","level":"warning","message":{"text":"private.hookPostReceiveRespondWithTrailer (cognitive 24): private.hookPostReceiveRespondWithTrailer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 5, 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":"routers/private/hook_post_receive.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"2466cb3c0fd6d2e76fa09cbe32e6ae36c4a2f8a5d6ab945f442459cd3d052ce2"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdateIssueStatus (cognitive 24): repo.UpdateIssueStatus has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 4, 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":"routers/web/repo/issue_list.go"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8785bad95b2b91827d443d59531a0bb299754b812d1e6355742b238b4fdd40f"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.setTemplateIfExists (cognitive 24): repo.setTemplateIfExists has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, 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":"routers/web/repo/issue_new.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"d065733518adf1fa0f2325e3e1787e61d787539885959b7d96abb28cd7a19088"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.roleDescriptor (cognitive 24): repo.roleDescriptor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_view.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7034e5540cb4d07a7cc48add33e387ad5abfb87a792edb0a45179245875e826"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.MoveIssues (cognitive 24): repo.MoveIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/projects.go"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"2abfa15f06db0a07aa7b1a19c201d96b22d518cf06d921b652bc73c0b29707b3"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.LFSFileGet (cognitive 24): setting.LFSFileGet has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 4, boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/setting/lfs.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5cb25de96054050da08531c2be821a795e1dcf0a860bba7ce293b4a9e5f12e2"}},{"ruleId":"D2","level":"warning","message":{"text":"source.resolveMappedMemberships (cognitive 24): source.resolveMappedMemberships has cognitive complexity 24 (threshold 15). Drivers by points: loops 16, if/else 8 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/auth/source/source_group_sync.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"84a22bfc655dc3e8c8e3642141c8659ba17d52ca58ed441ba462f40dc6f56d61"}},{"ruleId":"D2","level":"warning","message":{"text":"highlightCodeDiff.diffLineWithHighlight (cognitive 24): highlightCodeDiff.diffLineWithHighlight has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 3, match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/gitdiff/highlightdiff.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"506b76afa3f4fb2f725a119dbd1983a8425db1bbc91adb8975efa580c365a1d4"}},{"ruleId":"D2","level":"warning","message":{"text":"RepositoryDumper.CreateRepo (cognitive 24): RepositoryDumper.CreateRepo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (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":"services/migrations/dump.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4f5297fa99f6608b913366f13c9caa7c0e15ddb61ca0eae499663984db0fd4"}},{"ruleId":"D2","level":"warning","message":{"text":"oauth2_provider.NewAccessTokenResponse (cognitive 24): oauth2_provider.NewAccessTokenResponse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (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":"services/oauth2_provider/access_token.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d769e0476612290af5b4871b9d20d1cf1ecd044c22c76d9226ccd91348eea5a"}},{"ruleId":"D2","level":"warning","message":{"text":"org.UpdateTeam (cognitive 24): org.UpdateTeam has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/org/team.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"db7fb7b07e636467e0f4cbd34b66a4a44b0bff90ffceca4ad4c5e54a3717f95e"}},{"ruleId":"D2","level":"warning","message":{"text":"container.executeCleanupOneRulePackage (cognitive 24): container.executeCleanupOneRulePackage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, 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":"services/packages/cleanup/cleanup.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1f6936c9889ad9c3461e2648c6f1c4dc20ddd74c6151edd5a0d0240494e7a7"}},{"ruleId":"D2","level":"warning","message":{"text":"debian.buildReleaseFiles (cognitive 24): debian.buildReleaseFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, 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":"services/packages/debian/repository.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b20aa9a0899a5a1db82cfc2e04e1953353887aaf980888df7bf0829c6a0577"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.doMergeAndPush (cognitive 24): pull.doMergeAndPush has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, 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":"services/pull/merge.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee393a7f7c401fcae085da3d6aa6bbb44657f3e8f4c8d11a9643844e6c4a8273"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.RenameBranch (cognitive 24): repository.RenameBranch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 3 (nesting depth added 4). Of this number, 16 points are the body\u0027s own statements and 8 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":"services/repository/branch.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"501fa4442bb79758f3b8e6696d7a786d3e17fc134ed203f45336ce51b551b49f"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.generateContributorStats (cognitive 24): repository.generateContributorStats has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, 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":"services/repository/contributors_graph.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ddb7a0fa7d219ac1c894e762f77c87e66b3ff6c6e7da68f2df93bd0dc804fd5"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.ForkRepository (cognitive 24): repository.ForkRepository has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, boolean chains 1. Of this number, 21 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/fork.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8d2c28f679880bc2aed7ae130ef7c339f5bc285bee2ed9c2eeafcb0fca4d8e"}},{"ruleId":"D2","level":"warning","message":{"text":"wiki.DeleteWikiPage (cognitive 24): wiki.DeleteWikiPage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, 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":"services/wiki/wiki.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"df044636c33f55eba288e596b2251fbdc07204acf8a76f3175251b4c6e1d8fa2"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_14.RecalculateUserEmptyPWD (cognitive 23): v1_14.RecalculateUserEmptyPWD has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 3, boolean chains 2, match/switch 1 (nesting depth added 10). Of this number, 18 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_14/v166.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"de8191c4e634de3a9fd5c21db1e014aff2b8f1f96347ce7f549c36c886cebd13"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_21.migratePullMirrors (cognitive 23): v1_21.migratePullMirrors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, 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":"modelmigration/v1_21/v276.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"915ea36d70ca0430315879fe77c215850bb7586a4df6383893cabf2521fe02c3"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_21.migratePushMirrors (cognitive 23): v1_21.migratePushMirrors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, 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":"modelmigration/v1_21/v276.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c29e12a4dc93b0693572ff5deff880dbe1232bf5ecfc8b430658a3d5e89618d"}},{"ruleId":"D2","level":"warning","message":{"text":"activities.ActivityQueryCondition (cognitive 23): activities.ActivityQueryCondition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, 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":"models/activities/action.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"895e0421eca5cfa179e1274a5abf3ca1aed4a8981d3f6480b485d8c6dc985ff7"}},{"ruleId":"D2","level":"warning","message":{"text":"Task.MigrateConfig (cognitive 23): Task.MigrateConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (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":"models/admin/task.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d42678063408d631630950417200abcbe4437f2212cb08f5a118bb8e667c714"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.Init (cognitive 23): auth.Init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, 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":"models/auth/oauth2.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcd902f5a19a9e1dec8fff2159eb31e96421546e4b31cf1e955020d717048b2f"}},{"ruleId":"D2","level":"warning","message":{"text":"packages.GetPackageDescriptorWithCache (cognitive 23): packages.GetPackageDescriptorWithCache has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, boolean chains 1, loops 1, 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":"models/packages/descriptor.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"acabf1413fa75c0122a02f4bf749acf4539afd0cf877ebfd423803e04ff50c7d"}},{"ruleId":"D2","level":"warning","message":{"text":"goproxy.ParsePackage (cognitive 23): goproxy.ParsePackage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, 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":"modules/packages/goproxy/metadata.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd55acdc4009453386dbdc3e90e2996ed4b67f2da739f95c0042544154849a27"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.mergeChunksForArtifact (cognitive 23): actions.mergeChunksForArtifact has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 4 (nesting depth added 5). Of this number, 19 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":"routers/api/actions/artifacts_chunks.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0eb18c09a57d1d5e9b5db6fa40a8d2c45464a390fd1d292bc466e42c20d550e"}},{"ruleId":"D2","level":"warning","message":{"text":"conan.DeletePackageV1 (cognitive 23): conan.DeletePackageV1 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 6, 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":"routers/api/packages/conan/conan.go"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"f55259a6935f22917534cda38da4019293c3eeb60a48e2a45af48cc16bb569e1"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.Transfer (cognitive 23): repo.Transfer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 2, match/switch 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":"routers/api/v1/repo/transfer.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"633c9a2a20d89260df860981d198fdff86b9c8d020633d8de1c1a85fdeb8acd2"}},{"ruleId":"D2","level":"warning","message":{"text":"private.hookPostReceiveUpdateRepoByOptions (cognitive 23): private.hookPostReceiveUpdateRepoByOptions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, 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":"routers/private/hook_post_receive.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"b775367cf58519aeb48afb6f0780e4e33aaada47a0f084de848f2884498747a4"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.LinkAccountPostRegister (cognitive 23): auth.LinkAccountPostRegister has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, 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, 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":"routers/web/auth/linkaccount.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb14ec8525ced4189fde37d10dfb8e5f261cd09510577277c63bdf6dd91bdc0"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.prepareWorkflowDispatchTemplate (cognitive 23): actions.prepareWorkflowDispatchTemplate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"9397cb6ab64ecf75204bd083b360e42ebddb5af79abc7410e1f3c61e0c9051c1"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdateCommentContent (cognitive 23): repo.UpdateCommentContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_comment.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8e02296ed2e6fc101771ffa47147b8d4bf436948b269d205f2b043d25ecfe89"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.NewIssuePost (cognitive 23): repo.NewIssuePost has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, 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":"routers/web/repo/issue_new.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ac8b7e4ad667d01fae366ca84d32c14a3bf9a5dffc85a9b0bb0f3db5828fba5"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.UpdateGeneralSettings (cognitive 23): actions.UpdateGeneralSettings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, 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":"routers/web/shared/actions/general.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"db50c2922d7256b3a0253e8b1f094a916de7d10d3569001b54c986fcb398a862"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.CreateSkippedCommitStatusForFilteredWorkflow (cognitive 23): actions.CreateSkippedCommitStatusForFilteredWorkflow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, boolean chains 3, loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/commit_status.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"0373d8f577d5861fad57b80050ec226d5f1e015b4f2e55d314f533c3d4441085"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.checkJobsByRunID (cognitive 23): actions.checkJobsByRunID has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 6 (nesting depth added 7). 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":"services/actions/job_emitter.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"c080ab6749cc5abc09e7819e64067bf47969fb0308983b5f19fe06017896fd53"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.skipWorkflows (cognitive 23): actions.skipWorkflows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 4, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/notifier_helper.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"e67c48290b6e9eb6b82059bb0f7597b9c605ab69bea1d3a80f04b43dd0039078"}},{"ruleId":"D2","level":"warning","message":{"text":"lfs.DownloadHandler (cognitive 23): lfs.DownloadHandler has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, 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":"services/lfs/server.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6235fc674472dd0bdcb819830eb8ce4470ef4ff91cf65c4386b33be0bc790a9"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaDownloader.GetReviews (cognitive 23): GiteaDownloader.GetReviews has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, loops 6, match/switch 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/gitea_downloader.go"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb63b439298ec2196314c20df08863093b5f3e6263a7a88c89af06cd862ec201"}},{"ruleId":"D2","level":"warning","message":{"text":"mirror.checkAndUpdateEmptyRepository (cognitive 23): mirror.checkAndUpdateEmptyRepository has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, 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":"services/mirror/mirror_pull.go"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"673686a8b10baf5e6ffcefea46826fb6f00dfadd5150ca42a9c654ba464e7c44"}},{"ruleId":"D2","level":"warning","message":{"text":"packages.createPackageAndVersion (cognitive 23): packages.createPackageAndVersion has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, 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":"services/packages/packages.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb5a46579a7efa6bf0c92932e622c2b852fda53a791c6f5e1a8b4b4baa18520"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.unmergedFiles (cognitive 23): pull.unmergedFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 7, loops 2, match/switch 2 (nesting depth added 8). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/patch_unmerged.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e71fc241c48e6846b859cfb475c44d3d94752e2560c77c0c86b6068d782939"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.DismissReview (cognitive 23): pull.DismissReview has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, 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":"services/pull/review.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ac1475551737ee4639b5198d7d8d6b60a93a7a28ea87f4db49b33c4b5ec097f"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.SyncBranchesToDB (cognitive 23): repository.SyncBranchesToDB has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 2, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 307). 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":"services/repository/branch.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"08333c8a16aded7f24ff843b0fbec3250a41ed6bb10471c2553ff729646fc151"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.DeleteBranchAfterMerge (cognitive 23): repository.DeleteBranchAfterMerge has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, 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":"services/repository/branch.go"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e2ffb4741248a255b7d21f6c17f9311e3bb06ec90b042b3d58fccc5213864aa"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.MakeRepoPrivate (cognitive 23): repository.MakeRepoPrivate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 2, boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/repository.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"cede18bc0be21e8ec1cbf436e7ab324f48b3740449185b54689fe0452758ccbe"}},{"ruleId":"D2","level":"warning","message":{"text":"files.VerifyBranchProtection (cognitive 23): files.VerifyBranchProtection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 2, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/files/update.go"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"918470ae98715601ffe89251b94b955f933df70e58c5db5eee0fcb343869bf47"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runHookPostReceive (cognitive 22): cmd.runHookPostReceive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, loops 1 (nesting depth added 7). Of this number, 20 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/hook.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"12ab87838c47f5194fa2efb07489f44e7782594927d254d9cedd0a55138cf437"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_14.UpdateCodeCommentReplies (cognitive 22): v1_14.UpdateCodeCommentReplies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, loops 3, 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":"modelmigration/v1_14/v158.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdfeb15488019bcd9280a6cbbbdf18f469147770150682410d9aaebb82989dad"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.parseGPGKey (cognitive 22): asymkey.parseGPGKey has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, 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":"models/asymkey/gpg_key.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d0b062418d9f05996cd6bd2e4b2a771388a46a0735448471d50d39c2bdaf80"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.CheckPrincipalKeyString (cognitive 22): asymkey.CheckPrincipalKeyString has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, loops 4, match/switch 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/asymkey/ssh_key_principals.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd1c9ecd931fccd47e58e1d1c98db8a15b8f595d7ddc66bc6b3b3e1de2880f1"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.ReplaceIssueLabels (cognitive 22): issues.ReplaceIssueLabels has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, boolean chains 3, loops 2 (nesting depth added 7). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 413). 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":"models/issues/issue_label.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"cee9f2302b32bd6f931882680fef42fd02a7ead15ef9f8e0b377c03398be6b4c"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdateRepoLicenses (cognitive 22): repo.UpdateRepoLicenses has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/repo/license.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"60cc300a4d686e596e9178a9c6cb97d53dc8aa6553849faa2158c933d7a24059"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.matchIssuesEvent (cognitive 22): actions.matchIssuesEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, match/switch 5, loops 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/actions/workflows.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a344431986a0e200ddd64bd7d5fbf3d0d30ac44fdc70677f186bab7954ad02"}},{"ruleId":"D2","level":"warning","message":{"text":"git.configParseSubModules (cognitive 22): git.configParseSubModules has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, boolean chains 2, 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":"modules/git/config_submodule.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"9abfa3ce5b8e0d4bd50f3fb8d558d342acc3767d195e91b264a2d8e3122bb1bd"}},{"ruleId":"D2","level":"warning","message":{"text":"git.logNameStatusRepo (cognitive 22): git.logNameStatusRepo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 7, boolean chains 1 (nesting depth added 11). Of this number, 20 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/log_name_status_nogogit.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"d861d732e5d8607df041fb6d86eb509d98bc38f8943b03fabac6270abf529a1e"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.InitIssueIndexer (cognitive 22): issues.InitIssueIndexer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, match/switch 5, boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 75, 147). 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":"modules/indexer/issues/indexer.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"c51305575170bf75204839da3a19c37c3a586394838e6935fc0e93c3b76c9979"}},{"ruleId":"D2","level":"warning","message":{"text":"nosql.getRedisOptions (cognitive 22): nosql.getRedisOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, match/switch 2, 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":"modules/nosql/manager_redis.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a4ff79b269c8b49d9afc38dbf1f008adb9b44bca7f033fa992fbc611a09159"}},{"ruleId":"D2","level":"warning","message":{"text":"conan.ParseConanfile (cognitive 22): conan.ParseConanfile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, boolean chains 6, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/conan/conanfile_parser.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"5daa0b026d0f980b0027eefb6a29932048b4b99d4ac723a7cbb5f35d91b1a802"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.loadActionsFrom (cognitive 22): setting.loadActionsFrom has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"modules/setting/actions.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed32a02fbdbe5b13630d40121bf39d08915f6739e9635ab4d3e86dd99dd47e70"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.loadServiceFrom (cognitive 22): setting.loadServiceFrom has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 4, 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":"modules/setting/service.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cd0e9262a30381cc3e57d97bee429ac6f4302ea0c8ce36a54804fcac0a4e76d"}},{"ruleId":"D2","level":"warning","message":{"text":"templates.extractErrorLine (cognitive 22): templates.extractErrorLine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, 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":"modules/templates/htmlrenderer.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"b921507831f4695bef6ea8b6135aa6ef6c2210bb3896ced3dfe8bee7ca2f4a72"}},{"ruleId":"D2","level":"warning","message":{"text":"vars.Expand (cognitive 22): vars.Expand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, loops 3, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/templates/vars/vars.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"f78a704bf9e71f563a46d0022c489dbc5816d1410907abc2d55af0e55af4cf8e"}},{"ruleId":"D2","level":"warning","message":{"text":"arch.GetPackageOrRepositoryFile (cognitive 22): arch.GetPackageOrRepositoryFile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, 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":"routers/api/packages/arch/arch.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbc692ea2940b7a30b4a8d338df87feea262a3633383e0a1e4d44aa1e92541a5"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.updateRepoArchivedState (cognitive 22): repo.updateRepoArchivedState has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (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":"routers/api/v1/repo/repo.go"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"633e985c2e11ee08b1432faacc5892808c9738150233cb7409a33ce668dcf290"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.initTestQueueOnce (cognitive 22): admin.initTestQueueOnce has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, match/switch 4, loops 2 (nesting depth added 12). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 24). 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":"routers/web/admin/queue_tester.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"5265a5ad358e91d061a64b23925f414665ac391a6ae584d032a009cea7b0a905"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.DeleteAttachment (cognitive 22): repo.DeleteAttachment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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":"routers/web/repo/attachment.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"62250b8ac5a3d81748e9668a185517d5d90930baeff0c897dba3053cd37bedc5"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.ScopedWorkflowSetRequired (cognitive 22): actions.ScopedWorkflowSetRequired has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 4, 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":"routers/web/shared/actions/scoped_workflows.go"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b69e4e9a7fc3a1fc7681a848227c648c01b2c6261495f944101c5d2621983bb"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.UpdateAvatarSetting (cognitive 22): setting.UpdateAvatarSetting 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":"routers/web/user/setting/profile.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c7aba79b9db892ff03ec42401cad8f5280ff4b72e2576644c9c90a7131669b"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.ToActionWorkflowJob (cognitive 22): convert.ToActionWorkflowJob has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, 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":"services/convert/convert.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"f27b0f56520284befcbf7e6f954fe563f74d4c6aba6db0a7779646b75fd07f58"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.ToNotificationThread (cognitive 22): convert.ToNotificationThread has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 4, loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/convert/notification.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bec8941b94b3ecdf6f58b69a9053ed548ee29feafb63f72f15280a2a7430854"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.isValidReviewRequest (cognitive 22): issue.isValidReviewRequest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, 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":"services/issue/review_request.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"33bec54a2730c81f594f63fef8bcb9db451c5fe39119a7de9389a517f4dfc3b6"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.GetSuggestion (cognitive 22): issue.GetSuggestion has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, 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":"services/issue/suggestion.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c1dc11ebdd443b1dd3af8e75991b584ba3ff4f8d9f5b6ede953a3c468482bb0"}},{"ruleId":"D2","level":"warning","message":{"text":"GithubDownloaderV3.GetPullRequests (cognitive 22): GithubDownloaderV3.GetPullRequests has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, loops 10 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/github.go"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca7485d6d4d22032d62ff519af40bda581d8f31234a6a965dd3c3a07989bdb8"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.createLFSMetaObjectsFromCatFileBatch (cognitive 22): pull.createLFSMetaObjectsFromCatFileBatch 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":"services/pull/lfs.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"600b33c513e911a8dbb4e4967e2f4e11eda2b0a0d9f6867bae3fb2d0e8378b60"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.CreateCodeComment (cognitive 22): pull.CreateCodeComment 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":"services/pull/review.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"67364229c4d7ab95c4f019ef4ba7d9b1e577152f5f0bc3b074f1718000f49d3a"}},{"ruleId":"D2","level":"warning","message":{"text":"task.runMigrateTask (cognitive 22): task.runMigrateTask has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, boolean chains 2, match/switch 2, loops 1 (nesting depth added 3). Of this number, 11 points are the body\u0027s own statements and 11 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":"services/task/migrate.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab062883773bd5e593e3ddd93563605d10e022d239fc20b6a4799ece62afc7c5"}},{"ruleId":"D2","level":"warning","message":{"text":"user.RenameUser (cognitive 22): user.RenameUser has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 4 (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":"services/user/user.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac5b2e0fb9d5278fa8e2220696b6f89deec31bc8b43a530f89da596c43932269"}},{"ruleId":"D2","level":"warning","message":{"text":"webhook.Deliver (cognitive 22): webhook.Deliver has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 2, boolean chains 1. Of this number, 14 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: 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":"services/webhook/deliver.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ea2145d62c598a5ee7b25ed2668bae04738b269dc82960597e83f257349a65"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runRepoSyncReleases (cognitive 21): cmd.runRepoSyncReleases has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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/admin.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"162e626d0afc683270c671b697bd05bd4fafc0fb096a9e9655ffe04869efa808"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.listen (cognitive 21): cmd.listen has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, 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/web.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ef3e92e84d6b9fe15d1d5220bab0c49a0aed046d577f661349bea50fd8c88b"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_9.HashAppToken (cognitive 21): v1_9.HashAppToken has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"modelmigration/v1_9/v85.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"8121b843c1e5ebe6093c9d02ddd41dd09c915ecc4059b8a65a9ee8de8b4b434d"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.CreateTaskForRunner (cognitive 21): actions.CreateTaskForRunner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/actions/task.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"f33e06ff35a65a710d017872cb6fc5e25bda49e1814b2e6a860a129fc7c1ce05"}},{"ruleId":"D2","level":"warning","message":{"text":"ActionList.LoadIssues (cognitive 21): ActionList.LoadIssues 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":"models/activities/action_list.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"d770a05296e37c0b6c6d32f6511108a8f8c9e6053b93c47dcfc6759c38904349"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationList.LoadRepos (cognitive 21): NotificationList.LoadRepos has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 6 (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":"models/activities/notification_list.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"7974b4c93d21e3872931808b1d4ee383a4851353afbaff83d5d6502aa02839a4"}},{"ruleId":"D2","level":"warning","message":{"text":"git.UpdateProtectBranch (cognitive 21): git.UpdateProtectBranch 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":"models/git/protected_branch.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7da747f5ddb7cca6a5bb5ce71ebefef12d3d6ff42bbe129c6025a25c4b8a65"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.canMaintainerWriteToBranch (cognitive 21): issues.canMaintainerWriteToBranch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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":"models/issues/pull_list.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"840589e8e553441de4fb534bc33d0879144d4c2714aa9878d12cf83d77195e52"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.AddReviewRequest (cognitive 21): issues.AddReviewRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 8). 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 700). 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":"models/issues/review.go"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"492cd56e6a16464b8aaff12dab095c2d2b7d2aaa71efa806a6c90cc0b36ab40d"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueList.loadTotalTrackedTimes (cognitive 21): IssueList.loadTotalTrackedTimes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, 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":"models/issues/issue_list.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cceb269b68242d0a021d303a649747e344742897c79c7b77d602d6b84ce1d84"}},{"ruleId":"D2","level":"warning","message":{"text":"PackageSearchOptions.ToConds (cognitive 21): PackageSearchOptions.ToConds has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/packages/package_version.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"35642968b2b9f998b08a3a42270d117d7eae619fef8bf0194673d6aca1dfc16c"}},{"ruleId":"D2","level":"warning","message":{"text":"user.ActivateUserEmail (cognitive 21): user.ActivateUserEmail has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 7). 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 445). 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":"models/user/email_address.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a19f0840cf90fe0c5d18a219ac92433462bf2f3256078400fe3b306c500c5d4"}},{"ruleId":"D2","level":"warning","message":{"text":"SearchUserOptions.toSearchQueryBase (cognitive 21): SearchUserOptions.toSearchQueryBase has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/user/search.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a144987165d381274bf4f887cbc2c525e54f9378563157336bcf3825a05d63"}},{"ruleId":"D2","level":"warning","message":{"text":"jobparser.ParseWorkflowCallSpec (cognitive 21): jobparser.ParseWorkflowCallSpec has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, match/switch 4, 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":"modules/actions/jobparser/workflow_call.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ab17f3ae1fd4d6c480ae7a1411fb8b6af537426078f4efec959ea7e0d843a49"}},{"ruleId":"D2","level":"warning","message":{"text":"LayeredFS.WatchLocalChanges (cognitive 21): LayeredFS.WatchLocalChanges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 4, match/switch 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/assetfs/layered.go"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"31273ee0320b8444e3bc3587176c66f7f1cf5004382a5cf4be91770550ed5067"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.Execute (cognitive 21): Manager.Execute has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 10, jumps 6, if/else 3, loops 2 (nesting depth added 6). 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":"modules/graceful/manager_windows.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"279146035f3f4f98ccc0bb3bb6b0423aca1d9bcc8b4dbc243df1ef695fc22574"}},{"ruleId":"D2","level":"warning","message":{"text":"httplib.ServeUserContentByReader (cognitive 21): httplib.ServeUserContentByReader has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"modules/httplib/serve.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd0473934eaff28568d409fde4df7811d04f4f66c648922904baae9d5af6ed94"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.postProcess (cognitive 21): markup.postProcess has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 6, boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"modules/markup/html.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a895e377a4bebba3b8ca8a62a631c7b1c804d2a46e3143735ec1caabe2b399"}},{"ruleId":"D2","level":"warning","message":{"text":"blockParser.Open (cognitive 21): blockParser.Open has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, boolean chains 6, 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":"modules/markup/markdown/math/block_parser.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e980b83e301c47e34b30adcdfd5db6b7ba91d4411b1448ccaec56ae6d03620"}},{"ruleId":"D2","level":"warning","message":{"text":"pub.ParsePackage (cognitive 21): pub.ParsePackage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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":"modules/packages/pub/metadata.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"c18b6de3af20bb59190b38bcd92712387b00b9534f80ba6576799f4a0ad27407"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.CreateUser (cognitive 21): admin.CreateUser has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/admin/user.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b2c777377db618bb06c39f60506a28f8ad9dd3cd66871f358197422d14fb0f3"}},{"ruleId":"D2","level":"warning","message":{"text":"shared.ListRuns (cognitive 21): shared.ListRuns has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"routers/api/v1/shared/action.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"47a3e1cb97314ddaeeb1c899a1b2648e83f5150894bacd68c363ddc634329851"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.NewUserPost (cognitive 21): admin.NewUserPost has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, match/switch 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":"routers/web/admin/users.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"48752d5b19a5dfc4878950c838dddb3d19c029ae73ce33d7c70f139ed144ee9a"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.SignInPost (cognitive 21): auth.SignInPost has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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, 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":"routers/web/auth/auth.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1cc08cd08427962cccbf6453ebaf7df81f434d0470013f8017dced0c47f3f4"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.convertToViewModel (cognitive 21): actions.convertToViewModel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 5, 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":"routers/web/repo/actions/view.go"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"79c680eac3c122f4ca70014370d541d961c74e2b78064d6e91cd7340e286ff31"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ExcerptBlob (cognitive 21): repo.ExcerptBlob has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/compare.go"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"85a56e852250d37eaa10a5d49fbc30200eafbb39cf01544307cad1c687e838bb"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.GetMergedBaseCommitID (cognitive 21): repo.GetMergedBaseCommitID has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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":"routers/web/repo/pull.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd79063ccd854514e798a525282fe41acf56976d63f573c64d7ac0fe9a942b4"}},{"ruleId":"D2","level":"warning","message":{"text":"user.NotificationSubscriptions (cognitive 21): user.NotificationSubscriptions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 3, match/switch 3, boolean chains 2 (nesting depth added 3). Of this number, 15 points are the body\u0027s own statements and 6 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":"routers/web/user/notification.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d97ef61a272ca72d327ede6787c764c817c2dcca44f5b62ef4e9e641a8b757"}},{"ruleId":"D2","level":"warning","message":{"text":"automerge.getPullRequestsByHeadSHA (cognitive 21): automerge.getPullRequestsByHeadSHA has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/automerge/automerge.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c9096dd0895e7c99b0b1201e2e3cf68dc8302a8f882afa4acc14a34e3f02108"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.checkCommitGraph (cognitive 21): doctor.checkCommitGraph has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (nesting depth added 8). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 135). 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":"services/doctor/misc.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"db177ef87bffd53bd304878efda649aae234a168a10e4a6b853426d96e1c157e"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.tryMapColumnsByContent (cognitive 21): gitdiff.tryMapColumnsByContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 7, 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":"services/gitdiff/csv.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc60a2b4d1953ab50e4cfaaa94f923d5ab69522966fcca5595c97c8f3ced5ca"}},{"ruleId":"D2","level":"warning","message":{"text":"Diff.LoadComments (cognitive 21): Diff.LoadComments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 8 (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":"services/gitdiff/gitdiff.go"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"548e589b046c034fa04f72e8045441b751bc0db57151fc8774ef77c7847b0534"}},{"ruleId":"D2","level":"warning","message":{"text":"GithubDownloaderV3.convertGithubRelease (cognitive 21): GithubDownloaderV3.convertGithubRelease has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, loops 1 (nesting depth added 9). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 346). 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":"services/migrations/github.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa567797c1a4cbf292a3b0d22c045188d2e9b52c111ebf28c06701eb3714854"}},{"ruleId":"D2","level":"warning","message":{"text":"alpine.BuildAllRepositoryFiles (cognitive 21): alpine.BuildAllRepositoryFiles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 7 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/packages/alpine/repository.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"074fbf4ae68026309d2b86c1ca235744ce960d0e71500b80a2c815307a498ab0"}},{"ruleId":"D2","level":"warning","message":{"text":"RedisBroker.readLoop (cognitive 21): RedisBroker.readLoop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, loops 7, match/switch 3, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pubsub/redis.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e9dce2cf5ab395c6bb4087c1ca2b90ddb8b5e1394a25e4b2bd849525d1d1d7"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.handleCloseCrossReferences (cognitive 21): pull.handleCloseCrossReferences 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":"services/pull/merge.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc4f273bd5ded569988adb9ccb9a617abcbdff05cd99bbf52b6a5f849e7904e"}},{"ruleId":"D2","level":"warning","message":{"text":"release.DeleteReleaseByID (cognitive 21): release.DeleteReleaseByID has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, 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":"services/release/release.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"66776fef8908b2f892712002366d8dbc95d17a8126335a66496776d46ef1b400"}},{"ruleId":"D2","level":"warning","message":{"text":"webhook.newDefaultRequest (cognitive 21): webhook.newDefaultRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, match/switch 5 (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":"services/webhook/deliver.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca396730a795534dbc12f789c963a85814c22074e2ab316bf5732ba5a4b57311"}},{"ruleId":"D2","level":"warning","message":{"text":"cmd.runDumpRepository (cognitive 20): cmd.runDumpRepository has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, match/switch 3, loops 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/dump_repo.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"189f4cd55906bc060f518330dc4b2ec8e84cf04f598320c9da8c3cde797d7bf2"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_10.DeleteOrphanedAttachments (cognitive 20): v1_10.DeleteOrphanedAttachments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, 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":"modelmigration/v1_10/v96.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"7973b89d374106dc5bd8c6439836c4b0dd625add87716f1691638bdac37d60d3"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_13.IncreaseLanguageField (cognitive 20): v1_13.IncreaseLanguageField has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 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":"modelmigration/v1_13/v145.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b648fc0795a032481a83579a1a976b5036b6e67f7f9012df5d6e4aa23d971f7"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_20.RenameWebhookOrgToOwner (cognitive 20): v1_20.RenameWebhookOrgToOwner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, 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":"modelmigration/v1_20/v245.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"c72b10663a8003d867928a3b49c12ed8685aabd87d5b9759e992e48324249d2f"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.GetRunningTaskByToken (cognitive 20): actions.GetRunningTaskByToken has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, 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":"models/actions/task.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a9d8f94f4d86d8468422edb16395bd9c0b45f1ef7edc7b981c6feb16246d14e"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.AddPublicKeysBySource (cognitive 20): asymkey.AddPublicKeysBySource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 2, jumps 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":"models/asymkey/ssh_key.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c01baa8001a46176a00048444665b5a171e88c9e8c9a8bee6b99ec8413330f"}},{"ruleId":"D2","level":"warning","message":{"text":"file.Write (cognitive 20): file.Write has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, 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":"models/dbfs/dbfile.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"411a6a5b3d821e864091d715fdbc58af2189a2ac5739c50b42af3f5c8308f817"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.applyLabelsCondition (cognitive 20): issues.applyLabelsCondition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, 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":"models/issues/issue_search.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb3e380aca797ba7ccd5704c0b5d8fe3da103d00ac78b240db0ae4e25561a42"}},{"ruleId":"D2","level":"warning","message":{"text":"CommentList.loadDependentIssues (cognitive 20): CommentList.loadDependentIssues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, 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":"models/issues/comment_list.go"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"70bdf5b8012dea2c34c011d8353944964a27960349344e9db9a016f37e1ace36"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.StarRepo (cognitive 20): repo.StarRepo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 9). Most of this is not in the body itself: 0 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 30). 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":"models/repo/star.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e80479c87b83c550785cab82e6064c5cc424f0944a086babf85d6cd039c1895"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.DetectWorkflows (cognitive 20): actions.DetectWorkflows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, match/switch 4, 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":"modules/actions/workflows.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"d30934cabb4f039059f26ed5179937c0d8fad510617e7de90dc18cd1e09fbc2a"}},{"ruleId":"D2","level":"warning","message":{"text":"url.ParseGitURL (cognitive 20): url.ParseGitURL has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, match/switch 3, loops 2, boolean chains 1, jumps 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":"modules/git/url/url.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"353129d96007d0724dc8d23ad550897e6f74f7e1151845bd479dedb822ba9c97"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.getIssueIndexerData (cognitive 20): issues.getIssueIndexerData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 5, 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, 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":"modules/indexer/issues/util.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"306cc92cdc06a4df7da9bdf04a9fab377be0d307fc59220d190f20f654608ba1"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.fullIssuePatternProcessor (cognitive 20): markup.fullIssuePatternProcessor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/html_issue.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"984fa0c514802ab19e7507c67c9b48013756446ea4da98a73188378a00afd92b"}},{"ruleId":"D2","level":"warning","message":{"text":"markdown.isYAMLSeparator (cognitive 20): markdown.isYAMLSeparator 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":"modules/markup/markdown/meta.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"cacfa2d92c3f19ad7046f1845874da70141cfa6399f7254020cf2c4ccee49025"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.getLevelDB (cognitive 20): Manager.getLevelDB has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, loops 8, 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":"modules/nosql/manager_leveldb.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d40e13ab8300d3359b0009ee6eaa3e532b0848ffc2eb2a134c4dccf642ac99a"}},{"ruleId":"D2","level":"warning","message":{"text":"nuget.ExtractPortablePdb (cognitive 20): nuget.ExtractPortablePdb has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, match/switch 2, loops 1 (nesting depth added 10). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 50). 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":"modules/packages/nuget/symbol_extractor.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ff286b78ec2351e3bc8041d6a4500e89a79ba0535270940479167bc458866b"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.SyncReleasesWithTags (cognitive 20): repository.SyncReleasesWithTags has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 6 (nesting depth added 5). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 189). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/repository/repo.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"9494f423b0d1ca3601f9d0f5236825eea2b181fd07bb1ed842ced68d00275b15"}},{"ruleId":"D2","level":"warning","message":{"text":"org.EditTeam (cognitive 20): org.EditTeam has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"routers/api/v1/org/team.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe76fdc155f244729221092f00b9af0e5092fd880ef6058f66d90bb5aeb60764"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.parseReviewersByNames (cognitive 20): repo.parseReviewersByNames has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/pull_review.go"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"65417ebb3a172b1ac62e279be5e222bde2925623db8d5382c112635a6eab89f0"}},{"ruleId":"D2","level":"warning","message":{"text":"shared.ListJobs (cognitive 20): shared.ListJobs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 3, 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":"routers/api/v1/shared/action.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62dc368b631ac56aaf13f390744543e0b40e7ae7c7d7c7ef7038c4c1ba9cf83"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.AccessTokenOAuth (cognitive 20): auth.AccessTokenOAuth has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 4, 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":"routers/web/auth/oauth2_provider.go"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b1e53893383d080175d64b8605fc475770be6681119b4751b87283a171b3a8"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.ArtifactsDownloadView (cognitive 20): actions.ArtifactsDownloadView has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 2, boolean chains 1 (nesting depth added 4). Of this number, 14 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, 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":"routers/web/repo/actions/view.go"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dfa2990372cedf00a60267ecb5380f215810c4fb7f9636c1f4546d80d8f3646"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.MigratePost (cognitive 20): repo.MigratePost has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, 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":"routers/web/repo/migrate.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c5296f9cb49fca8e2b851aa01576e70ea77014a6bdadf3027fda2897afe6e9"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdatePullRequest (cognitive 20): repo.UpdatePullRequest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, 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":"routers/web/repo/pull.go"},"region":{"startLine":969}}}],"partialFingerprints":{"codehealthFindingId/v1":"265191fe5d73cb0276bf2fc0a540d07c5cb546a21a9e5c306d63b3fe68c2934c"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.NewReleasePost (cognitive 20): repo.NewReleasePost has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 6, match/switch 1 (nesting depth added 2). 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":"routers/web/repo/release.go"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c0f420e170780a287b3b3fe2b030213825a80fb7f9a0bd2227c25a370f0ca35"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreatePost (cognitive 20): repo.CreatePost has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, 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":"routers/web/repo/repo.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3067b50a73177ce1db5484c3f9ac75e19584aa3734c44d06fb705d9e88b970b"}},{"ruleId":"D2","level":"warning","message":{"text":"pullRequestViewInfo.prepareMergeBoxCommitSigning (cognitive 20): pullRequestViewInfo.prepareMergeBoxCommitSigning has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, 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":"routers/web/repo/issue_view.go"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d16190767722ad53ca7b79d7c20a21491ec4ea724e033dbfdd8d426dbef38f"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.PrepareFilterIssueLabels (cognitive 20): issue.PrepareFilterIssueLabels has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, 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":"routers/web/shared/issue/issue_label.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d1d8e8b93ec7ee66773343c7b06611a2af549f65e44ee8f524b3eda428980f"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.ParseTemplatesFromDefaultBranch (cognitive 20): issue.ParseTemplatesFromDefaultBranch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, 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":"services/issue/template.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1dee56e9cb08941f0f06b0332531fbb474cc53e4aa629f0bf9d61bafb927da"}},{"ruleId":"D2","level":"warning","message":{"text":"lfs.GetListLockHandler (cognitive 20): lfs.GetListLockHandler has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/lfs/locks.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"5161547dde5e40ea401823c5437ddbea774763bda749c9c858bad393cce416f9"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaDownloader.GetMilestones (cognitive 20): GiteaDownloader.GetMilestones has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 3, 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":"services/migrations/gitea_downloader.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"7facb3d5541c375892653f831e409b62d9372dd33a815d655d45a507edbda309"}},{"ruleId":"D2","level":"warning","message":{"text":"GiteaLocalUploader.CreateMilestones (cognitive 20): GiteaLocalUploader.CreateMilestones has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/gitea_uploader.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"074a38374ffa6f4a59e53b4dbbb260a052f405ca938209b60dbc5b882e0e266d"}},{"ruleId":"D2","level":"warning","message":{"text":"GithubDownloaderV3.GetAllComments (cognitive 20): GithubDownloaderV3.GetAllComments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, loops 8 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/github.go"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe47f7299891c143e31ec045f9d96d882d67ed1834b45815a14028dbf9b2f27"}},{"ruleId":"D2","level":"warning","message":{"text":"packages.UnlinkFromRepository (cognitive 20): packages.UnlinkFromRepository has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/packages/package_update.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"0013e43a31e371df372adcada0a07c2a8f045533dfc026c69dcf6116bc9c0557"}},{"ruleId":"D2","level":"warning","message":{"text":"debian.BuildAllRepositoryFiles (cognitive 20): debian.BuildAllRepositoryFiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, 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":"services/packages/debian/repository.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18c38f20c757288869d0a21e1ff9b4d77fba5813defad7e9b68ffa4f3d0bb70"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.prepareRepoCommit (cognitive 20): repository.prepareRepoCommit 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":"services/repository/create.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb674c3f211fa2bb00a098a93e2049193f848ccbc2c00082cb0c13eca8609a29"}},{"ruleId":"D2","level":"warning","message":{"text":"archiver.doArchive (cognitive 20): archiver.doArchive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 6). 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":"services/repository/archiver/archiver.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f38d741f725ebfdf6125b55fed58ca85299ddcd9174915e26edf7240527b18b"}},{"ruleId":"D2","level":"warning","message":{"text":"TemporaryUploadRepository.CommitTree (cognitive 20): TemporaryUploadRepository.CommitTree has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/repository/files/temp_repo.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7cab56d450c5e5e4acb3573559793b78912bf45e787d2de9ebd2e1e93c4dbf"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_17.StoreWebauthnCredentialIDAsBytes (cognitive 19): v1_17.StoreWebauthnCredentialIDAsBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 3, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 45). 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":"modelmigration/v1_17/v221.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3146b49ee26c46794b8376f2778e898adee5aac9510ed68b1db98efbb1e314"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_17.RenameCredentialIDBytes (cognitive 19): v1_17.RenameCredentialIDBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 31). 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":"modelmigration/v1_17/v223.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea75410bac13c1c2918a15ed31791d4e0003ad5b9a267f356066746f781a30d7"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationList.LoadIssues (cognitive 19): NotificationList.LoadIssues 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":"models/activities/notification_list.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6274ac0217a107e0656c5a663d6886f9ff37dfce38c18d8c3bf6e78cc8ec6d4"}},{"ruleId":"D2","level":"warning","message":{"text":"db.Iterate (cognitive 19): db.Iterate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, match/switch 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/db/iterate.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"671fc3a29006ac38ab2a39e12bd06a2fab47eb801b12b9322d49f418d8b958a1"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.updateCommentInfos (cognitive 19): issues.updateCommentInfos has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"models/issues/comment.go"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2f5ca048c8caed7427d8b432d6ff21bd79f6bb45499cca31b3fe79a33e453a5"}},{"ruleId":"D2","level":"warning","message":{"text":"Issue.getCrossReferences (cognitive 19): Issue.getCrossReferences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"models/issues/issue_xref.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"0630aac3f7887132c6d0976a782e5baebbb9de5c581106f7c6d7b3ff0e61c3b1"}},{"ruleId":"D2","level":"warning","message":{"text":"project.DeleteProjectByRepoID (cognitive 19): project.DeleteProjectByRepoID has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"models/project/project.go"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1484ee996de05cbdf5e62e2b0f16470069fbb776028fb322eda89c81a3ced7"}},{"ruleId":"D2","level":"warning","message":{"text":"repostats.CheckRepoStats (cognitive 19): repostats.CheckRepoStats has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, match/switch 5, 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":"models/repostats/repo.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"95c5f33dd3682b974d5ea45df3fa40e3cd9a2aab51eeded4a979da35b6112fee"}},{"ruleId":"D2","level":"warning","message":{"text":"unittest.ResetTestDatabase (cognitive 19): unittest.ResetTestDatabase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 2). Of this number, 10 points are the body\u0027s own statements and 9 belong to 5 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":"models/unittest/testdb.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd7bb6e0e07c81cbf2504c949d1a7798bfee32313177d0e3fba533bdab16547"}},{"ruleId":"D2","level":"warning","message":{"text":"emoji.globalVars (cognitive 19): emoji.globalVars has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, 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":"modules/emoji/emoji.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2bb945c9c58f947a7844752a1e7dc275afd1caf7f8336e7b835292a4436bfd0"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.GetRefsFiltered (cognitive 19): Repository.GetRefsFiltered has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 1 (nesting depth added 8). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 24). 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":"modules/git/repo_ref_nogogit.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d375b6833c6a8f81e776fe93625ea935580bceefd69f5717018329eec86067f"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.getTree (cognitive 19): Repository.getTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"modules/git/repo_tree_nogogit.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0404825ea1747aee66f273222e2418f24bef0a3e1e508bcfbf5d40ae13dd91"}},{"ruleId":"D2","level":"warning","message":{"text":"highlight.detectChromaLexerByFileName (cognitive 19): highlight.detectChromaLexerByFileName has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/highlight/lexerdetect.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"834373bbab8a96105ea3943cdf5b7507445a5f4fc32f5aea9763f53eb9d9a58f"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.comparePatternProcessor (cognitive 19): markup.comparePatternProcessor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"modules/markup/html_commit.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdf3f6c8fe1bce08f3fb02819c63c5be6994e5fdf856f1b900c543094885915f"}},{"ruleId":"D2","level":"warning","message":{"text":"footnoteParser.Parse (cognitive 19): footnoteParser.Parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, loops 1 (nesting depth added 6). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/common/footnote.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aa3282d701cc8c15c1c8f105721e479b1cca321233fa4ff43cfc3df5e6c8e0e"}},{"ruleId":"D2","level":"warning","message":{"text":"Renderer.CanRender (cognitive 19): Renderer.CanRender has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 7, loops 1 (nesting depth added 5). Of this number, 17 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/markup/console/console.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81f5d2c1ae144ad33cce82a614bef129015da8ce43221e8c0a1ec3f919b7946"}},{"ruleId":"D2","level":"warning","message":{"text":"ASTTransformer.transformList (cognitive 19): ASTTransformer.transformList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 5, 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":"modules/markup/markdown/transform_list.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa11404d40e01d8ade056f5e330ad82825cd3bf2bfceb44baf81ae1f6f022b7"}},{"ruleId":"D2","level":"warning","message":{"text":"VirtualStore.Release (cognitive 19): VirtualStore.Release has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"modules/session/virtual.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1096def04d8876d3fedbafa3323d53bf26a3a9fefa4a04aded47779a3c9441"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.decodeEnvSectionKey (cognitive 19): setting.decodeEnvSectionKey has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/setting/config_env.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f49e6a3eac831590360a199dab3eac20019263de07e7082b1715a684bfec060"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.GetQueueSettings (cognitive 19): setting.GetQueueSettings 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":"modules/setting/queue.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e598bfefa8d56b29f1e6a152ce952e4aa7ab4e3e85c780493a4d5dca6fef2d"}},{"ruleId":"D2","level":"warning","message":{"text":"Router.normalizeRequestPath (cognitive 19): Router.normalizeRequestPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, 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":"modules/web/router.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3410feaef68f69e55323dd8695a628e05dcd486fd5d0b776b69c5b875200ae"}},{"ruleId":"D2","level":"warning","message":{"text":"arch.UploadPackageFile (cognitive 19): arch.UploadPackageFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/arch/arch.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"54a5bfb57d28902ed8f6fd60afb9fb5072709762b7a07195c18d4b203c98590a"}},{"ruleId":"D2","level":"warning","message":{"text":"conan.DeletePackageV2 (cognitive 19): conan.DeletePackageV2 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, 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":"routers/api/packages/conan/conan.go"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f732a8f08da4b7653f8def0324c9b2523d77a11ec67e5f9a35669d3a8a16c8"}},{"ruleId":"D2","level":"warning","message":{"text":"rpm.UploadPackageFile (cognitive 19): rpm.UploadPackageFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"routers/api/packages/rpm/rpm.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"521e13865f99c4a946fa7a7974694d93f7ff3d75453ae9d1a381aab871b73dea"}},{"ruleId":"D2","level":"warning","message":{"text":"v1.verifyAuthWithOptions (cognitive 19): v1.verifyAuthWithOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 4 (nesting depth added 5). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 867). 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":"routers/api/v1/api.go"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"32c1fe2d7ff2195a285f68871ce137049d924fa74cc756473c78b8d85dd811d3"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.prepareForReplaceOrAdd (cognitive 19): repo.prepareForReplaceOrAdd has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, match/switch 2, 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":"routers/api/v1/repo/issue_label.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"46dfe569b54348c05764324066de6e4ab7cfc5f171f31cde7bd56fc34195e872"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdatePullRequest (cognitive 19): repo.UpdatePullRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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, 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":"routers/api/v1/repo/pull.go"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"189322434f21108e2ba4a514098b4aca8e2796123aabe6cd03a03c39d6ce2724"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreateRelease (cognitive 19): repo.CreateRelease has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (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":"routers/api/v1/repo/release.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbd6bebade46dd089ab8b07dd1ddc10e2723a07cfe63fcd242eeb4f3e1f4256a"}},{"ruleId":"D2","level":"warning","message":{"text":"private.hookPostReceiveSyncRepoDefaultBranch (cognitive 19): private.hookPostReceiveSyncRepoDefaultBranch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 4, 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":"routers/private/hook_post_receive.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b4f858f3c3c217d9055d61b5c6f55b492474dcef61b50194ccef8d8317c8b34"}},{"ruleId":"D2","level":"warning","message":{"text":"private.AddLogger (cognitive 19): private.AddLogger has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, match/switch 3, 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":"routers/private/manager.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff25d71ab9264a6ca48aba07b4a05bb70489ac81872e8a24432c3ffae58b546"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.NewAuthSourcePost (cognitive 19): admin.NewAuthSourcePost has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 3, 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":"routers/web/admin/auths.go"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"5af04dbbfcf0d494eede8bd96b9db8097c6d9b632744250712ec8dbf912d268d"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.prepareScopedWorkflows (cognitive 19): actions.prepareScopedWorkflows has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"e875c184611e5935f2a98672d216c20c207cef93ed18635619c6cebf93a75dbd"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.prepareEditorCommitSubmittedForm (cognitive 19): repo.prepareEditorCommitSubmittedForm 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, 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":"routers/web/repo/editor.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5526282a2a4d6d29e2eebe1f617b000919417e388ad670920be35d786bf61fa2"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.editorHandleFileOperationError (cognitive 19): repo.editorHandleFileOperationError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/editor_error.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de4c0f4c1d221487cebc8d42d4141ed00f754239d1206b07262ea3dc72ce54f"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdateIssueAssignee (cognitive 19): repo.UpdateIssueAssignee has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue.go"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad1141f2b8e77b42ea4b1967ecf1880162bda520373fc4584332ff5cd385b9ca"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.findReadmeFileInEntries (cognitive 19): repo.findReadmeFileInEntries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, 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":"routers/web/repo/view_readme.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"d63ee5cac1044b2cf573bc3e3dff9cb2605f510ed27904ea84ea58b8f47a8172"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.CollaborationPost (cognitive 19): setting.CollaborationPost 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, 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":"routers/web/repo/setting/collaboration.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70de806621859f74538a08cc5ed3a667fc8cd719cb9efc61dd7be90a342086a"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.handleSettingsPostTransfer (cognitive 19): setting.handleSettingsPostTransfer 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, 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"690750ae8b93a5463732de119782b59c0592de8fc1ae84d167d1fdd04a7c4929"}},{"ruleId":"D2","level":"warning","message":{"text":"user.CodeSearch (cognitive 19): user.CodeSearch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"routers/web/user/code.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"075f56659cbdf97c3497762953d4ce2a5605076b06428752bedc0acc924f3d78"}},{"ruleId":"D2","level":"warning","message":{"text":"user.UsernameSubRoute (cognitive 19): user.UsernameSubRoute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, match/switch 1 (nesting depth added 8). Of this number, 17 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/user/home.go"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc96c2036a48d10d45acbe795c7276d426d05fb7ed7959d3573c9372461e954"}},{"ruleId":"D2","level":"warning","message":{"text":"security.loadSecurityData (cognitive 19): security.loadSecurityData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"routers/web/user/setting/security/security.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"f63114e863b89a8f7dc4821b9912ed12bd2211767f3803cdca752abf83868fc2"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.computeReusableCallerOutputs (cognitive 19): actions.computeReusableCallerOutputs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"services/actions/context.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"0360e5a92b620dbfaa1aab4f46011bbd2ad267f43a47e70dc05f8658300e2ff1"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.NotifyWorkflowJobsStatusUpdate (cognitive 19): actions.NotifyWorkflowJobsStatusUpdate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 7 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/notify.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8c72b75f379667215fd136c90618b2779ad0dd0115238a8fcab7441c35aaa3"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.validateRerun (cognitive 19): actions.validateRerun 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":"services/actions/rerun.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"22db6542ea21c73dbc1f9373212da780d0018dec8204387c9416f274c96b5e84"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.HashAndVerifyForKeyID (cognitive 19): asymkey.HashAndVerifyForKeyID has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"services/asymkey/commit.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1000d0f4541ea4ab5f696cdacd86b9274780856823172230166a5b62529387d"}},{"ruleId":"D2","level":"warning","message":{"text":"context.packageAssignment (cognitive 19): context.packageAssignment 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":"services/context/package.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76bea03983f45697e0920bb183241fefd9c0e32a87d00850e07deb89a0fcb8e"}},{"ruleId":"D2","level":"warning","message":{"text":"context.repoAssignmentPrepareOwner (cognitive 19): context.repoAssignmentPrepareOwner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"services/context/repo.go"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"57bc4872b02f840a313a81554b2559b1c954a57e97d3e536d37dbaee51e78dfe"}},{"ruleId":"D2","level":"warning","message":{"text":"context.getRefName (cognitive 19): context.getRefName has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, match/switch 1 (nesting depth added 11). Of this number, 13 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. 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":"services/context/repo.go"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"f24edd902bc55dcd08873251ea332a8099f64b87a31562b06b1fad04f09d0d29"}},{"ruleId":"D2","level":"warning","message":{"text":"upload.Verify (cognitive 19): upload.Verify has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/context/upload/upload.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac816d8e21b74816870474cf8f2865423c819909936d53b2a8387ac7f759867"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.RunChecks (cognitive 19): doctor.RunChecks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"services/doctor/doctor.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"d079d28dcd0c80934f1a3514d452a898559aa987cfe2c9699f9a8806da608f9e"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.commonCheckStorage (cognitive 19): doctor.commonCheckStorage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (nesting depth added 7). Of this number, 14 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/doctor/storage.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a1da576a3dd1145562f5a764682bfc5bdd8908f63bfa30f9ef677286714891"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.getColumnMapping (cognitive 19): gitdiff.getColumnMapping has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/gitdiff/csv.go"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3bf3af0b6eea622b5e2805051a2e1e0f3f09d1a321cb9ca0f1c384641fc56b"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.UpdateAssignees (cognitive 19): issue.UpdateAssignees has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 5 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/issue/assignee.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd8e152188b10960175c0f720f6cf074971782629b0c9864790567eb3f596b4e"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.NewIssue (cognitive 19): issue.NewIssue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 3, boolean chains 1 (nesting depth added 4). 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: 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":"services/issue/issue.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d95f9b9409441e672340c8e68dea582b8f6afe59858ff848749058128312e50"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.changeMilestoneAssign (cognitive 19): issue.changeMilestoneAssign has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"services/issue/milestone.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"e778b5be09143f5df25a6e2e265205a0acb4d4b6f4d3e79ee098b231fea78919"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.CanDoerChangeReviewRequests (cognitive 19): issue.CanDoerChangeReviewRequests 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":"services/issue/review_request.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4b062be7e17364bedbcb7f20c3f1a6bc2849d3f51129f61603eb254067e121"}},{"ruleId":"D2","level":"warning","message":{"text":"mailAttachmentBase64Embedder.Base64InlineImages (cognitive 19): mailAttachmentBase64Embedder.Base64InlineImages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 4 (nesting depth added 10). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 78). 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":"services/mailer/mail.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"309c117773421594b6676652a765736de2a5f1ccb2e937cec8781625f9b0ef74"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.renderRepoFileCodePreview (cognitive 19): markup.renderRepoFileCodePreview has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 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":"services/markup/renderhelper_codepreview.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef1bf494e52c7c934eaf34f7e4faa7371c16724c3cdc96d1ffea3d39f5ba793"}},{"ruleId":"D2","level":"warning","message":{"text":"OneDevDownloader.GetComments (cognitive 19): OneDevDownloader.GetComments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"services/migrations/onedev.go"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"9390e11d7e4b5374fc83a9df34b57e60760bde6a4d38237b244bd1692dcf89c1"}},{"ruleId":"D2","level":"warning","message":{"text":"mirror.pushAllLFSObjects (cognitive 19): mirror.pushAllLFSObjects has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, loops 1 (nesting depth added 7). Of this number, 14 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mirror/mirror_push.go"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"46ee82e1fa4a715643b9f9986965c322817d29e9782dbf099749a1f39527f2cc"}},{"ruleId":"D2","level":"warning","message":{"text":"oauth2_provider.loadOrCreateAsymmetricKey (cognitive 19): oauth2_provider.loadOrCreateAsymmetricKey has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, match/switch 2 (nesting depth added 7). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 353). 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":"services/oauth2_provider/jwtsigningkey.go"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0c001dadde35685fcd644d5fd7b630f68e820da5a4355657c28abd8efb6829c"}},{"ruleId":"D2","level":"warning","message":{"text":"debian.buildPackagesIndices (cognitive 19): debian.buildPackagesIndices has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, 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":"services/packages/debian/repository.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"be859a8fd932d7c19e8341ef52ddcac5f90b0212dfb6062643f137ebb8677bfb"}},{"ruleId":"D2","level":"warning","message":{"text":"project.MoveIssuesOnProjectColumn (cognitive 19): project.MoveIssuesOnProjectColumn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (nesting depth added 6). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 23). 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":"services/projects/issue.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6015ac4f8d63c773c2481217cac03115095e34d9f0a2c004255c1e4cba0dce1"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.rebaseTrackingOnToBase (cognitive 19): pull.rebaseTrackingOnToBase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"services/pull/merge_prepare.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"270bcd1da12360c3b0eb496f81e0667a3e7bb834586957ff13bcd87bd69a03bd"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.ChangeTargetBranch (cognitive 19): pull.ChangeTargetBranch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, boolean chains 1. 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: 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":"services/pull/pull.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"98de10d40a8125cf0a0b0264159f040f067d08b1b6d22af9f3003d8ffa140d37"}},{"ruleId":"D2","level":"warning","message":{"text":"user.UpdateAuth (cognitive 19): user.UpdateAuth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"services/user/update.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"1324126ddc89980616f23341c8b92c4e3f9e02a37c05e06cfa0c343b2fa02858"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_15.RenameTaskErrorsToMessage (cognitive 18): v1_15.RenameTaskErrorsToMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"modelmigration/v1_15/v184.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a905acdeeee4c369705e17dc942542aaeca7346cf38cc8fff5a92a4b421098"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_8.AddPullRequestRebaseWithMerge (cognitive 18): v1_8.AddPullRequestRebaseWithMerge has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, 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":"modelmigration/v1_8/v76.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9016cfd15a0f61772b601bf18abfaf68187b0d8368b2720343466cb383a0165"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.SynchronizePublicKeys (cognitive 18): asymkey.SynchronizePublicKeys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, 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":"models/asymkey/ssh_key.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae3a76d5327521c9cb416699cd6a081da1babac2a1913001692915f0bfda7cf"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueList.LoadAssignees (cognitive 18): IssueList.LoadAssignees has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, 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":"models/issues/issue_list.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"13bb2f423db5368e5e2fc9bc0956c52b2b4c2eaed3ee2336102fbd9092d410e6"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueList.LoadPullRequests (cognitive 18): IssueList.LoadPullRequests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, 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":"models/issues/issue_list.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"326941d90d272f8ebd1045803711d48995597046ca621c12cbb71a3fca8aee0b"}},{"ruleId":"D2","level":"warning","message":{"text":"PackageFileSearchOptions.toConds (cognitive 18): PackageFileSearchOptions.toConds has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 2, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/packages/package_file.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9d36e0466d0d2b0321bf6c1ad22d86356536b375b8ed8c65b306f4c24b8eb6"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.detectWorkflowMatch (cognitive 18): actions.detectWorkflowMatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/actions/workflows.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"d82ba38cdb007781aaeaf0336f3ee9fe790114f30db393734de83788fafa43b5"}},{"ruleId":"D2","level":"warning","message":{"text":"git.parseCommitFileStatus (cognitive 18): git.parseCommitFileStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, match/switch 2, 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":"modules/git/commit_file.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc542ea101484bdc149f3057c49daef6c8573e9b3d99fdea717dbd1c2740e33"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.getTag (cognitive 18): Repository.getTag has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"modules/git/repo_tag_nogogit.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e4ffa87a4bc1fdaa9b100c6256553a265a0d8fb7ac6bd05870a629f4b74929"}},{"ruleId":"D2","level":"warning","message":{"text":"Tree.ListEntries (cognitive 18): Tree.ListEntries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 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":"modules/git/tree_nogogit.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6df165afa2f308ecce6e75028ff8458c878db3c524ee3e3b8cb15fa597d7342"}},{"ruleId":"D2","level":"warning","message":{"text":"HostMatchList.matchesIP (cognitive 18): HostMatchList.matchesIP has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/hostmatcher/hostmatcher.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"af26b90e44331c14844f1af4c073239c32bdf6258ae49ae1f4b87e50f36816e5"}},{"ruleId":"D2","level":"warning","message":{"text":"Indexer.Index (cognitive 18): Indexer.Index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, 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":"modules/indexer/code/elasticsearch/elasticsearch.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ce830325ddecbb62ff8aea0dc333c5deb2549d530923e0fe616e4952565de8c"}},{"ruleId":"D2","level":"warning","message":{"text":"code.populateRepoIndexer (cognitive 18): code.populateRepoIndexer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, match/switch 5, 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":"modules/indexer/code/indexer.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"432ee97dc648d2a93731407ed4e40837dadf6cb079444a2c20e0ce21729a0c0e"}},{"ruleId":"D2","level":"warning","message":{"text":"LoggerImpl.Log (cognitive 18): LoggerImpl.Log has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"modules/log/logger_impl.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"99050b84a8c63f19853ffefe54c609d3523502e5e24297e548c64165d709202a"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.processNodeHeadingAndID (cognitive 18): markup.processNodeHeadingAndID has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"modules/markup/html_node.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f0078c0c4ccd5796253219031cbc9f307ed1e4eb1e18ff4dfd3355453124f8"}},{"ruleId":"D2","level":"warning","message":{"text":"arch.ParsePackageInfo (cognitive 18): arch.ParsePackageInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"modules/packages/arch/metadata.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb6e3cc09d9f931d0cda12ece770c762fa8544039df6c97468cc19090e993880"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.LoadRepoConfig (cognitive 18): repository.LoadRepoConfig 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":"modules/repository/init.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cde60cb1d5a25317b199e93808d4aa82c7437b7788f4836f9bcbfb05f2efd1f"}},{"ruleId":"D2","level":"warning","message":{"text":"artifactV4Routes.uploadArtifact (cognitive 18): artifactV4Routes.uploadArtifact has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"routers/api/actions/artifactsv4.go"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dcad4785dee9791ded27fc067f58b231cad3035dbab8f1486fd96fe9ef2138c"}},{"ruleId":"D2","level":"warning","message":{"text":"container.saveAsPackageBlobInternal (cognitive 18): container.saveAsPackageBlobInternal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 50). 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":"routers/api/packages/container/blob.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a59b3ae38f9b9f61634cdef24737203636ee60ba3ba2556d884dc3b3037966c"}},{"ruleId":"D2","level":"warning","message":{"text":"container.processOciImageIndex (cognitive 18): container.processOciImageIndex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, loops 1 (nesting depth added 8). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 174). 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":"routers/api/packages/container/manifest.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f008c761e0809ac41de607f2cc430043069116ce559820e5b2de92da103ae74"}},{"ruleId":"D2","level":"warning","message":{"text":"container.createManifestBlob (cognitive 18): container.createManifestBlob has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, 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":"routers/api/packages/container/manifest.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4a7d81212770f470bf60e72d0a401136b29703b77ad821ce49988cd5311801"}},{"ruleId":"D2","level":"warning","message":{"text":"npm.setPackageTag (cognitive 18): npm.setPackageTag has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, loops 2 (nesting depth added 8). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 459). 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":"routers/api/packages/npm/npm.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6858b42c75223169e22cb832327ff2f18acd9ca49cf833f2cf23fdb16d8725e"}},{"ruleId":"D2","level":"warning","message":{"text":"swift.UploadPackageFile (cognitive 18): swift.UploadPackageFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"routers/api/packages/swift/swift.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f9bb8b93dfcb0f2618cf4a77fd0f52893c194232f546b342fc1a01de33b61fd"}},{"ruleId":"D2","level":"warning","message":{"text":"terraform.UploadState (cognitive 18): terraform.UploadState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 2, match/switch 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":"routers/api/packages/terraform/terraform.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e09f67d34390ad086d82f14394e05eafe91163bca7d838930d202bf1bf94e1"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ActionsDispatchWorkflow (cognitive 18): repo.ActionsDispatchWorkflow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 4 (nesting depth added 5). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1182). 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":"routers/api/v1/repo/action.go"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"529d75a98881e45369cbbb2ab26f73030fd2362a2d002284127ce2468119dd8c"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.changeIssueCommentReaction (cognitive 18): repo.changeIssueCommentReaction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 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":"routers/api/v1/repo/issue_reaction.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77d135a32d63f12fffdb2b650629b19786827b523459627946875eaf83411de"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.changeIssueReaction (cognitive 18): repo.changeIssueReaction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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":"routers/api/v1/repo/issue_reaction.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"57f8a627994ff295f7d2d1b2d77dcab8cee17c09f00c30083de131276cdae8db"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.parseCompareInfo (cognitive 18): repo.parseCompareInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 4, match/switch 1 (nesting depth added 1). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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":"routers/api/v1/repo/pull.go"},"region":{"startLine":1085}}}],"partialFingerprints":{"codehealthFindingId/v1":"78fe58d9552b087c6eb9a3c041c7d2e77afbae3544ccb63f6ea3bd255995d4a0"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreatePullReview (cognitive 18): repo.CreatePullReview has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"routers/api/v1/repo/pull_review.go"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"32f97c407184475a8319f87ce4efbb018a69fadae95dd8c4e7cefacd33fd0aa1"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.CreateTagProtection (cognitive 18): repo.CreateTagProtection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 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":"routers/api/v1/repo/tag.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc33df9e60e6a87e876fba73f2b5852b555a57cb618e9e62ad7433d557b4c3e1"}},{"ruleId":"D2","level":"warning","message":{"text":"private.SendEmail (cognitive 18): private.SendEmail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 2 (nesting depth added 7). Of this number, 15 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/private/mail.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b683de23239cb4166bb2a5933c18f3ea482d867f1100fc80b57c4cb40e604dc"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.ActivatePost (cognitive 18): auth.ActivatePost has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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":"routers/web/auth/auth.go"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"22041e24c592f57b63c1ed10a9c2b06395a52eea37ae63a59afeb46a52ccaefe"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.handleAuthorizationCode (cognitive 18): auth.handleAuthorizationCode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 4 (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":"routers/web/auth/oauth2_provider.go"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0bed5499cdd96b0f3b0578864e99884a43121182b07f0d226512beeabef8b08"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.EditReleasePost (cognitive 18): repo.EditReleasePost has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"routers/web/repo/release.go"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b23a8a46df1d3bbb3cc6ec8562e1a9c27fc694e7923fabf4a47b832d3bce8a5"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.prepareToRenderReadmeFile (cognitive 18): repo.prepareToRenderReadmeFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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, 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":"routers/web/repo/view_readme.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc96921186cf15a1952fb5621239909de5ff8621f3d8acbc682862ea0661d58d"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.RunnerBulkActionPost (cognitive 18): actions.RunnerBulkActionPost has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, match/switch 3, loops 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 409). 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":"routers/web/shared/actions/runners.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"07241fba5869aaafc31e8dfba4c604264b19f0fcae28ea7ca11c01cfdaf6cc0b"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.ApplicationsPost (cognitive 18): setting.ApplicationsPost has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"routers/web/user/setting/applications.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d51f4c66b303b6b1791ba91eb8fadbec3348156582d351ef2e2cd3f0381f0fc0"}},{"ruleId":"D2","level":"warning","message":{"text":"security.EnrollTwoFactorPost (cognitive 18): security.EnrollTwoFactorPost has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"routers/web/user/setting/security/2fa.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd92b969f6a3481e7fbea626974531ffd467662697b698f347a2baf8972f9f2"}},{"ruleId":"D2","level":"warning","message":{"text":"websocket.Serve (cognitive 18): websocket.Serve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"routers/web/websocket/websocket.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6a4d3a41b3a23645f26b6f222b2491b3c37fc63dea4cd01c6a8e4c0d3625814"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.getCommitStatusEventNameAndCommitID (cognitive 18): actions.getCommitStatusEventNameAndCommitID has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/commit_status.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"9261c4cd7680dfb87f1737e1b616df054f2db14739a5daf66fe70f1ac01ba24e"}},{"ruleId":"D2","level":"warning","message":{"text":"asymkey.SignInitialCommit (cognitive 18): asymkey.SignInitialCommit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, match/switch 2, boolean chains 1, jumps 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":"services/asymkey/sign.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"481a2d58acb5565cf5aba558af62d78e88221cc8fa5f1073d1625f91520b6903"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.ToStopWatches (cognitive 18): convert.ToStopWatches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"services/convert/issue.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f1f29ddb864eeda767ac154ba38081a4f7a922ed1bd123066ebf516f593eaa"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.UpdateComment (cognitive 18): issue.UpdateComment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"services/issue/comments.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad06adbb181c651ecea9773a9b2901fa122ba9b066fe225c53113775aeb51b15"}},{"ruleId":"D2","level":"warning","message":{"text":"incoming.processIncomingEmails (cognitive 18): incoming.processIncomingEmails has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, match/switch 5, loops 1 (nesting depth added 7). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/mailer/incoming/incoming.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44ff4f9d6861df82360ca2aae99c6ec65ca12cdb4f719ad8be3cb8da0632969"}},{"ruleId":"D2","level":"warning","message":{"text":"mailer.mailIssueCommentBatch (cognitive 18): mailer.mailIssueCommentBatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, 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":"services/mailer/mail_issue.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbd26763c1dcd5d427b00e18103d6288cd931e5fb71d4c89d0dd8089a55b6d70"}},{"ruleId":"D2","level":"warning","message":{"text":"migrations.IsMigrateURLAllowed (cognitive 18): migrations.IsMigrateURLAllowed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 5 (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":"services/migrations/migrate.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"953e32192f558af6b643838255f986ac05b00693b5bfa075e02b065260d69303"}},{"ruleId":"D2","level":"warning","message":{"text":"GithubDownloaderV3.convertGithubReviewComments (cognitive 18): GithubDownloaderV3.convertGithubReviewComments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 8 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/github.go"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"879735b896a8e43cf85a044206b287df5e713b00e895fc5d2d9692a5a0cf760d"}},{"ruleId":"D2","level":"warning","message":{"text":"OneDevDownloader.tryGetUser (cognitive 18): OneDevDownloader.tryGetUser has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/onedev.go"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"063fd5a0c7454a0225966a4f720b33be764cc47d28cee4f145042b0aaa25107b"}},{"ruleId":"D2","level":"warning","message":{"text":"mirror.runPushSync (cognitive 18): mirror.runPushSync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 6). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 125). 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":"services/mirror/mirror_push.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7049e510a48d5dd98af278854702c4367f2e118f512b3dad787078927edc40a"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.AttemptThreeWayMerge (cognitive 18): pull.AttemptThreeWayMerge has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, loops 2 (nesting depth added 8). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/pull/patch.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a17263a7d80600979054936afbeacabcb484e16cf420435d8b4912771259c69"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.CreateOrUpdateProtectedBranch (cognitive 18): pull.CreateOrUpdateProtectedBranch 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":"services/pull/protected_branch.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5c0ee08065d42d6798b8da22d889873b865f071c031cef4faeba832a8bebc29"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.removeAllRepositoriesFromTeam (cognitive 18): repository.removeAllRepositoriesFromTeam has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"services/repository/repo_team.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7922bd88bfa6c230416ff352b715abf065757ae03360068974d0cb86323b5e3"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.StartRepositoryTransfer (cognitive 18): repository.StartRepositoryTransfer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 445). 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":"services/repository/transfer.go"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcdce64c74acb2ae292a788c88477ccf3761e67f211f146105f56b9aee2c390d"}},{"ruleId":"D2","level":"warning","message":{"text":"files.writeRepoObjectForRename (cognitive 18): files.writeRepoObjectForRename has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 4). 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, 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":"services/repository/files/update.go"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"020a11a7a4ae03906284f288515d3d7f8472f61ec2f05774854f3deb6b0f101d"}},{"ruleId":"D2","level":"warning","message":{"text":"openapi3gen.addURIFormats (cognitive 17): openapi3gen.addURIFormats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, 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":"build/openapi3gen/convert.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"1006167e8cb9dba9988e5c3cf4e891a3b6d5b8b104c6d2418550f273e820b1ed"}},{"ruleId":"D2","level":"warning","message":{"text":"openapi3gen.collectEnumValues (cognitive 17): openapi3gen.collectEnumValues has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, 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":"build/openapi3gen/enumscan.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8efb04473066befc5df440ecfdaaeea5f897cb0ea3e8662563efa3f32d5130d"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_10.UpdateMigrationServiceTypes (cognitive 17): v1_10.UpdateMigrationServiceTypes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_10/v100.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc9be414b997d3ab1aa95dfa8059d857859b245f9d989699edc2f226e88c1cd"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_10.AddCommitStatusContext (cognitive 17): v1_10.AddCommitStatusContext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_10/v88.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b81f9745b50147520e3101eae20d431eefb7d0727bc053fd8a6847b1f38e912"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_14.FixRepoTopics (cognitive 17): v1_14.FixRepoTopics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_14/v157.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a62818f1cd41c049371aa5091f8ffc6332c6fec04bca20fe687819f13d89297"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_15.DeleteMigrationCredentials (cognitive 17): v1_15.DeleteMigrationCredentials has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_15/v180.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"993c8ed65659d2312574641579f38adb8bcd315d93d79f9560d32cc40b1e7d54"}},{"ruleId":"D2","level":"warning","message":{"text":"Issue.verifyReferencedIssue (cognitive 17): Issue.verifyReferencedIssue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/issues/issue_xref.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7425f2af88d9a2d31a81e1c1c5e1e4cd7a0c05abde06344d181e3ec40d6e4d"}},{"ruleId":"D2","level":"warning","message":{"text":"organization.CreateOrganization (cognitive 17): organization.CreateOrganization has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 343). 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":"models/organization/org.go"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"66aaa591b93e88eb248f5fe0d0a7807a77665949bbd4c0b277159a13913bded4"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.watchRepoMode (cognitive 17): repo.watchRepoMode 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":"models/repo/watch.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"56b9d5259b7b77ef2f502a81a61d2c53d60d6afa3b33bf20faaf0673e1ab7663"}},{"ruleId":"D2","level":"warning","message":{"text":"jobparser.findWorkflowCallNode (cognitive 17): jobparser.findWorkflowCallNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 4, 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":"modules/actions/jobparser/workflow_call.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f2b35e3a2d22b97616e47ddcf7decdbaab788961e0123a2d7b5921616b9b92"}},{"ruleId":"D2","level":"warning","message":{"text":"jobparser.MatchCallerInputsAgainstSpec (cognitive 17): jobparser.MatchCallerInputsAgainstSpec 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":"modules/actions/jobparser/workflow_call.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7cac2a1f251c1d218938bddcde2b3ffd994c631ee810edb37a6b65f2d028675"}},{"ruleId":"D2","level":"warning","message":{"text":"escapeStreamer.analyzeDetectResults (cognitive 17): escapeStreamer.analyzeDetectResults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, 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":"modules/charset/escape_stream.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5247cfc39baed2dc99ba063612b6fad72a89b6b78eaae570f2f14f61cae9b46"}},{"ruleId":"D2","level":"warning","message":{"text":"MaterialIconProvider.FindIconName (cognitive 17): MaterialIconProvider.FindIconName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"modules/fileicon/material.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"478624e9e8d8abea4b9e09b762411b7de624319a9c871fbe6c61c182ab4346eb"}},{"ruleId":"D2","level":"warning","message":{"text":"git.getRepoRawDiffForFileCmd (cognitive 17): git.getRepoRawDiffForFileCmd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"modules/git/diff.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8de34864a716714ffed848057b35474cec9e1cf44f36a763fa2ae36dabd163b"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.CommitsByFileAndRange (cognitive 17): Repository.CommitsByFileAndRange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 279). 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":"modules/git/repo_commit.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dc00051ff20462f7be266ade07b44cafb823cb4c95d97558dd64edf1c672ad7"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.getCommitWithBatch (cognitive 17): Repository.getCommitWithBatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/repo_commit_nogogit.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b7ef61ce6d92f5430d8f451221834433544377c314034cf6cdbefa1d289c213"}},{"ruleId":"D2","level":"warning","message":{"text":"stats.populateRepoIndexer (cognitive 17): stats.populateRepoIndexer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, match/switch 5, 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":"modules/indexer/stats/indexer.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b84398a4693360bc1598f5d3b2412039ef01191e97db9c0aaa59a0b29851fcf"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.visitNodeImg (cognitive 17): markup.visitNodeImg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 6, 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":"modules/markup/html_node.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc2ef9ddf3d18b137d48f597cb36c72d216c7a90b247453d5125461d28c2ed32"}},{"ruleId":"D2","level":"warning","message":{"text":"jupyter.renderCellCode (cognitive 17): jupyter.renderCellCode 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":"modules/markup/jupyter/jupyter.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc06d46004c30f358946d3345982f9ac2acd929e3efd56d9b0c9f5a21076056"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.loadSSHFrom (cognitive 17): setting.loadSSHFrom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, 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, 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":"modules/setting/ssh.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"811f7d2db5afc864f3a99df32a8d612deab772a65f8324f3f05c8604ec76d470"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.getStorageForLocal (cognitive 17): setting.getStorageForLocal 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":"modules/setting/storage.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"39461c4ac0cfd1bd77969ca507317bdaa49fa0131c32428c6bfaaebe66ba1103"}},{"ruleId":"D2","level":"warning","message":{"text":"svg.renderHTML (cognitive 17): svg.renderHTML 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":"modules/svg/svg.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"70ce54ad32ed0f95853e030225ccf9e8fd90f33ea71ff660ec955d2fdb58fa83"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.uploadJobSummary (cognitive 17): actions.uploadJobSummary 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":"routers/api/actions/job_summary.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"f539b57f7b198bdd488a7d8baf54bf39d891cf0025c6e779a121188b9fe94053"}},{"ruleId":"D2","level":"warning","message":{"text":"artifactRoutes.getDownloadArtifactURL (cognitive 17): artifactRoutes.getDownloadArtifactURL has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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":"routers/api/actions/artifacts.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"d805337f50500387b924b3fd75530f50c5eec808397bf170f83933778b02849b"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.UpdateTask (cognitive 17): Service.UpdateTask 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":"routers/api/actions/runner/runner.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2cce9df028c1e291ea5e6a09b36cdb1d774c281a9f9cbb3c7e6edff04d66f8e"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.UpdateLog (cognitive 17): Service.UpdateLog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 3, 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":"routers/api/actions/runner/runner.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f152117b8f2a77667abce860c91ab57fc931bd97402c4f5b142e9a20aa17300"}},{"ruleId":"D2","level":"warning","message":{"text":"conda.UploadPackageFile (cognitive 17): conda.UploadPackageFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, match/switch 2 (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":"routers/api/packages/conda/conda.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9ef77749f03b5aebf59eeccce9f6536ef20f450ca72027aef5ba30eb46e3ef9"}},{"ruleId":"D2","level":"warning","message":{"text":"maven.servePackageFile (cognitive 17): maven.servePackageFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 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, 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":"routers/api/packages/maven/maven.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"71dbaaa03ca5154f1c1065435e8cc8e0a6f7708889eff1b4bd2a72261421ec1f"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.EditUser (cognitive 17): admin.EditUser has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, match/switch 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":"routers/api/v1/admin/user.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6fb4661e01f62068d95ddeadf80a619eab626f057f199d152b66c3c20a5aa45"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.GetRawFileOrLFS (cognitive 17): repo.GetRawFileOrLFS has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"routers/api/v1/repo/file.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ee52ce9c3338accda4939fc2d0d2d825335fa4bb1ed9b17595456327e84ba9"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.GetIssueDependencies (cognitive 17): repo.GetIssueDependencies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/issue_dependency.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"f51c735b17ae3885a2ef3ccbdee25f46dfa8b7f3e4d229e8a9f5494496537497"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.GetPullRequestByBaseHead (cognitive 17): repo.GetPullRequestByBaseHead 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":"routers/api/v1/repo/pull.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"3903721f736d04490a89a5ffd9e079125de5bd2c7323dfd10be83a79eb8081ba"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.ResolveRefCommit (cognitive 17): utils.ResolveRefCommit 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":"routers/api/v1/utils/git.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9b7ebe2fd99d69017a542c8bc40780530dc7b9b8303a886a228db3d94961e88"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.EditAuthSourcePost (cognitive 17): admin.EditAuthSourcePost has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, 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":"routers/web/admin/auths.go"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb150bf9aaac6da4d0255aa8209a5180ed3d353ce9a3c5839b7624b2ddda1b41"}},{"ruleId":"D2","level":"warning","message":{"text":"web.avatarStorageHandler (cognitive 17): web.avatarStorageHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 31, 53). 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":"routers/web/base.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd9cb510cd0356835f2358565b3e2a8344dcbe8c967b9760ce55fcfcb37c76c"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.autoTitleFromBranchName (cognitive 17): repo.autoTitleFromBranchName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/compare.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"07e5a06a3749325c77e6a0faa0977e6d46473206a522fa99d666540e7b73b5cc"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.EditFile (cognitive 17): repo.EditFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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":"routers/web/repo/editor.go"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9bc70557de1364321cfab1532dcd2f6729187d73621e4751e5dc64ae84c2729"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ForkPost (cognitive 17): repo.ForkPost 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":"routers/web/repo/fork.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb89a14487aa8f722719a9ea40d9ba49f13ad4b864c727dde884bf710e6a515a"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.UpdateIssueContent (cognitive 17): repo.UpdateIssueContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 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":"routers/web/repo/issue.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"e297e168a92a35097550c5fe99b142d785c2632998a7f7eeaaa090ad064d04a5"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.AddDependency (cognitive 17): repo.AddDependency 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/issue_dependency.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ac15bdbfbe926e70967a4b678e99e668d31b48de2914b3ae9181ff0e5d7af5"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.findReadmeWellKnownSubDirs (cognitive 17): repo.findReadmeWellKnownSubDirs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, match/switch 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/view_readme.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60bd3fc5ea7fe04247783b3c7f6bf6d2b167834d22a3940eb954fd501f6f083"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.checkRunConcurrency (cognitive 17): actions.checkRunConcurrency has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 4). Of this number, 13 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/job_emitter.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a025980b10338beac5ef0cf6a2c693f26c89e681f82d897504a3ae0c687fc36"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.loadReusableWorkflowSource (cognitive 17): actions.loadReusableWorkflowSource has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"services/actions/reusable_workflow.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"827a7751fe47dd55190e04bdd788580eefeec494974cc87ef2379b98e5b94680"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.PickTask (cognitive 17): actions.PickTask has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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":"services/actions/task.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"d93efd79c1db092d3f16150085e40b97d1ec6f9ced238dcaa739c27b517e146c"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.DispatchActionWorkflow (cognitive 17): actions.DispatchActionWorkflow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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":"services/actions/workflow.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef912ffd6bc69d0525eb0ef9a4486c36d6abe905bf58860e36d5a72bb56b1f64"}},{"ruleId":"D2","level":"warning","message":{"text":"rerunPlan.collectMatrixCollapse (cognitive 17): rerunPlan.collectMatrixCollapse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, 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":"services/actions/rerun.go"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e97e4654a8be065d5c7a5938536b37fa5da2b8bbdc1692046bd5318fefc8126"}},{"ruleId":"D2","level":"warning","message":{"text":"Source.Authenticate (cognitive 17): Source.Authenticate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 4, match/switch 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":"services/auth/source/smtp/source_authenticate.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"354eb2afddbe55e0d77cb4c8dd6863818d50667ade08d1ec900d53108405b6b2"}},{"ruleId":"D2","level":"warning","message":{"text":"doctor.deleteOrphanedRepos (cognitive 17): doctor.deleteOrphanedRepos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 4, 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":"services/doctor/repository.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"d25ea1c2d028ea3d704f804b5901eed40542056267470aa107970b78cafe76f9"}},{"ruleId":"D2","level":"warning","message":{"text":"feed.NotifyWatchers (cognitive 17): feed.NotifyWatchers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/feed/feed.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30e2c1108adda7b838eda3f9213bbf139a4ae44418a82ad6acece8138fd479d"}},{"ruleId":"D2","level":"warning","message":{"text":"git.GetCompareInfo (cognitive 17): git.GetCompareInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/git/compare.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa3cc7b0c0e088b829eb58937bf6746919652d3d2ee279daea301c31e14e2d5"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.SyncUserSpecificDiff (cognitive 17): gitdiff.SyncUserSpecificDiff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 3, 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":1518}}}],"partialFingerprints":{"codehealthFindingId/v1":"7866d727ec4ce4154be3db0344b418448ca74985f1607b0cce51d6ce232b29f6"}},{"ruleId":"D2","level":"warning","message":{"text":"lfs.buildObjectResponse (cognitive 17): lfs.buildObjectResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"services/lfs/server.go"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae4b67573d54dc42ff741df8b0d5f6153bed40a1b28067ae9109550752e8e617"}},{"ruleId":"D2","level":"warning","message":{"text":"CodebaseDownloader.GetPullRequests (cognitive 17): CodebaseDownloader.GetPullRequests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/migrations/codebase.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb42e991e849cd12c3a3daecc0dc04bcb6d652719e937c95a73a17eca8ebba5e"}},{"ruleId":"D2","level":"warning","message":{"text":"org.AddTeamMember (cognitive 17): org.AddTeamMember has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2 (nesting depth added 4). 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 227, 264). 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":"services/org/team.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a996eb96dca21f7a043b280f358c0d7fe386337ccc4aa5feb4ad330446d75b1"}},{"ruleId":"D2","level":"warning","message":{"text":"org.removeTeamMember (cognitive 17): org.removeTeamMember has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, 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":"services/org/team.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"293612ece498e757eeefeca9e92829c7b0c3941f5a24a99f2dc9a6366d6b3618"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.CreatePushPullComment (cognitive 17): pull.CreatePushPullComment has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 123). 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":"services/pull/comment.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbd89bed0d4cba8e873cca70b92e65efb433fcf6f39ddcb4168d80d99877ee65"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.resolveLicenses (cognitive 17): repository.resolveLicenses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, 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":"services/repository/license.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"069f26c2175d7404022687c122df7478a17e64459fbcd4f7482914b59788117c"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.getCompareURL (cognitive 17): repository.getCompareURL has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, 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":"services/repository/push.go"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"d075602e255de53641a351d64e39e718b56e3a9908dc4660b13dffdfdcb02ad0"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_13.CreateReviewsForCodeComments (cognitive 16): v1_13.CreateReviewsForCodeComments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 6). Of this number, 8 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":"modelmigration/v1_13/v147.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e092eb58754baf62dfada26499fe53217aa2e150df55f08a3a05230b80e4576"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_19.batchProcess (cognitive 16): v1_19.batchProcess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 8). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_19/v233.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"730c510823f302dcd53ce8bf481f4d12b7a80c6c9bbf96d58271ac2a9b7d387d"}},{"ruleId":"D2","level":"warning","message":{"text":"v1_20.ConvertScopedAccessTokens (cognitive 16): v1_20.ConvertScopedAccessTokens has cognitive complexity 16 (threshold 15). Drivers by points: loops 9, if/else 7 (nesting depth added 8). 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":"modelmigration/v1_20/v259.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a4469449d3cd585adfb83ff1cb02f652d5c2860a4c9c267a024f7f2e680c71"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.CollectAllDescendantJobs (cognitive 16): actions.CollectAllDescendantJobs 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":"models/actions/run_job.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"a844f396bd7b2d6763c3440b83fa7c1e03660133cbfb0e9883e9afce6acaccf7"}},{"ruleId":"D2","level":"warning","message":{"text":"FindRunnerOptions.ToConds (cognitive 16): FindRunnerOptions.ToConds 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":"models/actions/runner.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d7ddcfbb818ec4f5abb8c37b110ba4e3d4e6272ee17adb25177afb633bfbb5b"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationList.LoadUsers (cognitive 16): NotificationList.LoadUsers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/activities/notification_list.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf0e850359811b191e5b0cca324f7c2a9c82ef3720333d8d9f02125ae1fc674"}},{"ruleId":"D2","level":"warning","message":{"text":"NotificationList.LoadComments (cognitive 16): NotificationList.LoadComments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/activities/notification_list.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b6b5e806ae2c7e269a584cf6d69c52e4e36de86c0da182997a6f1960c10a182"}},{"ruleId":"D2","level":"warning","message":{"text":"git.GetNextCommitStatusIndex (cognitive 16): git.GetNextCommitStatusIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/git/commit_status.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"05ba6a58219d49159ae213c800751c24198efc00a74614bda813069ec8e68ed2"}},{"ruleId":"D2","level":"warning","message":{"text":"issues.RemoveTeamReviewRequest (cognitive 16): issues.RemoveTeamReviewRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 881). 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":"models/issues/review.go"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"1921232ee3bbcf7524ba7a5203bfacb5ca3985671e80bf8dd3ab42e6942ad1a5"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueList.LoadLabels (cognitive 16): IssueList.LoadLabels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"models/issues/issue_list.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"1621cbda04a9cae12d841218fbb4bc2d30dc92b07af486a3edd6674d401f342c"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueList.LoadAttachments (cognitive 16): IssueList.LoadAttachments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"models/issues/issue_list.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"550247a8c73d30bafe76fb21f0c0b7d8ed80fcda4c4d344653b8e0bfaa2d4bae"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueList.loadComments (cognitive 16): IssueList.loadComments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"models/issues/issue_list.go"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e057d6a8e1ece68461689151fb6f952afd8c5a40d1f43f17a462de148d7902c"}},{"ruleId":"D2","level":"warning","message":{"text":"PullRequest.getReviewedByLines (cognitive 16): PullRequest.getReviewedByLines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"models/issues/pull.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"f414ddd0edcf1863017cc443daf2bbfbfb1b6f3d79cd407f35b836d837ca512a"}},{"ruleId":"D2","level":"warning","message":{"text":"access.RecalculateUserAccess (cognitive 16): access.RecalculateUserAccess 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":"models/perm/access/access.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f921831a76a1ca6d63a546aa5768946ab81a347ff91c71b1bae475e2c04316e"}},{"ruleId":"D2","level":"warning","message":{"text":"user.IsUserVisibleToViewer (cognitive 16): user.IsUserVisibleToViewer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, 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":"models/user/user.go"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"de54d1680ff0dc486c5c675332a9e2ed4447814695346bcd847932593c468843"}},{"ruleId":"D2","level":"warning","message":{"text":"jobparser.validateMatrixFilters (cognitive 16): jobparser.validateMatrixFilters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, 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":"modules/actions/jobparser/jobparser.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e36b82a4f20157d92769a6d920a05806b91fef37bced3ee73be952acdbd968a"}},{"ruleId":"D2","level":"warning","message":{"text":"embeddedFS.getFileInfo (cognitive 16): embeddedFS.getFileInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, 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":"modules/assetfs/embed.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f025cfcad9ab5012845df5b336f819eb0fe13a52aa27264b54414f8fdf5e6c0"}},{"ruleId":"D2","level":"warning","message":{"text":"assetfs.listAllFiles (cognitive 16): assetfs.listAllFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 9). 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 181). 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":"modules/assetfs/layered.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"98a29331dd56f4f6fce00ddb5e9482c2e9ae64c73c91a54958a93556981a3049"}},{"ruleId":"D2","level":"warning","message":{"text":"base.NaturalSortCompare (cognitive 16): base.NaturalSortCompare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"modules/base/natural_sort.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d8fae692ed77639552c7a3a34ed79f44f315a8d24624dce8e32921d549d7e92"}},{"ruleId":"D2","level":"warning","message":{"text":"dump.PrepareFileNameAndType (cognitive 16): dump.PrepareFileNameAndType 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":"modules/dump/dumper.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc653885f35be0ead4fa2973ad82c200e5108945fb1a7db3179fa885fd00e92"}},{"ruleId":"D2","level":"warning","message":{"text":"git.CommitMessageMerge (cognitive 16): git.CommitMessageMerge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/commit_message.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0e2b78f411f6800923fb1c634090f9817098883595e66611dac15c1535df3fc"}},{"ruleId":"D2","level":"warning","message":{"text":"git.Clone (cognitive 16): git.Clone 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":"modules/git/repo.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"4199e8abf2a4b65f34dd049518b5238c541539eb2eeedc02dfef71e8a1023080"}},{"ruleId":"D2","level":"warning","message":{"text":"graceful.RestartProcess (cognitive 16): graceful.RestartProcess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"modules/graceful/restart_unix.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"7748a514784a4242d2559dd45dad9962e3d3c006fe3c5e30b9bdae5de3ab6c93"}},{"ruleId":"D2","level":"warning","message":{"text":"traceBuiltinSpan.toString (cognitive 16): traceBuiltinSpan.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, 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":"modules/gtprof/trace_builtin.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb6810fe94685e148cfa86c3d0e2dc57118feffc2a7e5d9d475e0a0ee39adb0"}},{"ruleId":"D2","level":"warning","message":{"text":"code.index (cognitive 16): code.index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"modules/indexer/code/indexer.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0b2f2a170a71a8583518da934ca29775abb3f3724a559f41d434093b1ad65d"}},{"ruleId":"D2","level":"warning","message":{"text":"conan.readSections (cognitive 16): conan.readSections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/packages/conan/conaninfo_parser.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"70c6576b68cf6e6989e5cb51f3371a55808487fb757cea19923c3cbba3b8824b"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.fillLicensePlaceholder (cognitive 16): repository.fillLicensePlaceholder has cognitive complexity 16 (threshold 15). Drivers by points: loops 13, if/else 2, boolean chains 1 (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":"modules/repository/license.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbbe256279cdef3318d4efcf273f888a1ba89e167587eb7a120230b7f6495070"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.loadMarkupFrom (cognitive 16): setting.loadMarkupFrom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, match/switch 4, boolean chains 3, loops 3 (nesting depth added 4). Of this number, 13 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/setting/markup.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ff9644d28f4d3b4f6e1d89f5bc1552e8cf4cdcce45ab19c77310020251efdc"}},{"ruleId":"D2","level":"warning","message":{"text":"util.WriteRegularPathFile (cognitive 16): util.WriteRegularPathFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"modules/util/path.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d4ff06fc1f627b01cf1d4da4132ff266635a251fad2dc63394ce90519bac88d"}},{"ruleId":"D2","level":"warning","message":{"text":"util.TimeEstimateParse (cognitive 16): util.TimeEstimateParse 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":"modules/util/time_str.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1c0e019cac703e48c40bc491a0a71510e2ba6d27769ddf80c69b89aeec7dd6"}},{"ruleId":"D2","level":"warning","message":{"text":"util.ellipsisDisplayString (cognitive 16): util.ellipsisDisplayString 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":"modules/util/truncate.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e72a34ec7aade31cdef681a8cc66c2a3cd4c1b63d9913f10ffbefbcb8dd3de"}},{"ruleId":"D2","level":"warning","message":{"text":"artifactV4Routes.createArtifact (cognitive 16): artifactV4Routes.createArtifact has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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, 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":"routers/api/actions/artifactsv4.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64511913f34a7e8a31a9d7b835e1d67f27e47da3c8fe4321a96f48066ea51eb"}},{"ruleId":"D2","level":"warning","message":{"text":"alpine.UploadPackageFile (cognitive 16): alpine.UploadPackageFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, match/switch 2 (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":"routers/api/packages/alpine/alpine.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eed6697bf2554c06f43effcac23698b5f1b732afa8eeff65874a696a1c4f3db"}},{"ruleId":"D2","level":"warning","message":{"text":"npm.deprecatePackage (cognitive 16): npm.deprecatePackage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 7). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 273). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/npm/npm.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8822c94bb6f4b568196921fcea9833ff36ccb3bb6c98cc9cf3f20e0c8d11d87"}},{"ruleId":"D2","level":"warning","message":{"text":"nuget.UploadSymbolPackage (cognitive 16): nuget.UploadSymbolPackage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, match/switch 5, loops 2 (nesting depth added 5). 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, 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":"routers/api/packages/nuget/nuget.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"455de0409bf83e7d7d80e2c96a8c5c1cfcf27ba7fda62ade618226b651b74339"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.GetIssueBlocks (cognitive 16): repo.GetIssueBlocks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"routers/api/v1/repo/issue_dependency.go"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d28197283c626fa30a671580c0fbe11246fdc3aaf877c1b6f8c99ba773f672"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.ListTrackedTimes (cognitive 16): repo.ListTrackedTimes 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, 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":"routers/api/v1/repo/issue_tracked_time.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"1827645242b1dc84b9cd897afc45414837341d2dc4cde05834af3076c3efcf66"}},{"ruleId":"D2","level":"warning","message":{"text":"user.AddEmail (cognitive 16): user.AddEmail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"routers/api/v1/user/email.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"4661ceb30655bcd4bdabb3255cd66d0dd08c3a0c25c1eadd8562a882a2b6c75f"}},{"ruleId":"D2","level":"warning","message":{"text":"common.DownloadActionsRunAllJobLogs (cognitive 16): common.DownloadActionsRunAllJobLogs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"routers/common/actions.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6c6dc334aa1ce9f60441fd76b164bb96f9bd52280541ec4be6764bb9f6ac8e"}},{"ruleId":"D2","level":"warning","message":{"text":"private.writeProcesses (cognitive 16): private.writeProcesses 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":"routers/private/manager_process.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"442cf48bf713ec1aa576ccc0dbec9c7e2f7c74b1ca154e4cb818e9051aac5cf9"}},{"ruleId":"D2","level":"warning","message":{"text":"org.getUnitPerms (cognitive 16): org.getUnitPerms has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"routers/web/org/teams.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d4318290be218bd3f4a0a58027260cfdde215cd80c605fbca35250acb9a7d9"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.getCurrentRunJobsByPathParam (cognitive 16): actions.getCurrentRunJobsByPathParam has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 1, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/actions/view.go"},"region":{"startLine":1103}}}],"partialFingerprints":{"codehealthFindingId/v1":"a34d91db625f5579f28c8ebc5e993041c8979bd6507e67d7e669cff464800c37"}},{"ruleId":"D2","level":"warning","message":{"text":"actions.disableOrEnableWorkflowFile (cognitive 16): actions.disableOrEnableWorkflowFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (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":"routers/web/repo/actions/view.go"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"72adba78b72678790e75af03b573e4601ce134a01302be73b67c9d24e4683b56"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.prepareRecentlyPushedNewBranches (cognitive 16): repo.prepareRecentlyPushedNewBranches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, 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":"routers/web/repo/common_recentbranches.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0dde0dd18faa14f1668c47e3378d8085dd48947bac662f6d65dacfc77b08400"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.setCsvCompareContext (cognitive 16): repo.setCsvCompareContext has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 3). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 87). 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":"routers/web/repo/compare.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"95dce4bb50949fcb4b294acf865c188bcca5871f630b80375c1873b32b76ec6f"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.SubmitReview (cognitive 16): repo.SubmitReview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/pull_review.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba699d6d3da0182081f8e2107515773e3f556c7d1838aa3882ab331b5d7f6f3"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.renderDirectoryFiles (cognitive 16): repo.renderDirectoryFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 1 (nesting depth added 4). Of this number, 11 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/view.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f1d50b57635f9b9b57d69db0a7b68681c49f5bef097afc8a32fa4333ba250cd"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.Home (cognitive 16): repo.Home has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"routers/web/repo/view_home.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"7816251a31b8108a86336d96a8a43bdee9df38b856908d83db1ca3b1b8190cf8"}},{"ruleId":"D2","level":"warning","message":{"text":"repo.WikiRaw (cognitive 16): repo.WikiRaw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"routers/web/repo/wiki.go"},"region":{"startLine":599}}}],"partialFingerprints":{"codehealthFindingId/v1":"90fa694ff6d0835aa1dd7655c9f234b16811fb80101ab1a2f4082f4c839b1d1c"}},{"ruleId":"D2","level":"warning","message":{"text":"IssuePageMetaData.retrieveProjectCardsForExistingIssue (cognitive 16): IssuePageMetaData.retrieveProjectCardsForExistingIssue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"routers/web/repo/issue_page_meta.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf138fa7a107fabf4fc19660644ee8165c26b4d682e66527a4ecf2ca84d65ce"}},{"ruleId":"D2","level":"warning","message":{"text":"setting.handleSettingsPostUpdate (cognitive 16): setting.handleSettingsPostUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, match/switch 7, 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aaa773ff62c7e2e5e65863a6ac6d5bd5dfab60260df3167f58a8ee564f6302c"}},{"ruleId":"D2","level":"warning","message":{"text":"user.prepareContextForProfileBigAvatar (cognitive 16): user.prepareContextForProfileBigAvatar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"routers/web/shared/user/header.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c81edcdefe4ad5d838cff8c0859966d1f7699e7882c7f64650ebb145369710"}},{"ruleId":"D2","level":"warning","message":{"text":"user.ListPackages (cognitive 16): user.ListPackages 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":"routers/web/user/package.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab96f4d7a069869992780249079d2380d212c2600968643090e8290def58284"}},{"ruleId":"D2","level":"warning","message":{"text":"CustomURLSettings.OverrideWith (cognitive 16): CustomURLSettings.OverrideWith has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5 (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":"services/auth/source/oauth2/urlmapping.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"85fbecbc7eacf8c2899affba89142b31e8f5000b44488a89e4a2764328ddc94e"}},{"ruleId":"D2","level":"warning","message":{"text":"smtp.Authenticate (cognitive 16): smtp.Authenticate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/auth/source/smtp/auth.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b211d447ba4b9eab4953454d98146a6da8da47ba560470c242b779e8ab5077d"}},{"ruleId":"D2","level":"warning","message":{"text":"convert.loadPullRequestsForRun (cognitive 16): convert.loadPullRequestsForRun has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 1, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/convert/convert.go"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa578d75e09bd720917b322fb95e668f3d1c4db57b4aed93a9e1b4009173dc30"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.highlightCodeLines (cognitive 16): gitdiff.highlightCodeLines 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":1461}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff999effa5f8bd398c6a1c3b6e9c70c2be629ec2466a781710a10faacb853550"}},{"ruleId":"D2","level":"warning","message":{"text":"gitdiff.extractDiffToken (cognitive 16): gitdiff.extractDiffToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"services/gitdiff/highlightdiff.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b714e6c16883c099799b4a0ca3fd3a57b77a503059134688a71c22b8652ae6"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.RemoveAssignees (cognitive 16): issue.RemoveAssignees has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 252). 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":"services/issue/assignee.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"02463730ac48918689d425f2f6625f550fdc7aa124ae17102687f0438819a372"}},{"ruleId":"D2","level":"warning","message":{"text":"issue.LoadCommentPushCommits (cognitive 16): issue.LoadCommentPushCommits has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/issue/comments.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"632f2f6d494ddae2e99f4c766f3545ff70f46305e54da8efed22400b7e1674af"}},{"ruleId":"D2","level":"warning","message":{"text":"mailer.mailIssueCommentToParticipants (cognitive 16): mailer.mailIssueCommentToParticipants has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"services/mailer/mail_issue.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a9c03934c67cf3bccfe96969053e8587ed11a0a79830523ccc42faddee938a"}},{"ruleId":"D2","level":"warning","message":{"text":"markup.renderRepoIssueIconTitle (cognitive 16): markup.renderRepoIssueIconTitle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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":"services/markup/renderhelper_issueicontitle.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"182747a02b9a6be48cb21d94b464df4c5079ee2be3aed9e86fc8b12ec4d7328a"}},{"ruleId":"D2","level":"warning","message":{"text":"migrations.updateMigrationPosterIDByGitService (cognitive 16): migrations.updateMigrationPosterIDByGitService has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, match/switch 5, 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":"services/migrations/update.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3ad16df273ccf1a50a2f8498db86b1542bacc31bbd895e1489718f5b1dd2aa2"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.MergeRequiredContextsCommitStatus (cognitive 16): pull.MergeRequiredContextsCommitStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, 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":"services/pull/commit_status.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0aa51b4bb6f8f9111d1d360456f0d82e986dac67e5ec148e0849fc95190247"}},{"ruleId":"D2","level":"warning","message":{"text":"pull.IsHeadEqualWithBranch (cognitive 16): pull.IsHeadEqualWithBranch 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":"services/pull/pull.go"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2e3bb1c428935ea894ec90416dfb2279be3e23e4384e3f0fa02d5a058767080"}},{"ruleId":"D2","level":"warning","message":{"text":"Graph.LoadAndProcessCommits (cognitive 16): Graph.LoadAndProcessCommits has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"services/repository/gitgraph/graph_models.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9fd8e74d53977df8d6588d9da63a8ea61453ca76f644eec916e179772630098"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Repository: TooManyMethods \u2014 80 methods, declared across 18 files: git/repo_commit.go (21), git/repo_index.go (9), git/repo_tag.go (8), git/repo.go (6), \u002B14 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":"modules/git/repo_base_nogogit.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d83046e0aa327656e1a5ecf619c2b297401dd8da3df9ab983ee7dd3beb0659"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: v1/api.go: FileTooLong \u2014 1327 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":"routers/api/v1/api.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cda5346ccd8ff96c761f10866e9d6cce46ef0db4620a621f9e0e25399f267ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: web/web.go: FileTooLong \u2014 1308 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: registerWebRoutes (330-1794). 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":"routers/web/web.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dea62bd0ce9149c07ed1ab983463aec2bc012a63eac1806cb79093a11d21c708"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/pull.go: FileTooLong \u2014 1093 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":"routers/web/repo/pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe7695c3a6b20aab3452c20c175b1931b3427f144fc331ca407579ea194527e6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: gitdiff/gitdiff.go: FileTooLong \u2014 1035 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e77f738099243ccb10653f2f693b5ee3b4ad89d3edcd3fef029a1a3da0e7f7b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: actions/view.go: FileTooLong \u2014 982 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":"routers/web/repo/actions/view.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d636a0bdb97bc5924d9381202eb451a846500d1db22eef47d3441e897603439a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Repository: TooManyMethods \u2014 57 methods, declared across 6 files: repo/repo.go (43), repo/avatar.go (4), repo/issue.go (4), repo/repo_location.go (4), \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":"models/repo/repo.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b836091f6470d4e6a5a52534e23483d6ec2813bdb29518d3df1399452a479c6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NullNotifier: TooManyMethods \u2014 52 methods. Most of these members implement notify.Notifier (52 of 52 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":"services/notify/null.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e697566d32069e9f43563afb497e4a7c4d28398ae76825e34bf1cdee597370"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: issues/comment.go: FileTooLong \u2014 858 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":"models/issues/comment.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42cb8aa780a8b1312e8be6a1f41158c9ab089eb94184b4440d0aaf8c0a1a7b7b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: user/user.go: FileTooLong \u2014 849 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":"models/user/user.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6091bacb8b30a272b0770efd0f517c5d1873ef02c276c3636e5e95801bb15a1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Issue: TooManyMethods \u2014 49 methods, declared across 5 files: issues/issue.go (39), issues/issue_xref.go (5), issues/issue_project.go (3), issues/assignees.go (1), \u002B1 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":"models/issues/issue.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"544488e28606d3e84c9464bc322f0dfd21b8d60a8b6fb81477a55a1ad3726cc2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/pull.go: FileTooLong \u2014 779 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":"routers/api/v1/repo/pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"828ace49a38af8b7a1a0b71677f22a72322ac228da154b2448aa26491c92db0b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: setting/setting.go: FileTooLong \u2014 761 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"22f37268fa740297dcb7d0fd11f00168d295657a0fdbd8dcb1d8d995ccc7a675"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: webhook/notifier.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":"services/webhook/notifier.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c9b49019f7f58d1698e68b969a462b8bb69e83e76a65106b271541f9341aa5b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Comment: TooManyMethods \u2014 45 methods, declared across 2 files: issues/comment.go (37), issues/issue_xref.go (8). 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":"models/issues/comment.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb5fc7eaf3f1194708c1c221874ababa79b421d3fc98eb79b3f4585425ba71ea"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: convert/convert.go: FileTooLong \u2014 732 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":"services/convert/convert.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db0d4b4879fd033fd5eb1ded25a77ec7f4e288933a7e7743be2a8ede7599314"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/issue_view.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":"routers/web/repo/issue_view.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8462de56d22ab19ce575c8b76e149e5ff4bd6ce933a5f10f2d3a59de18c30269"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: context/repo.go: FileTooLong \u2014 696 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":"services/context/repo.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae075c010b87b0672706f8923aa397181b0ad95b1937768a82d9861f62d50d74"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pull/pull.go: FileTooLong \u2014 691 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":"services/pull/pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcec458c25cd5a6c9a7317c77458ded39586e4cb9be771b15d6133b8fc9a7ef5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: webhookNotifier: TooManyMethods \u2014 41 methods. Most of these members implement notify.Notifier (41 of 41 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":"services/webhook/notifier.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb1345c8a03fbd06d4ae47781f110fbdb5c3e411370a7e319e23e6a5a2acefd5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: User: TooManyMethods \u2014 40 methods, declared across 3 files: user/user.go (34), user/avatar.go (4), user/user_system.go (2). 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":"models/user/user.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb9fe15e528d3d01e3039c53e9ce7b96416721fa3b1012440d8a0cf2f18d25a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/branch.go: FileTooLong \u2014 658 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":"routers/api/v1/repo/branch.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c8eb1904621e6f9bff83d390717f84ae13abe6fee0b648b3633fd7b9ba9de0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: issues/review.go: FileTooLong \u2014 656 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":"models/issues/review.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"88667b7cbe44260a75910c156e42835cdaca206bc67b217e3c5b32492d69fa47"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/repo.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":"routers/api/v1/repo/repo.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb36d1ce866a466e0c2ed419636a277af18d120268fd95c060623dfa7a686c7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: issues/pull.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":"models/issues/pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11c8c747672de5ab984842fae89bd34cf8a0ec08799f2f27a13cc84139a7037"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Command: TooManyMethods \u2014 36 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/gitcmd/command.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7de5b1aa822b47a27c475b79be1a4817e09536a848c21841fb54ded200aeb6f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: actionsNotifier: TooManyMethods \u2014 36 methods. Most of these members implement notify.Notifier (35 of 36 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":"services/actions/notifier.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfa19154df09974dd5e83c4b38d7dbac3f5cf5ec5c7e7a0eccbdf9a4052cb4df"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/auth.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":"routers/web/auth/auth.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"67421cf28a77067a9080434b3415a032c72bab56d4cb3d5b66216ca5d684552b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/action.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":"routers/api/v1/repo/action.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ee65363bbaeba41a8a71a6ba9a6a83be171afb6c7ea5347a083b4b3c57310e4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: actions/notifier.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":"services/actions/notifier.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"530e55c6179b7c051d535e69a56f84d31ce15d73438df9c0942ffa3f07e4dad6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: actions/actions.go: FileTooLong \u2014 568 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":"routers/web/repo/actions/actions.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"052b5bc44fd9018bbfaf76872a63dab0029464a173cbac7a9fdf7bc2e8c7707b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Base: TooManyMethods \u2014 33 methods, declared across 3 files: context/base.go (19), context/base_form.go (8), context/base_path.go (6). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/context/base.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"420e1790d15b0cccd19f8df6734ca3aaad1e9a131b8e86cd85ca398b9616b7df"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/repo.go: FileTooLong \u2014 546 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":"models/repo/repo.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ced06fdc8705e1b8ba659274316df54f8f4f1565f2f5d1df83f33f2686383cbf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repository/branch.go: FileTooLong \u2014 542 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":"services/repository/branch.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccf2c2c927cab49ffd3ea0919c09fb0853f84437d6fa5f344416c31ea89d455d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: user/home.go: FileTooLong \u2014 541 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":"routers/web/user/home.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"72cdf7e458533777fcb256e4d7a1cee31f928ab96147c68505c334a88b8b303a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: actions/workflows.go: FileTooLong \u2014 525 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":"modules/actions/workflows.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d43e85d3a0f094dd57af3cfa6fe089f742edabf0bb95068bd5045824bb6f2b4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: conan/conan.go: FileTooLong \u2014 519 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":"routers/api/packages/conan/conan.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6255a34f85a612eea7917d2fd996eebe45b305bc6cecabd59e3e1f38d0999f89"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Action: TooManyMethods \u2014 31 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":"models/activities/action.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f9292e33463fcf4c82d26ee4432a9b0f8f692ea2bbd0297724ddac74585f574"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Manager: TooManyMethods \u2014 31 methods, declared across 5 files: graceful/manager.go (17), graceful/manager_unix.go (5), graceful/manager_common.go (4), graceful/context.go (3), \u002B1 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":"modules/graceful/manager_common.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb406888fff9acf1c64ec980ade266b389819849eaf8c340e4a5f63b121719f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/issue_list.go: FileTooLong \u2014 516 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":"routers/web/repo/issue_list.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c95669a959ad680f0593eb2569ddbcb79447ec44c06c6f6e26844c1be91ee369"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/projects.go: FileTooLong \u2014 512 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":"routers/web/repo/projects.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e918a52cc6e9b2f8c51ff685368141bd8bd8336b63f2bd9e4f1e53f157a7e62"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repo/compare.go: FileTooLong \u2014 505 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":"routers/web/repo/compare.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"07028eed7d1d52360198353997a54d6a1cf4dc1f82adca8aa0eea9b01be62e99"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: container/container.go: FileTooLong \u2014 504 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":"routers/api/packages/container/container.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a80b5bb5125dd5ae9b293bd205de8abc66843a72d521b0508d4b09ce7ce51f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/oauth2_provider.go: FileTooLong \u2014 501 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":"routers/web/auth/oauth2_provider.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3983002114636ec2503d471763a75c63989cc01b807bcf9b21dcc87967d8fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): modules/actions/workflows.go:667-689 | modules/actions/workflows.go:707-729 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/actions/workflows.go:667\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":"modules/actions/workflows.go"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f083f84f8c8327f0e70c495cfa891e0cd232b5595243767639a157680054507"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): models/auth/source.go:229-247 | models/auth/source.go:324-342 \u2014 both copies are in the same file, so extract the block 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 \u0060models/auth/source.go:229\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":"models/auth/source.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"506b24c88e22ca27335bd26ac52ea2a7be933d15a77cd098b7801435e18b7987"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): services/packages/alpine/repository.go:78-95 | services/packages/arch/repository.go:136-153 | services/packages/debian/repository.go:110-127 | services/packages/rpm/repository.go:103-120 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/packages/alpine/repository.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9592984cc6fa7f7f1338c7a375f472e86516d57e77251dad92a9d041e79d088"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): services/packages/debian/repository.go:385-403 | services/packages/rpm/repository.go:303-320 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060services/packages/debian/repository.go:385\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":"services/packages/debian/repository.go"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"48897ba6c3fdd9dfbea51d1d26df993cce679d5c61c716dd62bdb1e481dc0944"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 4): modules/packages/chef/metadata.go:73-89 | modules/packages/cran/metadata.go:85-101 | modules/packages/helm/metadata.go:72-88 | modules/packages/vagrant/metadata.go:32-48 \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 \u0060modules/packages/chef/metadata.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. 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":"modules/packages/chef/metadata.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1ca156a65677425fabf2a0afb0c3b083c57ee1674fd96233ea2ad760f4dea3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): modelmigration/v1_20/v259.go:169-185 | models/auth/access_token_scope.go:391-407 \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 \u0060modelmigration/v1_20/v259.go:169\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":"modelmigration/v1_20/v259.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d0c13dc68eb0c4de3a71efc69efa57a6c3116f838f06f34087c9f5946840cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): routers/api/packages/debian/debian.go:275-291 | routers/api/packages/rpm/rpm.go:293-309 \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 \u0060routers/api/packages/debian/debian.go:275\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":"routers/api/packages/debian/debian.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c36799fa4bb6c977b18a6629cba8998ba8bf9c472d293ee5674331582198742"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): models/activities/notification_list.go:289-305 | models/activities/notification_list.go:381-396 | models/activities/notification_list.go:429-444 \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 \u0060models/activities/notification_list.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/activities/notification_list.go"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"d78264b70a448241faa8901d0b1a294dab7fc5299afb3dfb6ea7ff9b1d47315e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): modelmigration/v1_20/v259.go:201-216 | models/auth/access_token_scope.go:250-265 \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 \u0060modelmigration/v1_20/v259.go:201\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":"modelmigration/v1_20/v259.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ded05516f16ae423260c81a82cdf6e27df9b60a379dac3bd100895672f3e423"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): models/issues/label.go:394-409 | models/issues/label.go:469-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. 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":"models/issues/label.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"a302313041aaf42438b9c9e5562be4a2bedcd17085ea9bef61a4ad1adf8c3234"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): modules/packages/alpine/metadata.go:135-150 | modules/packages/arch/metadata.go:176-191 \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 \u0060modules/packages/alpine/metadata.go:135\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":"modules/packages/alpine/metadata.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3e0260c933dd38dcb2782f61597b9a2fa5a9e0f9e49c669ca53f97d197b413"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): routers/api/packages/helm/helm.go:114-129 | routers/api/packages/rubygems/rubygems.go:172-188 \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 \u0060routers/api/packages/helm/helm.go:114\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":"routers/api/packages/helm/helm.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad8cda00a4b394d71eded9b1764b0b1f2e3310d8f354c67f1551581686034266"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): services/migrations/restore.go:161-176 | services/migrations/restore.go:253-268 \u2014 both copies are in the same file, so extract the block 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 \u0060services/migrations/restore.go:161\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"services/migrations/restore.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"8375e7a507e1604f8346fc4d06f9f5395bbbf9e983c2c72c4d4199f55ac9f00a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 5): routers/api/packages/alpine/alpine.go:115-129 | routers/api/packages/conda/conda.go:193-207 | routers/api/packages/debian/debian.go:127-141 | routers/api/packages/generic/generic.go:89-103 | routers/api/packages/vagrant/vagrant.go:149-163 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/alpine/alpine.go:115\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"routers/api/packages/alpine/alpine.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13e575db97fee0fc7d3d700143aa92c5beead5c048b147dd94c98d0b18d032d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): routers/api/packages/conan/conan.go:342-356 | routers/api/packages/cran/cran.go:155-169 | routers/api/packages/rubygems/rubygems.go:204-218 \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 \u0060routers/api/packages/conan/conan.go:342\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":"routers/api/packages/conan/conan.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"f301ccafe2a4a61acadaf226b5de80b913ba9624f7921437f168beb7c39372f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): routers/api/v1/org/action.go:281-295 | routers/api/v1/repo/action.go:247-261 | routers/api/v1/user/action.go:296-310 \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 \u0060routers/api/v1/org/action.go:281\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":"routers/api/v1/org/action.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"a02c1cb5595b0609af9cc4751646403a7470e06970250f0f8ccf1a5667d26461"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): routers/api/v1/org/action.go:449-463 | routers/api/v1/repo/action.go:426-440 | routers/api/v1/user/action.go:205-219 \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 \u0060routers/api/v1/org/action.go:449\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":"routers/api/v1/org/action.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc32487c9db848be1d494937b244a90b0ccff1bbc6776a45f76962ce5033e02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): services/migrations/restore.go:129-143 | services/migrations/restore.go:160-174 | services/migrations/restore.go:252-266 \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 \u0060services/migrations/restore.go:129\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":"services/migrations/restore.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"6863b171c0557545cca00917bc38cd3fbe4c690f693616a760dd834aef23a80f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): models/issues/issue_search.go:242-256 | models/issues/issue_stats.go:150-164 \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 \u0060models/issues/issue_search.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. 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":"models/issues/issue_search.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba5e9148eb82bc6c5074dc966f997c3f5bc40c2cd958cbce34f843fe1c9d4867"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): routers/api/packages/conan/conan.go:430-444 | routers/api/packages/maven/maven.go:382-396 \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 \u0060routers/api/packages/conan/conan.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":"routers/api/packages/conan/conan.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"984b47580646e5d01d48dd1d801ebc51cc2dcd8990431bad7353067bb0e732d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): routers/api/packages/container/container.go:290-304 | routers/api/packages/container/container.go:439-453 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/packages/container/container.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":"routers/api/packages/container/container.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc18f8655eb3a11646f206dfeaa23100bb4f1e7f855c54231d62753e77c7092d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): services/packages/debian/repository.go:187-201 | services/packages/debian/repository.go:292-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 \u0060services/packages/debian/repository.go:187\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":"services/packages/debian/repository.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b9f3fccf34c26975f58c2b2dc7f5cd5bf08cc065bbfe8b8f584fc8445baf87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): services/packages/debian/repository.go:321-335 | services/packages/rpm/repository.go:285-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/packages/debian/repository.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6246285c728d626e9d5c9f2c38fdc8a8f0259da7303e593138f0a00b0416320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): services/webhook/discord.go:215-229 | services/webhook/msteams.go:225-239 \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 \u0060services/webhook/discord.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. 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":"services/webhook/discord.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"8117ad2ac0b04e1f0e54e86be58d41a536a872a68dd2f64c1185e9f815ee0506"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): routers/api/packages/conan/conan.go:187-200 | routers/api/packages/conan/conan.go:248-262 | routers/api/packages/conan/conan.go:799-812 \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 \u0060routers/api/packages/conan/conan.go:187\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":"routers/api/packages/conan/conan.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdf06fd03d059da466c62eb940287640efb9a90cc72209e44f521edcb6e30e9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): routers/api/packages/pub/pub.go:85-98 | routers/api/packages/pypi/pypi.go:54-68 | routers/api/packages/vagrant/vagrant.go:107-120 \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 \u0060routers/api/packages/pub/pub.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":"routers/api/packages/pub/pub.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde89aeddd0d41578c8a6bd41e6167e24ee5689f768b0e9bdfd2719a7629bbdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): routers/api/packages/swift/swift.go:187-200 | routers/api/packages/swift/swift.go:261-274 | routers/api/packages/swift/swift.go:428-441 \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 \u0060routers/api/packages/swift/swift.go:187\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":"routers/api/packages/swift/swift.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"319f30572d0f0c6e5615fd7ef61af395749cbaf8e834b58ab392a9a1955c5b2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): routers/web/user/setting/oauth2_common.go:77-90 | routers/web/user/setting/oauth2_common.go:99-113 | routers/web/user/setting/oauth2_common.go:136-149 \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. 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":"routers/web/user/setting/oauth2_common.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd8e4f8d47de050b190fa2b6ee7181ce34bc9e1deda2ee6b0672d5eed4d03b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): models/issues/comment_list.go:28-41 | models/issues/issue_list.go:79-92 \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 \u0060models/issues/comment_list.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":"models/issues/comment_list.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"213e2bb4074e5bc7bbc4cb99ae09c1e47087f35a5a35c07bdb930aec21c01d9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): modules/git/catfile_batch_reader.go:134-147 | modules/git/catfile_batch_reader.go:160-173 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/git/catfile_batch_reader.go:134\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":"modules/git/catfile_batch_reader.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e2560ea932a3dee35e1511181185a3522939bce62939604c8a9a9e983a812e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): modules/process/manager_stacktraces.go:66-79 | modules/process/manager_stacktraces.go:149-162 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/process/manager_stacktraces.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":"modules/process/manager_stacktraces.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"66356336a62346d74ff943875e83bfa88b597af785e6be8279a579ecff7bd27c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): routers/api/packages/terraform/terraform.go:306-319 | routers/api/packages/terraform/terraform.go:369-382 \u2014 both copies are in the same file, so extract the block 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":"routers/api/packages/terraform/terraform.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c7b2587761c6f5157eb53cb0e660391d3d2d4e9e28e8b70a7dc5423b73ef5d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): services/migrations/codebase.go:124-137 | services/migrations/onedev.go:114-127 \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":"services/migrations/codebase.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e837e169aea7b06596016cc61a196ddae53f126031095c5461bac667f998b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): services/migrations/github.go:458-471 | services/migrations/github.go:696-709 \u2014 both copies are in the same file, so extract the block 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 \u0060services/migrations/github.go:458\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":"services/migrations/github.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b95dceff40cc18aa7bd975d07c0ff802ccd5bb94efdae1973630256e887f199"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): services/migrations/github.go:546-559 | services/migrations/github.go:785-798 \u2014 both copies are in the same file, so extract the block 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 \u0060services/migrations/github.go:546\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":"services/migrations/github.go"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee6a66b9dae1239020533febd6bf50ed190bc9ec9a83249939c2df4b7861e813"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): services/packages/alpine/repository.go:215-228 | services/packages/rpm/repository.go:210-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 \u0060services/packages/alpine/repository.go:215\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":"services/packages/alpine/repository.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c6873efd8977c4ae572011fa7cdbad5246e7f9879cabe4531b662b3fe1e90b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): routers/api/packages/cran/cran.go:172-184 | routers/api/packages/debian/debian.go:149-161 | routers/api/packages/goproxy/goproxy.go:175-187 | routers/api/packages/helm/helm.go:162-174 | routers/api/packages/pub/pub.go:175-187 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/cran/cran.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":"routers/api/packages/cran/cran.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e67c8c75349e4b558e87c8afe84120c461fb33dc7ada3edf17e0380b51159710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): models/issues/comment_list.go:107-119 | models/issues/comment_list.go:143-155 | models/issues/issue_list.go:167-179 \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 \u0060models/issues/comment_list.go:107\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":"models/issues/comment_list.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"15fe37797661fd06e2ba6b57b9adbdb141424cd5c5a4d16c2abcde5eb4ff5137"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): routers/api/v1/org/action.go:116-128 | routers/api/v1/repo/action.go:146-158 | routers/api/v1/user/action.go:58-70 \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 \u0060routers/api/v1/org/action.go:116\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":"routers/api/v1/org/action.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"51100f67aa8596c3789a493a625e17fa1563805e977a179af9be006ff7a32889"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): services/asymkey/sign.go:138-150 | services/asymkey/sign.go:174-186 | services/asymkey/sign.go:222-234 \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 \u0060services/asymkey/sign.go:138\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":"services/asymkey/sign.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"14f9d109c2768464abc0383931dd477804a9add55fb9a811833e3bc01e88fdb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/admin_auth_ldap.go:386-398 | cmd/admin_auth_ldap.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/admin_auth_ldap.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. 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/admin_auth_ldap.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc61d0798a0e9f9b4e3be05bdbdff78f8c82d98d2f828c4e99f7e82dee280010"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): models/git/commit_status.go:76-88 | models/git/commit_status.go:104-116 \u2014 both copies are in the same file, so extract the block 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 \u0060models/git/commit_status.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. 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":"models/git/commit_status.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dbd20a7ad778a61d6c5d2f15d75b997ce13910ad19b20dd1400a867b5cc48b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): models/issues/comment_list.go:71-83 | models/issues/comment_list.go:312-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/issues/comment_list.go:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/issues/comment_list.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bde909925269679485c1abf9ea194b404680f997d9335201c7bb1fe43393a32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): models/repo/language_stats.go:183-195 | models/repo/license.go:92-104 \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 \u0060models/repo/language_stats.go:183\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":"models/repo/language_stats.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"e151f3e3d5b56d425a3bb27a9a85d38cb7ceab36d1003d02fd962cbe245d2dc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): modules/actions/workflows.go:446-458 | modules/actions/workflows.go:609-621 \u2014 both copies are in the same file, so extract the block 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":"modules/actions/workflows.go"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0011955de070c07eeff4963a756908f043b4de54e8ff6e2cee65c54b41750f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): modules/avatar/identicon/block.go:509-521 | modules/avatar/identicon/block.go:537-549 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/avatar/identicon/block.go:509\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/avatar/identicon/block.go"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f97dc2696ef983f55117384e90a49ea0dbc132dd3340ef5728fa4537ffbde85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): modules/avatar/identicon/block.go:565-577 | modules/avatar/identicon/block.go:593-605 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/avatar/identicon/block.go:565\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":"modules/avatar/identicon/block.go"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d09e8e885b48046d352e31782cb3e74a819d9818ccb62ea6078ca497ace059"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): modules/cache/cache_twoqueue.go:87-99 | modules/cache/cache_twoqueue.go:107-119 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"modules/cache/cache_twoqueue.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"103d2a01adf5adc6aa5a0a5d1bf0f14019406fbb0effe7eb11334c79dab2ca6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): routers/api/packages/debian/debian.go:224-236 | routers/api/packages/rpm/rpm.go:106-118 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/debian/debian.go:224\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":"routers/api/packages/debian/debian.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7edb351f38f176eb4625318bd6665233146bd15ceb89333d2aa568c7d82e8a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): routers/api/v1/org/action.go:382-394 | routers/api/v1/user/action.go:143-155 \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 \u0060routers/api/v1/org/action.go:382\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":"routers/api/v1/org/action.go"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"401f6c165693bdbbccf301e489c13dcb09cd9789876ff3585cfee5420bc1dbdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): routers/api/v1/repo/action.go:1846-1858 | routers/api/v1/repo/action.go:1955-1967 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/v1/repo/action.go:1846\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":"routers/api/v1/repo/action.go"},"region":{"startLine":1846}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a0487e643fe58d710bf1691b056fe7865ee2390ed129bd52102c05511af16c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): routers/web/shared/actions/runners.go:292-304 | routers/web/shared/actions/runners.go:327-339 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/web/shared/actions/runners.go:292\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":"routers/web/shared/actions/runners.go"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"c04b51daff42f9e2cb7735aca9505586b9359143021d08b977ac9ae03d17f3d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): services/feed/notifier.go:361-373 | services/feed/notifier.go:380-392 \u2014 both copies are in the same file, so extract the block 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 \u0060services/feed/notifier.go:361\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":"services/feed/notifier.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67ba5b94b334af5ee3b28f5ddea4928ec17ed5d6905b833b02f5e93f1b4fe78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): services/lfs/locks.go:146-158 | services/lfs/locks.go:279-291 \u2014 both copies are in the same file, so extract the block 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 \u0060services/lfs/locks.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":"services/lfs/locks.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"24912199a4899f8d3131f473b63e81851712d34ecd2ea78df9162963c138e252"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): services/webhook/discord.go:145-157 | services/webhook/msteams.go:117-129 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060services/webhook/discord.go:145\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/webhook/discord.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"213e91dfc2fbf933d37499a012f45a0d58d4239ef85378eebc06bc53f9803f47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): routers/api/packages/alpine/alpine.go:137-149 | routers/api/packages/arch/arch.go:65-77 | routers/api/packages/conda/conda.go:220-232 | routers/api/packages/rpm/rpm.go:157-168 | routers/api/packages/rubygems/rubygems.go:221-232 | routers/api/packages/swift/swift.go:361-373 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/alpine/alpine.go:137\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":"routers/api/packages/alpine/alpine.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"800c7787c640baf6c0fd41a88904f850d424711c5e32ac6e9c1dac5ddd2c3df3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): routers/api/packages/cargo/cargo.go:178-189 | routers/api/packages/conan/conan.go:490-501 | routers/api/packages/generic/generic.go:43-54 | routers/api/packages/pypi/pypi.go:95-106 | routers/api/packages/terraform/terraform.go:70-81 | routers/api/packages/vagrant/vagrant.go:231-242 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/cargo/cargo.go:178\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":"routers/api/packages/cargo/cargo.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"efdb31060b2e124aea5fe35a2235dc1c1ef8618909d91ff550cef415b1e61a83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): routers/api/packages/cargo/cargo.go:233-244 | routers/api/packages/goproxy/goproxy.go:204-215 | routers/api/packages/pub/pub.go:203-214 | routers/api/packages/rubygems/rubygems.go:250-261 | routers/api/packages/swift/swift.go:393-404 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/cargo/cargo.go:233\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":"routers/api/packages/cargo/cargo.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0e47329c81e33a8841fd8cba1b208bd4b9bb593281492bf8b914cff2319847"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): routers/api/packages/goproxy/goproxy.go:211-222 | routers/api/packages/helm/helm.go:198-209 | routers/api/packages/pub/pub.go:210-221 | routers/api/packages/rubygems/rubygems.go:257-268 \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 \u0060routers/api/packages/goproxy/goproxy.go:211\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":"routers/api/packages/goproxy/goproxy.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a6125b33e1c63d646b4d8af3ff8c05a6c934c358d418a3a7fe454fd30b27396"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): routers/api/packages/cran/cran.go:52-63 | routers/api/packages/swift/swift.go:129-140 | routers/api/packages/swift/swift.go:480-492 \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 \u0060routers/api/packages/cran/cran.go:52\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":"routers/api/packages/cran/cran.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ce3cf14dedbd7cb2db46bde15e56beb553880efa5642b74d7bf89f59ff2760"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): routers/api/packages/goproxy/goproxy.go:156-167 | routers/api/packages/helm/helm.go:143-154 | routers/api/packages/rpm/rpm.go:122-133 \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 \u0060routers/api/packages/goproxy/goproxy.go:156\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/goproxy/goproxy.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d240e8e276afaf75b4d99bacfceed2fcbf4a0079abdc39cfa2cbfae27caa732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): routers/api/v1/org/action.go:226-237 | routers/api/v1/repo/action.go:490-501 | routers/api/v1/user/action.go:339-350 \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 \u0060routers/api/v1/org/action.go:226\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/org/action.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"081cf350ab02818f9c47315ff94276f5af92a1d5194941801d189e340cdf2d11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): models/packages/conan/references.go:42-53 | models/packages/debian/search.go:46-57 \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 \u0060models/packages/conan/references.go:42\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/packages/conan/references.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e63e40db0a572a63acd4dc3dab17c2f3327a082350ef49952675798cdbab70e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): models/repo/user_repo.go:41-52 | models/repo/user_repo.go:90-101 \u2014 both copies are in the same file, so extract the block 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 \u0060models/repo/user_repo.go:41\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"models/repo/user_repo.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d46219dd38b127e815c62187e0d7150c15b282a937d5d802ef3ecd643d79f1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): modules/actions/workflows.go:429-440 | modules/actions/workflows.go:596-607 \u2014 both copies are in the same file, so extract the block 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":"modules/actions/workflows.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"640c9ee518f246b8731baf63b88896c07588c34dd303ed972ec0e5d3f7e85374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): modules/lfstransfer/backend/backend.go:67-78 | modules/lfstransfer/backend/lock.go:42-53 \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":"modules/lfstransfer/backend/backend.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"90819a21943306c282791a6c17a2c6b718be28c4ea8a51593b9c438571243453"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): routers/api/actions/artifactsv4.go:466-477 | routers/api/actions/artifactsv4.go:699-710 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/actions/artifactsv4.go:466\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":"routers/api/actions/artifactsv4.go"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"11c141d1aee7103dc7cfc27e8014a1ed5eb5215acdec4f925eb8048aa9038b76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): routers/api/packages/generic/generic.go:122-133 | routers/api/packages/pypi/pypi.go:194-205 \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 \u0060routers/api/packages/generic/generic.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":"routers/api/packages/generic/generic.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"f489a02c1110baa4e7d61edd0ec2b975261fd359a1019be9dc33cd4612723357"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): routers/api/packages/pub/pub.go:122-133 | routers/api/packages/pub/pub.go:256-267 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/pub/pub.go:122\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":"routers/api/packages/pub/pub.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"d50cb0e4d69c34e5bd3f5daea5eaa1fd7b73780f8e4ff02524f0d1e0e556185a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): routers/api/packages/pub/pub.go:262-273 | routers/api/packages/swift/swift.go:432-443 \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 \u0060routers/api/packages/pub/pub.go:262\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":"routers/api/packages/pub/pub.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c40033a9bf5989b1b7f978eb7a7d1cec6a68b39913dd33afcd40b274d8a3b98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): routers/api/packages/terraform/terraform.go:148-159 | routers/api/packages/vagrant/vagrant.go:171-183 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/terraform/terraform.go:148\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":"routers/api/packages/terraform/terraform.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff86f2c7456c9d0b95b30ae0b0bd622c66a9473b9bb69a59538dad348d6d3151"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): services/automerge/automerge.go:179-192 | services/automergequeue/automergequeue.go:34-45 \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 \u0060services/automerge/automerge.go:179\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":"services/automerge/automerge.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa00799ce13258813f77a9d77bbf2eec10e03334797993dca450f36843360389"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): services/packages/alpine/repository.go:203-214 | services/packages/rpm/repository.go:198-209 \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":"services/packages/alpine/repository.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"c00a115322af89ac7dbe8b680622a70b7b4d1767affaadecf5caf8aa31349b06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): services/packages/arch/repository.go:81-92 | services/packages/rpm/repository.go:72-83 \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 \u0060services/packages/arch/repository.go:81\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/packages/arch/repository.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f524eff967f5de57b583892fed22b912430ebbb8241cbb534ca8370d79d6061"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): services/repository/branch.go:462-473 | services/repository/branch.go:712-723 \u2014 both copies are in the same file, so extract the block 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 \u0060services/repository/branch.go:462\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":"services/repository/branch.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"07875021bb4ed90c658a40ed48b87b102377a1fe9a5e3ab2cb834297a36c7df1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): services/repository/create.go:279-290 | services/repository/fork.go:133-144 \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 \u0060services/repository/create.go:279\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":"services/repository/create.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"37ea87cce90bef2210699396216aab6515ce15042db8a25c7da4531e9b58d257"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): services/repository/files/patch.go:205-216 | services/repository/files/update.go:269-280 \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 \u0060services/repository/files/patch.go:205\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"services/repository/files/patch.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"8872277033bf956e6dfaa1e65b2a3cdbae3ef5490bfa77bbb25d79dd9e11fec1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): routers/api/packages/alpine/alpine.go:180-190 | routers/api/packages/arch/arch.go:145-155 | routers/api/packages/debian/debian.go:186-196 | routers/api/packages/rpm/rpm.go:198-208 \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 \u0060routers/api/packages/alpine/alpine.go:180\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":"routers/api/packages/alpine/alpine.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"478d42b94936ea9418f21ba46cb013ca9fb5e0dc16c2b32c1f43770826652d44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): routers/api/packages/alpine/alpine.go:239-249 | routers/api/packages/arch/arch.go:242-252 | routers/api/packages/cran/cran.go:253-263 | routers/api/packages/debian/debian.go:110-120 \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 \u0060routers/api/packages/alpine/alpine.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/alpine/alpine.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"37119904613502a4f55a7641534407f25433d53fd316a56ba34c3a1982195d82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): modules/cache/cache_twoqueue.go:61-71 | modules/cache/cache_twoqueue.go:87-97 | modules/cache/cache_twoqueue.go:107-117 \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. 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":"modules/cache/cache_twoqueue.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e7c1e6b842e31fdeb504150c2e8c069548d0349eba3657f6a9d377f7c28e738"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): routers/api/packages/terraform/terraform.go:97-107 | routers/api/packages/terraform/terraform.go:308-319 | routers/api/packages/terraform/terraform.go:371-382 \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 \u0060routers/api/packages/terraform/terraform.go:97\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":"routers/api/packages/terraform/terraform.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e266c95afcb73a9d812300655bcc892c2224b26638670a4256dbd0739339012"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): services/packages/arch/repository.go:57-67 | services/packages/debian/repository.go:48-58 | services/packages/rpm/repository.go:48-58 \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 \u0060services/packages/arch/repository.go:57\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":"services/packages/arch/repository.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe5f298cc99f5146cb9c12605b4c8a690058e25214ba3b69eff7d1cb9bf0332b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): modelmigration/v1_16/v189.go:17-27 | modules/json/json.go:93-103 \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 \u0060modelmigration/v1_16/v189.go:17\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":"modelmigration/v1_16/v189.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ee39d71361917a2498df87cdf115f6520b19885779e5a53496783f2ea92b75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): models/issues/pull.go:543-553 | models/issues/pull.go:1003-1013 \u2014 both copies are in the same file, so extract the block 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 \u0060models/issues/pull.go:543\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":"models/issues/pull.go"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c2e7c13105630ce4020fdadbf26b3282cbd854778cbb612920ef72e1b28229"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): models/packages/package_file.go:188-198 | models/packages/package_version.go:246-256 \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 \u0060models/packages/package_file.go:188\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":"models/packages/package_file.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"92cb39d46d2f146e75973df04d4aabf1df1b88cabc991ce227506e9d5139b7fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): models/user/user.go:339-349 | models/user/user.go:361-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/user/user.go"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f0c3c5d4e76398fe882cc2ce91f48bf851285cd8c1c82f0323593c2256f422"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/api/actions/artifactsv4.go:644-654 | routers/api/actions/artifactsv4.go:678-688 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/actions/artifactsv4.go:644\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":"routers/api/actions/artifactsv4.go"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed343dc01bf27778bfdae31b0062f24d8a117d3c13459d3ad59e5c1e732e1e19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/api/packages/alpine/alpine.go:259-269 | routers/api/packages/arch/arch.go:280-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 \u0060routers/api/packages/alpine/alpine.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/alpine/alpine.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"14486092c5a072bdad3feab07bbf61b02c3a44af934c2181e8a28dd7562fe6b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/api/packages/conda/conda.go:278-288 | routers/api/packages/vagrant/vagrant.go:201-211 \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 \u0060routers/api/packages/conda/conda.go:278\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":"routers/api/packages/conda/conda.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dabdd8896948e5d91fff6878a7092acdd8b803b54cd1076fa15d75e931fd8f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/api/v1/api.go:481-491 | routers/api/v1/api.go:605-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/v1/api.go:481\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":"routers/api/v1/api.go"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e724483a62c0c9cc3a3cf38c1fbc7000257ad9d78a2564d5856baf788931fd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/api/v1/org/action.go:56-66 | routers/api/v1/repo/action.go:80-90 \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 \u0060routers/api/v1/org/action.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":"routers/api/v1/org/action.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60b8f9ca1d989a64b2227345f9a60ed19e6750ca64fa5594ff92f3e5a5adf7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/web/auth/2fa.go:49-59 | routers/web/auth/2fa.go:116-126 \u2014 both copies are in the same file, so extract the block 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":"routers/web/auth/2fa.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb16e1b210d898f6c5abeb0435181a2e7cfe06d138ef0fd24cca0d1242debf30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/web/repo/actions/view.go:1200-1210 | routers/web/repo/actions/view.go:1220-1230 \u2014 both copies are in the same file, so extract the block 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":"routers/web/repo/actions/view.go"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a108f8ba704c300f3748d6bc4312dbc314b20b5933e87293c290a4ee6a5271e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/web/repo/release.go:161-171 | routers/web/repo/release.go:208-218 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/web/repo/release.go:161\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"routers/web/repo/release.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e674321357e087dad50d25c6a7c76b87f71d1b0b3b66a59fd1637002567ffe9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/web/repo/setting/setting.go:776-786 | routers/web/repo/setting/setting.go:938-949 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/web/repo/setting/setting.go:776\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":"routers/web/repo/setting/setting.go"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"35164cf96fb2d25622371a6e69a0a4d1e23d7be1509e94aaadfc8afe96b77b6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/web/repo/setting/setting.go:846-856 | routers/web/repo/setting/setting.go:965-975 \u2014 both copies are in the same file, so extract the block 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"d965a5703872d5eab0cb3156d1441adddb605c563825ef9e90d3e8ac07f03cdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/web/repo/wiki.go:222-232 | routers/web/repo/wiki.go:388-399 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"routers/web/repo/wiki.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdddc21eda1368c7624ed37ec2d5d837027cb61840b8e5d5a8dbea71579a296b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): routers/web/web.go:708-718 | routers/web/web.go:1031-1041 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/web/web.go:708\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":"routers/web/web.go"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"18bbc3e18f076e1b50109156affa80ac3d051d89eedac850443652a8b5e8bc75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): services/asymkey/sign.go:204-214 | services/asymkey/sign.go:257-267 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060services/asymkey/sign.go:204\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/asymkey/sign.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"df1b809ab0e3878477c1f55427ac3f74a5bdfb78c84364b3c322623ab6b9d1b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): services/lfs/locks.go:168-178 | services/lfs/locks.go:301-311 \u2014 both copies are in the same file, so extract the block 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 \u0060services/lfs/locks.go:168\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. 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":"services/lfs/locks.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"1780955a6df0fcd6374478f5a1722dc84a4cc78944ec6920186d2b9d3afd45f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): services/migrations/gitea_uploader.go:441-451 | services/migrations/gitea_uploader.go:532-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 \u0060services/migrations/gitea_uploader.go:441\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":"services/migrations/gitea_uploader.go"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ca424a1535715fecd1e95a2b947680a2bb7d589a3619be48d14d6a46c3964bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): services/packages/rpm/repository.go:498-508 | services/packages/rpm/repository.go:545-555 \u2014 both copies are in the same file, so extract the block 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 \u0060services/packages/rpm/repository.go:498\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":"services/packages/rpm/repository.go"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d5a43c77817852e20d77a8c34e0ef51125d3ad14dbfdf8ed057fd6246bd56f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): services/repository/files/patch.go:141-151 | services/repository/files/update.go:205-215 \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 \u0060services/repository/files/patch.go:141\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":"services/repository/files/patch.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d07dfd2936b17303f05c3ac3d90ad6ec8ae325d822df2fed0b9fed2db4263d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): services/repository/repository.go:137-147 | services/repository/repository.go:259-269 \u2014 both copies are in the same file, so extract the block 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 \u0060services/repository/repository.go:137\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":"services/repository/repository.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad823e15c609ee836269291b05f6b659826450c60c04389e35a629c93bbd8f24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): routers/api/v1/org/action.go:161-170 | routers/api/v1/org/action.go:330-339 | routers/api/v1/repo/action.go:198-207 | routers/api/v1/repo/action.go:301-310 | routers/api/v1/user/action.go:98-107 | routers/api/v1/user/action.go:256-265 \u2014 there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/v1/org/action.go:161\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/org/action.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd9c201cc236f6a7aa03284b12eed2fb6298894fccbb80b7c16a0ecfd829913"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): models/issues/comment.go:422-431 | models/issues/comment.go:437-446 | models/issues/comment.go:470-479 | models/issues/comment.go:506-516 | models/issues/comment.go:767-776 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"models/issues/comment.go"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"69b10c74cc28a7cedeeaccc07d04b4f830454c4bf8a40878b9fefd2bafacae79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): routers/api/packages/goproxy/goproxy.go:53-62 | routers/api/packages/goproxy/goproxy.go:73-82 | routers/api/packages/goproxy/goproxy.go:93-102 \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 \u0060routers/api/packages/goproxy/goproxy.go:53\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":"routers/api/packages/goproxy/goproxy.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4cf5f605f8c96b7ae63dd83269d30a20f69fc94de613b75ba9829a6fd91b3fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): modelmigration/base/db.go:156-165 | modelmigration/base/db.go:182-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 \u0060modelmigration/base/db.go:156\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":"modelmigration/base/db.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b10bd02e080bb53c897137c1da0f895b79c1e0155643de21c78dcd142c86a28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): modelmigration/v1_23/v309.go:41-50 | models/activities/notification.go:78-87 \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":"modelmigration/v1_23/v309.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"6175512c247a7572145bac16fe71c9f0fbba8d3f34471a33a79849a39166a831"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): models/actions/run.go:398-407 | models/actions/run_job.go:727-736 \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 \u0060models/actions/run.go:398\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":"models/actions/run.go"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"6382164b21abe43edd90515675c751cc0c3e5075d5751774c0dd542da652bfaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): models/activities/action_list.go:32-41 | models/issues/reaction.go:320-329 \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 \u0060models/activities/action_list.go:32\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":"models/activities/action_list.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcc26dc2a59b6f5e491c60cd680eec8eab66088e5ac1ded0627962eb757a2d1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): models/db/index.go:73-82 | models/db/index.go:100-109 \u2014 both copies are in the same file, so extract the block 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 \u0060models/db/index.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":"models/db/index.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"8247a1da25b270e66c63c299305acd6b58fb529d002465c4ab143bc1cddd25f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): models/issues/comment.go:635-644 | models/issues/issue_update.go:296-305 \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 \u0060models/issues/comment.go:635\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":"models/issues/comment.go"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"008c49d8cc5a37c5113930c0a5d7f1c68bc720918f8e7cf58ee977d6acaf2d00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): models/repo/repo.go:410-419 | models/repo/repo_unit.go:268-277 \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 \u0060models/repo/repo.go:410\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":"models/repo/repo.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76548824c8db399d28910c2401b4812a48019b0e4a68dcfd11480a59d8f6c91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): modules/git/repo_index.go:86-95 | modules/git/tree.go:57-66 \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 \u0060modules/git/repo_index.go:86\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":"modules/git/repo_index.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b4027a5a06fcd382a1270789a95f1898f19249561016293b59d4bc4c77c6aec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): modules/proxy/proxy.go:68-77 | services/webhook/deliver.go:287-296 \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 \u0060modules/proxy/proxy.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/proxy/proxy.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"6afaee75d1d99528045b72c30765644671f39ab3dde0fc48b9e2970d1b6bf60d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): modules/session/db.go:113-122 | modules/session/db.go:147-156 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/session/db.go:113\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"modules/session/db.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5633753b2a9b059c069862cd1f2f4d13655bcf456b3dc60e163f41cc022c89ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): modules/session/redis.go:139-148 | modules/session/redis.go:196-205 \u2014 both copies are in the same file, so extract the block 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":"modules/session/redis.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f466c6cfe124ed707a8542cae2008a8396befaee5410e5c194df1f8adc6b804"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): modules/util/path.go:145-154 | modules/util/path.go:177-186 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/util/path.go:145\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"modules/util/path.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be022ca8273f4ea7eb36b2c48871351941c66972f4947d8084c4164516bcf5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/api/packages/conan/conan.go:748-757 | routers/api/packages/conan/conan.go:765-774 \u2014 both copies are in the same file, so extract the block 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":"routers/api/packages/conan/conan.go"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff8b040abda100a34c3bdae6d060e0014f23fc8429beb88ce96107dd650ef08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/api/packages/container/container.go:366-375 | routers/api/packages/container/container.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. 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":"routers/api/packages/container/container.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d3e387cc901f9962cc88154702cf3af2499e4bf60c335f038c66654d1067eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/api/packages/vagrant/vagrant.go:48-57 | routers/api/packages/vagrant/vagrant.go:105-114 \u2014 both copies are in the same file, so extract the block 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":"routers/api/packages/vagrant/vagrant.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"11e3cbc0d3241c785ad9e3834f7dee6740145830d9a50de59c80a18389971eb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/api/v1/packages/package.go:384-393 | routers/api/v1/packages/package.go:446-455 \u2014 both copies are in the same file, so extract the block 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":"routers/api/v1/packages/package.go"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b965463c69c9af67a613dff049ec7edc679fe8ef9bbcbd588fc6e1cc5556d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/api/v1/repo/action.go:242-251 | routers/api/v1/repo/action.go:421-430 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/v1/repo/action.go:242\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":"routers/api/v1/repo/action.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"fecd5f293fa2157cbc28ce69347da1166f7497446dd0b7c39718ef46bd82ef2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/api/v1/user/action.go:200-209 | routers/api/v1/user/action.go:291-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 \u0060routers/api/v1/user/action.go:200\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":"routers/api/v1/user/action.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb91be49828d85cd8d47ee1f3040dd91202f48c0bc85cd24dc9b3fe2b879126"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/web/admin/auths.go:265-274 | routers/web/admin/auths.go:395-404 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/web/admin/auths.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":"routers/web/admin/auths.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff808a34a69f3153ad16473260d3ade3fd33b4d1556bb005eb5fee320feb9c79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/web/admin/auths.go:338-347 | routers/web/admin/auths.go:372-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/admin/auths.go"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"b01b9ece8caf87ad73a892fbf14cc0d4d530ed48e1e7b9d343bbb6b3ae7adbd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): routers/web/user/setting/security/2fa.go:31-40 | routers/web/user/setting/security/2fa.go:67-76 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/web/user/setting/security/2fa.go:31\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":"routers/web/user/setting/security/2fa.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd2632852824eb04b26475d22cdff6bddd2e9c976e5fad9971e6a1c87b0c25a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/actions/notifier.go:369-378 | services/feed/notifier.go:137-146 \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 \u0060services/actions/notifier.go:369\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":"services/actions/notifier.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"4416f44f3aba9b8227a9c2442e1249c9f1dc98554e67fee0667183dffa8bc51b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/actions/notifier.go:561-570 | services/actions/notifier.go:622-631 \u2014 both copies are in the same file, so extract the block 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 \u0060services/actions/notifier.go:561\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/notifier.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"98418aca6c7803ab545b8961177618c76a42e89661ff78102d0fd8d99ff74476"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/actions/notifier_helper.go:240-249 | services/actions/notifier_helper.go:250-259 \u2014 both copies are in the same file, so extract the block 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 \u0060services/actions/notifier_helper.go:240\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":"services/actions/notifier_helper.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9b6e846f87795c4e4baca9e78741ba57cc9516330d3575433bcb538d8b580d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/agit/agit.go:252-261 | services/pull/pull.go:459-468 \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 \u0060services/agit/agit.go:252\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":"services/agit/agit.go"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"c94c3d63e007022f0f40e34c8f6af28d04d67c37bf06144e75c1144f405af4a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/feed/notifier.go:191-200 | services/feed/notifier.go:204-213 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060services/feed/notifier.go:191\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":"services/feed/notifier.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3673e0ea87c034a44df5d1c5292883b7839317ff28813dcad9fafb8477d0af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/indexer/notify.go:89-98 | services/indexer/notify.go:102-111 \u2014 both copies are in the same file, so extract the block 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 \u0060services/indexer/notify.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/indexer/notify.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a564b090fe364869a054aa738856ce5d308ed9b825ea83fff86acca6e9488c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/migrations/codebase.go:448-457 | services/migrations/onedev.go:514-523 \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 \u0060services/migrations/codebase.go:448\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":"services/migrations/codebase.go"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"b40b12831b3e58bee0f63cfb7a18d12a72f96502d19e29d08cd60edd9c2bf7c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/migrations/dump.go:513-522 | services/migrations/dump.go:543-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 \u0060services/migrations/dump.go:513\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":"services/migrations/dump.go"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"e15fa12ffaf830e7b5bcb3dd786993066044df0fbafcd51db3b6f98d3d7cbeae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): services/migrations/dump.go:568-577 | services/migrations/gitea_uploader.go:663-672 \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 \u0060services/migrations/dump.go:568\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":"services/migrations/dump.go"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ab45a3847709718fc4bd30af8a0b0d5f97ae0abcdb3107386820d0ee65cb5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): modelmigration/v1_20/v249.go:32-40 | modelmigration/v1_23/v308.go:36-44 | modelmigration/v1_24/v317.go:37-45 | models/activities/action.go:160-168 \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. 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":"modelmigration/v1_20/v249.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b5e0dd97c1f042637e79784f6b8a53e2c6f4d5d2dd291fcd1f5248e9ee83d79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): routers/api/packages/debian/debian.go:147-156 | routers/api/packages/pub/pub.go:173-182 | routers/api/packages/rpm/rpm.go:155-163 \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 \u0060routers/api/packages/debian/debian.go:147\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":"routers/api/packages/debian/debian.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"110a8f697a44c15146e8e25eb990a182f98146cdc7bf2f1de156e2639071f56d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): routers/api/packages/terraform/terraform.go:238-246 | routers/api/packages/terraform/terraform.go:313-322 | routers/api/packages/terraform/terraform.go:376-384 \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 \u0060routers/api/packages/terraform/terraform.go:238\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":"routers/api/packages/terraform/terraform.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfceca806fc93beef26e1ce1c44933adee67cfa44e86883eb699373b43ffbc88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): services/asymkey/sign.go:193-201 | services/asymkey/sign.go:241-249 | services/asymkey/sign.go:312-320 \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 \u0060services/asymkey/sign.go:193\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/asymkey/sign.go"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fe5bdba3df0eabcb246844585871625ff267a72db42c0a61e28560a9af5794c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): modelmigration/v1_26/v326.go:288-296 | modelmigration/v1_26/v326.go:301-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. 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":"modelmigration/v1_26/v326.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"a70c4eabc4da25b9bec6eadc2acb575a64b677c5934547cc20d746d11b60bc65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): models/actions/run.go:385-393 | models/actions/run_job.go:713-721 \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":"models/actions/run.go"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4e008a5dc5421f0aac6a851112fa0f968dd630c0b3167355fc682951790df2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): models/actions/run_job_list.go:54-62 | models/actions/runner_list.go:48-57 \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 \u0060models/actions/run_job_list.go:54\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"models/actions/run_job_list.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"478fe00c0859fb39134f048c9c0f37e35cb9a53cf08093da4f7ba81543c7786b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): models/issues/issue_update.go:168-176 | models/issues/issue_update.go:182-190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/issues/issue_update.go:168\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":"models/issues/issue_update.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"6210c65deffaf4990e547f1b904d0280d7b0e8a21e071d805478409ae6b39386"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): models/issues/review.go:486-494 | models/issues/review.go:516-524 \u2014 both copies are in the same file, so extract the block 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 \u0060models/issues/review.go:486\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":"models/issues/review.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"685ef51048e597f03c3aa17a30cb60d3a0641e93b32fc7b1d1ddd3b67ca50939"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): models/repo/star.go:81-89 | models/repo/watch.go:158-166 \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 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":"models/repo/star.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc2ec5221e7ec8ec719cca5065cbc5e46a168db3b78cd987f82a221088f62a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): modules/actions/workflows.go:595-603 | modules/actions/workflows.go:608-616 \u2014 both copies are in the same file, so extract the block 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":"modules/actions/workflows.go"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbbda6947984f68253e92dbeb86976d2caba6887bdcf48585b448800255113f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): modules/lfstransfer/backend/backend.go:111-119 | modules/lfstransfer/backend/backend.go:134-142 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/lfstransfer/backend/backend.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":"modules/lfstransfer/backend/backend.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09100c9601ab990254248d05422f557abfe7a897229e48dc8f00ee9889863a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): modules/references/references.go:426-434 | modules/references/references.go:444-452 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/references/references.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":"modules/references/references.go"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"320b6812e83277604bceb128679cfe0951abfe62d0b7cc15b68062f316905b7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): routers/api/packages/conan/conan.go:403-411 | routers/api/packages/rpm/rpm.go:454-463 \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":"routers/api/packages/conan/conan.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"7deec839d7cf9af2a475a6e763163a7d0ad72cff1cc080b120b42170b3c8489f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): routers/api/packages/conan/conan.go:509-517 | routers/api/packages/conan/conan.go:524-532 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/packages/conan/conan.go:509\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/conan/conan.go"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec63870f7873e51aa92fd149ae17db57e68526c3d6789d4ccc2e1cf59f48d3cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): routers/api/packages/container/container.go:266-274 | routers/api/packages/container/container.go:468-476 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060routers/api/packages/container/container.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/packages/container/container.go"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"73492ed14d1eccbaefce6888bfede2c9696848fdf2cd0d78226b9bbf9e21ba21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): routers/web/admin/auths.go:97-105 | routers/web/admin/auths.go:244-252 \u2014 both copies are in the same file, so extract the block 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":"routers/web/admin/auths.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"75a83b0893aa7eac54f9fc0f38ca69fe147d3522c5300a28a0d0efa02778cd9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): routers/web/repo/pull.go:1164-1172 | routers/web/repo/pull.go:1177-1185 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/web/repo/pull.go:1164\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":"routers/web/repo/pull.go"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc6ba1372e2cefe7198967f0072c6fa643af52c4db7e8233da2f71033d80230b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): routers/web/repo/wiki.go:326-334 | routers/web/repo/wiki.go:387-395 \u2014 both copies are in the same file, so extract the block 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":"routers/web/repo/wiki.go"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"185488b0da70cb0dddf8a92fbae4a26bcf6110ddc0021664bdcc4d621de32248"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): services/cron/tasks_extended.go:130-138 | services/cron/tasks_extended.go:162-170 \u2014 both copies are in the same file, so extract the block 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 \u0060services/cron/tasks_extended.go:130\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/cron/tasks_extended.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c588a4c5b6b233a8cb2eccb0047409aa7509be5827a9179cf93c621584cd84e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): services/lfs/locks.go:72-80 | services/lfs/locks.go:226-235 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060services/lfs/locks.go:72\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":"services/lfs/locks.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"740139382a87da5664255d8ecea030a564c0b15e2ee5656cebb7accf262799a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): services/webhook/dingtalk.go:82-90 | services/webhook/feishu.go:87-95 \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 \u0060services/webhook/dingtalk.go:82\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":"services/webhook/dingtalk.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"c09e4ed39bb217f179336a9cd82267571f282f6bcfbc6d8587276ce7314dc22d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): services/webhook/discord.go:234-242 | services/webhook/msteams.go:252-260 \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 \u0060services/webhook/discord.go:234\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":"services/webhook/discord.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c2488daf703e258102ac1108ce821fe5c6f642e2ef2f45e20d718efa5458a46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): modelmigration/base/db.go:246-253 | modelmigration/base/db.go:262-269 \u2014 both copies are in the same file, so extract the block 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 \u0060modelmigration/base/db.go:246\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":"modelmigration/base/db.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"847903a34a96e0f03cba49503022d0677b43137664218fd033206fb969a95bfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): modelmigration/v1_16/v189.go:34-41 | modules/json/json.go:110-117 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060modelmigration/v1_16/v189.go:34\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modelmigration/v1_16/v189.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f26ce88aaed779b456cb84f5c5b62353de4c3930afe1d34e08f4fa746d4753"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): models/actions/run_job.go:536-543 | models/actions/run_job.go:560-567 \u2014 both copies are in the same file, so extract the block 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 \u0060models/actions/run_job.go:536\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":"models/actions/run_job.go"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"10c56f4fb09abc700953969b3a0128e0fdec26ac02976eb8f7cd61431da416bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): models/actions/variable.go:96-103 | models/secret/secret.go:115-122 \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 \u0060models/actions/variable.go:96\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":"models/actions/variable.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b21e70d1dddad4fb3bed475e2abd1d8fd91ce7d9d11b9bcbebbfd3d7ab92a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): models/activities/notification_list.go:369-376 | models/issues/comment_list.go:177-184 \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 \u0060models/activities/notification_list.go:369\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":"models/activities/notification_list.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a5fe717f909292739ede0e4b9ab52cbd2539c875cd86dae6d2fbbcff3accad4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): models/issues/review_list.go:190-197 | models/issues/review_list.go:198-205 \u2014 both copies are in the same file, so extract the block 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":"models/issues/review_list.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"7605971e6b04c1015ceb1a7816e7c91c1464bd08e70e2784c3a5908556ba6b55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): modules/references/references.go:382-389 | modules/references/references.go:399-406 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/references/references.go:382\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":"modules/references/references.go"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"f400dd4b8f08fa2d0d44bd023a04cc3de64a48a858bc9862048946f470455615"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): modules/repository/branch.go:96-103 | modules/repository/branch.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 \u0060modules/repository/branch.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/repository/branch.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04bd9912d6f76843c8a511d3e9f5bebc3de7f2fd48d2593ae2b75dae40948fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): routers/api/packages/api.go:412-419 | routers/api/packages/api.go:425-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 \u0060routers/api/packages/api.go:412\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":"routers/api/packages/api.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af9ac9abb47e73dbe69e85b96890a8ed3439dd0be14e201fdcfe5b5bead22e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): routers/api/packages/conan/conan.go:571-578 | routers/api/packages/conan/conan.go:615-622 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/packages/conan/conan.go:571\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":"routers/api/packages/conan/conan.go"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9c608759ef123a134631e16b4d22bce006519715300ed608b257f4723d9e9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): routers/api/packages/container/blob.go:65-72 | routers/api/packages/container/manifest.go:392-399 \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 \u0060routers/api/packages/container/blob.go:65\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"routers/api/packages/container/blob.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"d499d9f7d3386e05ae25e4b480d79734e25441fa1464cf2f4f5d742f81b2a6c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): services/context/api.go:257-264 | services/context/context.go:193-201 \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":"services/context/api.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c300e660c9f7e216e42a2e53f1516f3cf9dd4c27680bd3f51fff148318a17c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): services/migrations/dump.go:526-533 | services/migrations/gitea_uploader.go:629-636 \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 \u0060services/migrations/dump.go:526\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":"services/migrations/dump.go"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e6599c93f87f45548ed7996616f6f080a0aa47f7eb7618808a55c04be62598"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): services/migrations/github.go:572-579 | services/migrations/github.go:650-657 \u2014 both copies are in the same file, so extract the block 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 \u0060services/migrations/github.go:572\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":"services/migrations/github.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b854c9c5551b97cf9340462431c5618704a91ba85b8006b3c85d89c09b18bc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): services/lfs/locks.go:136-142 | services/lfs/locks.go:201-207 | services/lfs/locks.go:269-275 \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 \u0060services/lfs/locks.go:136\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":"services/lfs/locks.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"344bba70ad52a792f0e7f46f6745b8b0bc2868c57ee0caefb74f21982c8c74cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): models/actions/run_list.go:25-31 | models/git/branch_list.go:44-51 \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 \u0060models/actions/run_list.go:25\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":"models/actions/run_list.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3bad24185b23d64a87e63c79307021545d1787ab6c761e06d12bb046605cc4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): models/actions/runner.go:230-236 | models/actions/variable.go:83-89 \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 \u0060models/actions/runner.go:230\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":"models/actions/runner.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94130cb86cfbd890def3835f9872e3216e8d4548fedcbf13cafa5042168a8a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): modules/git/gitcmd/command.go:283-289 | modules/git/gitcmd/command.go:298-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/git/gitcmd/command.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"482f37c6d595619a9857a45ddaf8718bf462ba6be9140b2e6f491ec425980be5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): routers/api/packages/api.go:205-211 | routers/api/packages/api.go:242-248 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/api/packages/api.go:205\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":"routers/api/packages/api.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"9894c09651f66fc73f561b292c0e9df70dcfc2a4eb4f7745a39996c7295fbaaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): routers/api/packages/api.go:433-439 | routers/api/packages/api.go:440-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 \u0060routers/api/packages/api.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":"routers/api/packages/api.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"841b53ebeb4082207fca45624d9aa2e80562a5a2df1110c6d592749bf05031ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): services/actions/auth.go:93-99 | services/packages/auth.go:73-79 \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 \u0060services/actions/auth.go:93\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":"services/actions/auth.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad7a7b28844fc845193389cc4be3fb8dd01491def1c1960c7e43eca92c11f868"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): services/actions/notifier.go:220-226 | services/actions/notifier.go:229-235 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/actions/notifier.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3489609b2d8d06f75da5b7b011edfa41fffc74abaa7c4b348a99c14dba54d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): services/feed/notifier.go:279-285 | services/feed/notifier.go:293-299 \u2014 both copies are in the same file, so extract the block 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 \u0060services/feed/notifier.go:279\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/feed/notifier.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0724fc0ab6311c5f4e65a11aaa757caf8e0dc83b52ca56a729795e2f2bbf49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): services/issue/assignee.go:209-215 | services/issue/assignee.go:252-258 \u2014 both copies are in the same file, so extract the block 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 \u0060services/issue/assignee.go:209\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":"services/issue/assignee.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1652b944f9db8ffceabac54af21ed9ba900316d08bcab52699ea33e3f30906e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): services/migrations/dump.go:558-564 | services/migrations/gitea_uploader.go:653-659 \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 \u0060services/migrations/dump.go:558\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":"services/migrations/dump.go"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aec4c5dec695a37b9699c87489ae1694c6b7bcd453fae1c7ce594348e0d9465"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): services/pull/pull.go:861-869 | services/pull/pull.go:886-892 \u2014 both copies are in the same file, so extract the block 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 \u0060services/pull/pull.go:861\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":"services/pull/pull.go"},"region":{"startLine":861}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d41da2fbfba61b255e2c7ea3593eca1fb2ecea87de7d81866444faa4b1a98d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): services/feed/notifier.go:152-157 | services/feed/notifier.go:278-283 | services/feed/notifier.go:292-297 \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 \u0060services/feed/notifier.go:152\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":"services/feed/notifier.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"f237612b407263613aa81726ffa9a828c42284b4237489b1b4d8ee4eca832b78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): models/actions/run_attempt_list.go:24-29 | models/actions/runner_list.go:25-30 \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 \u0060models/actions/run_attempt_list.go:24\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/actions/run_attempt_list.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6486c3e957660899b75b1f34f893053da8229bc6cfe9d2f7d6f1e2a0ea07df4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): models/issues/milestone_list.go:184-189 | models/issues/milestone_list.go:196-201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060models/issues/milestone_list.go:184\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"models/issues/milestone_list.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e3c01dca117ac9a3815614ab3c1991c7536221784b5464bf1c814f8d82093a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): models/packages/nuget/search.go:63-68 | models/packages/package_version.go:226-231 \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 \u0060models/packages/nuget/search.go:63\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":"models/packages/nuget/search.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ac0f3bc3ae2a70a99c0fab099417ba522dec2c9a823d4200081ff28f82cc050"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): modules/session/redis.go:127-132 | modules/session/redis.go:174-179 \u2014 both copies are in the same file, so extract the block 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 \u0060modules/session/redis.go:127\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":"modules/session/redis.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b9cefbf1bac67f3d8d19baac83fe61248b5933fe76dc435276fcec862bdd584"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): modules/templates/htmlrenderer.go:99-104 | modules/templates/htmlrenderer.go:111-116 \u2014 both copies are in the same file, so extract the block 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":"modules/templates/htmlrenderer.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"13ba494ce7745664fc77faad2068cfa953834caeabfaafa6f826be34c0f06bc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): routers/api/actions/artifacts.go:131-140 | routers/api/actions/artifactsv4.go:132-137 \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 \u0060routers/api/actions/artifacts.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. 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":"routers/api/actions/artifacts.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dd6fb562c52ba4ea71aa05bccd9fc2034ec4c740601811fa7a958a258238a0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): routers/web/repo/compare.go:678-683 | services/gitdiff/gitdiff.go:665-670 \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 \u0060routers/web/repo/compare.go:678\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":"routers/web/repo/compare.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ff4ea071edbd149fa7b18e03806208a50b350b5a0709f510449f5a821c1e70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): routers/web/repo/pull.go:1026-1031 | routers/web/repo/pull.go:1175-1180 \u2014 both copies are in the same file, so extract the block 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 \u0060routers/web/repo/pull.go:1026\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":"routers/web/repo/pull.go"},"region":{"startLine":1026}}}],"partialFingerprints":{"codehealthFindingId/v1":"a730291f888740cbdb2c6ba19593541fcea65a2bea62befa0ab1c060c0aabc83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): services/actions/notifier.go:399-403 | services/actions/notifier.go:426-430 | services/actions/notifier.go:788-792 \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 \u0060services/actions/notifier.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":"services/actions/notifier.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e6651ef9d6c1935ca4969fdc1af38bb1fa090e27b6c1bc5e70c8ec147a6bd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): modules/templates/util_render.go:135-139 | modules/templates/util_render.go:140-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060modules/templates/util_render.go:135\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":"modules/templates/util_render.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38ac6c3ee73d67c7397d0d582b6859592c38c292588ae80dc6245b98e0bc446"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): routers/web/repo/release.go:559-563 | routers/web/repo/release.go:599-603 \u2014 both copies are in the same file, so extract the block 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":"routers/web/repo/release.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7650ba3a31ef1c6e2d540ebc47de098837d84ce14185999b5aabf327a615ede"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): routers/web/repo/setting/setting.go:63-67 | routers/web/repo/setting/setting.go:142-146 \u2014 both copies are in the same file, so extract the block 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":"routers/web/repo/setting/setting.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"7065a788b33f8614594a1a9464bde4fd4114e769524d1d1120cbf04522cba567"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): services/context/context.go:142-146 | services/context/context.go:161-165 \u2014 both copies are in the same file, so extract the block 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 \u0060services/context/context.go:142\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":"services/context/context.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"083492634fc16fa23d45b9dfacbe60043e27185a8ab51de1097ede50f2f92ffc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/web/repo/pull.go: routers/web/repo/pull.go changed 16 times in last 90 days, max complexity 54. 3 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":"routers/web/repo/pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80bfbd4a148628d270bc8cc662bb080b94dd8d88ee79f4158afdeafa32d12a49"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/api/v1/repo/pull.go: routers/api/v1/repo/pull.go changed 14 times in last 90 days, max complexity 55. 5 of those changes were fix/bug commits, and the other 9 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2431a38fa2cc89bd49f0d4a7f8bc676e469e01975247fd5359b4212264b19b35"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: services/gitdiff/gitdiff.go: services/gitdiff/gitdiff.go changed 11 times in last 90 days, max complexity 65. 3 of those changes were fix/bug commits, and the other 8 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":"services/gitdiff/gitdiff.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59cab446ec8dbf641663d718a5390b42a28e4c01949e591a56345b3c7106bda"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/api/v1/repo/branch.go: routers/api/v1/repo/branch.go changed 9 times in last 90 days, max complexity 78. 3 of those changes were fix/bug commits, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/branch.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"10eb23ad328c74ff81a4148bdf4362a9ae0a571556b91ce59ab98776228a2232"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/web/repo/issue_view.go: routers/web/repo/issue_view.go changed 11 times in last 90 days, max complexity 61. 3 of those changes were fix/bug commits, and the other 8 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":"routers/web/repo/issue_view.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"883d6d2385b29bbd436865fd55a96ec0eca5f34ec74a4121fed5dcb395190d8d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/web/repo/actions/view.go: routers/web/repo/actions/view.go changed 21 times in last 90 days, max complexity 30. 7 of those changes were fix/bug commits, and the other 14 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":"routers/web/repo/actions/view.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"26bc5accfe96ff6496b61cf67d82a9fe7330cec6a125a3911334d3bc983c0638"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: services/pull/pull.go: services/pull/pull.go changed 14 times in last 90 days, max complexity 36. 4 of those changes were fix/bug commits, and the other 10 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":"services/pull/pull.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"94fa8c572ed0ae428075451b15b8f0fd70d2c8afc01f1358f9e6ea3d644f68e3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/api/v1/repo/repo.go: routers/api/v1/repo/repo.go changed 8 times in last 90 days, max complexity 59. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/api/v1/repo/repo.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c832f9b1c8b222b0f42998c988e10ff72f0555d2442187388bd877e91b0dba8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/web/repo/githttp.go: routers/web/repo/githttp.go changed 8 times in last 90 days, max complexity 56. 3 of those changes were fix/bug commits, and the other 5 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/githttp.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e7abbc37e4fd3386a9a457a0010b69fb44e656d1ac3881547cec079d123cf3a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: routers/api/v1/api.go: routers/api/v1/api.go changed 15 times in last 90 days, max complexity 28. 8 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":"routers/api/v1/api.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"95eb1e3b0a5feb1500863590304d8341b976fb1b698638ef3c481d481fb3d26b"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 18 significant file(s) lose their only recent owner: web_src/js/modules/codeeditor/main.ts, web_src/js/modules/codeeditor/context-menu.ts, stylelint.config.ts, modules/packages/rubygems/marshal.go, services/mailer/incoming/reply.go, modules/public/manifest.go, tools/generate-svg.ts, web_src/js/modules/search.ts (\u002B10 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"32c2254be789669c2eabe54ed4aee343ff25d423c0b84a880eb082a7aa2c6215"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 17 significant file(s) lose their only recent owner: routers/api/packages/container/manifest.go, modules/web/router.go, modules/git/log_name_status_nogogit.go, modules/markup/html_issue.go, modules/templates/mail.go, modules/git/commit_info_gogit.go, models/unittest/fixtures.go, routers/web/repo/setting/protected_tag.go (\u002B9 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"cc2188a24c7af7cb95597c53b41dbc51bc0642abea56dc6dfcbbc2b5ede925fd"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #3: If anonymized user #3 becomes unavailable, 6 significant file(s) lose their only recent owner: models/repo/attachment.go, services/issue/review_request.go, models/issues/assignees.go, services/mailer/sender/smtp.go, routers/api/packages/composer/api.go, services/repository/collaboration.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3483fafcbf7b55a84060d1e211b65ed67947d1a07473abf91a5ade327bbb51f7"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 5 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 (49 single-owned of 1138 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 (3 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (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 \u0027Getting the source code\u0027 section begins with a git clone command but the body clips mid-sentence, so the exact cloning steps (e.g. \u0060git remote add\u0060) are not visible.: Confirm that the full Getting-the-source-code section is present and complete."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/build-source.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82093292b804250e0b66b69961c1dcb849aa3a0fa2ff49f4bbf6b48796c7a6d"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b5b8557c7e10bbd7f3a624c1a0175f9becdc5412594c6272eaff521c958f8b9b"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f27b15c8314812821a7db03042a368f5f3f152dcc4d32cc1b44599a6bb07021f"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"934bb5e35ff2004e3b8874852da6e4e26f4f2f305dcb8bb8d25c132b5dc5b3fa"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ac9f26879aa01666216776cc5d11a4d80f217587abef9e1af9d6f1310c4608e3"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8a3369cf40726631ca24ebe8fdf4d36b8f943559e6f27230fead7e46761f3631"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"843835980c4970ce580040bfea17ca9153f70608cd7c9cf9453c37f1e8fe9f4b"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a9cf6ff00d8fa2439ffc5237c756604b4f81f668dd8ae00312436bcde0de741f"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"825f7ac9d46536e683a95b57ea6afcb31eeb3b8c6cb60a4ad8ef70afcca92b7f"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fe2d688610b51e0a5a02c7c5dd1724a4986e40f2689fb84510e2ec0164c27d6a"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"323c587a38738e08d0aa1f51e4027127db66e6417dc3bc9ad754b413bee8c8f5"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7e21aea1b91fcbab079adca25b1476d2e7478e01d456507f5271e6ba82ba019e"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0625aea0e6e3f5aee10a7d4dcf69c0976cd6711b366d7a4bc0f90b4604a1278d"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b67787f58bbdcde79a43cc08af597219f8bc8ccd5a82b8588a8f7af6b62ec402"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3f678ba412b50a8827ce28c85d5cb6af5045a67d5dd6ec4957263f9a7bcf4bcc"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1f51a163f26d94ce6b6f473117dde579d091c8cbf9e59810475c94d9fc921120"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ed6268bc59cb2e23bbfef6ad4dde38e90eb4d4b44bca8600a395f1745107eeb7"}},{"ruleId":"D32","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":"45482f7537230d92cfed16f6da88531214cf1618fb17d6d2962cee8bc6dadd9b"}},{"ruleId":"D32","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":"a579788fa3fca8a572ca4c6b6a0a6eaf2edd76fc0f1ba7d31ad3d77143c13bb1"}},{"ruleId":"D32","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":"79343e7af6a0ea527ded6e497e09cd1a372b74fc8b9fa49d56042707266b8174"}},{"ruleId":"D32","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":"53952457f33af7070bdfbcd4718a49bd24b345a1d6a91e40eac396f9560fd2ae"}},{"ruleId":"D32","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":"0e6c670982b52b2a3680ad607e5b0d5655445a4ce20b0f90dd98868fa6486c9c"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 89 of 1138 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: services/migrations/codebase.go, modules/proxyprotocol/conn.go, modules/markup/common/footnote.go (and 86 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: commit_info_gogit.go \u2194 view.go: \u0060modules/git/commit_info_gogit.go\u0060 (context git) and \u0060routers/web/repo/view.go\u0060 (context routers) sit in DIFFERENT parts of the tree yet 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) \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":"modules/git/commit_info_gogit.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f89e1c098ec4497882e3a676e623df5c3bb2df2da14f9b027aebcdc035fdc5ff"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: package.go \u2194 packages.go: \u0060models/packages/package.go\u0060 (context models) and \u0060modules/setting/packages.go\u0060 (context setting) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 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":"models/packages/package.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56990d8549832d059b2421ecedb361d9fcc61a9aefff1adb6f7c0af1cea8e701"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: packages.go \u2194 package.go: \u0060modules/setting/packages.go\u0060 (context setting) and \u0060routers/api/v1/packages/package.go\u0060 (context routers) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 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":"modules/setting/packages.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d6127b244df7cbf8f42cc4adee6d132202f6c97bedabcbc5e44b1f9a361fd4"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: descriptor.go \u2194 packages.go: \u0060models/packages/descriptor.go\u0060 (context models) and \u0060modules/setting/packages.go\u0060 (context setting) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 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":"models/packages/descriptor.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2895afb6670bcb86562c8f36e10b2ea98f2baebc5988b8b33196ebaef3fd4915"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: api.go \u2194 repo.go: \u0060routers/api/v1/api.go\u0060 and \u0060routers/api/v1/swagger/repo.go\u0060 change together 94% of the time (15 of the 16 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":"routers/api/v1/api.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ef0534f5d961b589c0bca9b1192a68eec2ce782d2ebec660fec40937364296"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: api.go \u2194 options.go: \u0060routers/api/v1/api.go\u0060 and \u0060routers/api/v1/swagger/options.go\u0060 change together 91% of the time (30 of the 33 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":"routers/api/v1/api.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d55f5ae5c697507674cff3a8cf1aaef83ac9bdafc1f66ab8e704876d592d28"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: mock_actions.go \u2194 RepoActionView.vue: \u0060routers/web/devtest/mock_actions.go\u0060 and \u0060web_src/js/components/RepoActionView.vue\u0060 change together 89% of the time (16 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/devtest/mock_actions.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af46547bc1c5d0be38bcb548ca60436e880756325d6f22466d2279217da0b456"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: treelist.go \u2194 view.go: \u0060routers/web/repo/treelist.go\u0060 and \u0060routers/web/repo/view.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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/repo/treelist.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47362b175ccc40ccde79bc4b3a28ab037f869f8e528b81091d8a68748958c423"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: source_authenticate.go \u2194 source_sync.go: \u0060services/auth/source/ldap/source_authenticate.go\u0060 and \u0060services/auth/source/ldap/source_sync.go\u0060 change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"services/auth/source/ldap/source_authenticate.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9214748043c15db0680d3ef4b8733a0fdd2d1819f5354cdfca96612f8af81cdc"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: mock_actions.go \u2194 WorkflowGraph.vue: \u0060routers/web/devtest/mock_actions.go\u0060 and \u0060web_src/js/components/WorkflowGraph.vue\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"routers/web/devtest/mock_actions.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e0e20daa65ba4ee49f2dc6549c34eaa48e4203b0157b2c1eb732180a64b2fd2"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"ruleId":"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":"947f0fa263b2cbe018632a8e0e4ac7b26c463a9b46676f8f524f8e2e42acc600"}},{"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":"7c08cb5425686accebd779d05f64a5cbaa47bcfa2fe0d79c9c36e4012c6c0192"}},{"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":"ce4dcbdaa8dcf1da3c704fe90814a9b231ec896e9a8462ccba9f49c2f993499a"}},{"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":"d16254ec6ff6df273c628825485429b81b93e18f404b1429a6588f76b4e9973a"}},{"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":"b9f9e735a893fe3dfedddec89e295f3eee750d9ce1fbf0ac12eefd91e7a4accb"}},{"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":"067f4463e61b9fbacbd9ca62cb59b5aacd705ad4b75ef77dca2876d63205e01e"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-200","guid":"b0ce3b1d-7a29-fe50-8aab-9aba899d2988","name":"Exposure of Sensitive Information to an Unauthorized Actor","shortDescription":{"text":"Exposure of Sensitive Information to an Unauthorized Actor"},"helpUri":"https://cwe.mitre.org/data/definitions/200.html"},{"id":"CWE-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-312","guid":"96724ece-b0b2-a45c-83f9-0869fa3f6bea","name":"Cleartext Storage of Sensitive Information","shortDescription":{"text":"Cleartext Storage of Sensitive Information"},"helpUri":"https://cwe.mitre.org/data/definitions/312.html"},{"id":"CWE-359","guid":"b7dfe5b0-0351-645b-a311-b936102c2929","name":"Exposure of Private Personal Information to an Unauthorized Actor","shortDescription":{"text":"Exposure of Private Personal Information to an Unauthorized Actor"},"helpUri":"https://cwe.mitre.org/data/definitions/359.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-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":29,"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."]}]}