{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"]}},{"id":"D33","name":"JS/npm Dependency Vulnerabilities","shortDescription":{"text":"JS/npm Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D33","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"]}},{"id":"D38","name":"OSV Dependency Vulnerabilities","shortDescription":{"text":"OSV Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D38","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"allPagesAssembler.doCreatePages (cyclomatic 147): allPagesAssembler.doCreatePages has cyclomatic complexity 147 (threshold 15). Most of this is not in the body itself: 6 of the 147 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 226, 463, 762, \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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"69c950d9fcdc267a159b9d7c6a5414043baeec98942c41c7ec0020141fa08406"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.checkCondition (cyclomatic 110): Namespace.checkCondition has cyclomatic complexity 110 (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":"tpl/collections/where.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcfcb093d50cd3380d47da061c21940712ae86e36a5248d51e62e2c0b37251d3"}},{"ruleId":"D1","level":"warning","message":{"text":"hugoBuilder.handleEvents (cyclomatic 87): hugoBuilder.handleEvents has cyclomatic complexity 87 (threshold 15). Of this number, 76 points are the body\u0027s own statements and 11 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":"commands/hugobuilder.go"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c8fc9449da2fdae9bcb2a11378da5d9b3ae9232a0530bb8c02708f5708b6c6"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.processPartialFileEvents (cyclomatic 76): HugoSites.processPartialFileEvents has cyclomatic complexity 76 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 38 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/hugo_sites_build.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c1b91de6fc8f7e184085805403d93f5f119bd8b7f46a7fb6359aa998a36ffab"}},{"ruleId":"D1","level":"warning","message":{"text":"pageState.setMetaPostParams (cyclomatic 70): pageState.setMetaPostParams has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__meta.go"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"101eb1335882bbbd884f4774fd2b9d25b360721054ecfcfae8d7477f39c08c80"}},{"ruleId":"D1","level":"warning","message":{"text":"page.CreateTargetPaths (cyclomatic 60): page.CreateTargetPaths 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":"resources/page/page_paths.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a43ae7b132e23ea5c2a0b720840526501c6ee2de07f556c667053b3fd44ea4d"}},{"ruleId":"D1","level":"warning","message":{"text":"TemplateStore.insertTemplates (cyclomatic 57): TemplateStore.insertTemplates has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 9 of the 57 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1363, 1610). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1349}}}],"partialFingerprints":{"codehealthFindingId/v1":"5faacb3ad51b7c1b56dbfa776a682c3320359d2d5a4c116bb1ca8cfbe9806379"}},{"ruleId":"D1","level":"warning","message":{"text":"Config.CompileConfig (cyclomatic 54): Config.CompileConfig has cyclomatic complexity 54 (threshold 15). Of this number, 50 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":"config/allconfig/allconfig.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd0240fa55300fa269be8e6d7811ff50ba32ca9dff39b74080fc13da38d3d2b"}},{"ruleId":"D1","level":"warning","message":{"text":"TemplateDescriptor.doCompare (cyclomatic 48): TemplateDescriptor.doCompare 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":"tpl/tplimpl/templatedescriptor.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"62194c47258d5f33636fd73c26a4771241b45682727ceaae901bfdba2043e070"}},{"ruleId":"D1","level":"warning","message":{"text":"componentFsDir.ReadDirWithContext (cyclomatic 46): componentFsDir.ReadDirWithContext has cyclomatic complexity 46 (threshold 15). Of this number, 33 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":"hugofs/component_fs.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f6004611a79c4b18dc90eb90fec7f10f3299fef8a5ebf1d9512c8b4d43c0282"}},{"ruleId":"D1","level":"warning","message":{"text":"Options.compile (cyclomatic 44): Options.compile has cyclomatic complexity 44 (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":"internal/js/esbuild/options.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ea8d893582d1aaa2d715f2dcccb5657cff4d59a6ec3c56542ae713fec5a05fc"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.compareGetWithCollator (cyclomatic 41): Namespace.compareGetWithCollator 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":"tpl/compare/compare.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"0490ae326c282968bcd7e501c72cae529cbd3bfe8a372eb3f06bc33fc13f71ff"}},{"ruleId":"D1","level":"warning","message":{"text":"images.DecodeImageConfig (cyclomatic 40): images.DecodeImageConfig 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":"resources/images/config.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"da653f927819e919b2a3d640b2abf4443f32afce070a1df6a723ab4916677f07"}},{"ruleId":"D1","level":"warning","message":{"text":"PathParser.parseIdentifier (cyclomatic 38): PathParser.parseIdentifier 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":"common/paths/pathparser.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cfc7110033c69811814e1698281e98c16116a5f6fd84925a2c6cfca011bc406"}},{"ruleId":"D1","level":"warning","message":{"text":"PathParser.doParse (cyclomatic 38): PathParser.doParse 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":"common/paths/pathparser.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"0625fde6f4564279eb3958566ed35d2dfa186de01e1d7e7927eaf40799c11704"}},{"ruleId":"D1","level":"warning","message":{"text":"pageContentOutput.initRenderHooks (cyclomatic 38): pageContentOutput.initRenderHooks has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to one function literal inside it that branches (line 232). 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":"hugolib/page__per_output.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfaa6dfc55e4e02ef491febc3a5830d264878354ce226e8a603997a8673b450d"}},{"ruleId":"D1","level":"warning","message":{"text":"resourceAdapter.transform (cyclomatic 38): resourceAdapter.transform has cyclomatic complexity 38 (threshold 15). Of this number, 32 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":"resources/transform.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"39fceaec5af4337894b19438c6d9695a6f1e6aba1dd3dd54cbac4a00602481f3"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.Build (cyclomatic 37): HugoSites.Build has cyclomatic complexity 37 (threshold 15). Of this number, 27 points are the body\u0027s own statements and 10 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"67de7f2a536ae4783b1eb5af690751a387c617e5273f03645d4220b6d858f569"}},{"ruleId":"D1","level":"warning","message":{"text":"BuildClient.Build (cyclomatic 37): BuildClient.Build has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 15 of the 37 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 107, 208, 193). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/build.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa8617fd4a57b927a8867bf2891c3982275623dd007e9a18404e499fe31a86e"}},{"ruleId":"D1","level":"warning","message":{"text":"shortcodeParseInfo.extractShortcode (cyclomatic 36): shortcodeParseInfo.extractShortcode 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":"hugolib/shortcode.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aa201860380ded94a6add9ae68ece33352d5ffe3153bc2e8f8b97cbe94ba917"}},{"ruleId":"D1","level":"warning","message":{"text":"batcher.doBuild (cyclomatic 36): batcher.doBuild has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 15 of the 36 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 535, 589, 658, \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":"internal/js/esbuild/batch.go"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"3000c7f8e55878439a6640008c94a671aa9dc46e73ce4ebab544163638703ffa"}},{"ruleId":"D1","level":"warning","message":{"text":"hugolib.pageRenderer (cyclomatic 35): hugolib.pageRenderer has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site_render.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"b27da84a6f2c3152f988e5b7e3d7db58679943ef747d1a6d72628000cf3569d1"}},{"ruleId":"D1","level":"warning","message":{"text":"math.DoArithmetic (cyclomatic 34): math.DoArithmetic 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":"common/math/math.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f90d7819cfb97eda37cbbdc27011351e517891032feacf32183ba6900b28f68"}},{"ruleId":"D1","level":"warning","message":{"text":"hugolib.NewHugoSites (cyclomatic 33): hugolib.NewHugoSites has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca2099f252a82221ded7051b278c104605c0469700cc0f2c5e803aa02ec36187"}},{"ruleId":"D1","level":"warning","message":{"text":"fileServer.createEndpoint (cyclomatic 32): fileServer.createEndpoint has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 271). 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":"commands/server.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"514787f78136e02e5c02bf2d9d74b1ea7673dcb62dbf4b7ed2eb19f41e66529a"}},{"ruleId":"D1","level":"warning","message":{"text":"esbuild.createBuildPlugins (cyclomatic 32): esbuild.createBuildPlugins has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 192, 360, 306). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/resolve.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"c52a49f57844392ec792ac128214f0fae1f11bbb9eef018111d3decf29c25e9c"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.FromRemote (cyclomatic 32): Client.FromRemote has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 5 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 229). 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":"resources/resource_factories/create/remote.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cd4519a2078c6a278aa3b28a5943e27957a81f27e3a3b5f73ac4f256a2f79a6"}},{"ruleId":"D1","level":"warning","message":{"text":"Walkway.walk (cyclomatic 31): Walkway.walk 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":"hugofs/walk.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"8771580bf26bc1413848b189d1d041912e6e2f9f3ffc9cfc4cae47ad1728f3a2"}},{"ruleId":"D1","level":"warning","message":{"text":"cachedContentScope.RenderString (cyclomatic 31): cachedContentScope.RenderString has cyclomatic complexity 31 (threshold 15). Of this number, 26 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":"hugolib/page__content.go"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f2bbf80b12aeafb2477057100ca3890c7d5c635fe947cfe8ae73fb15894f87"}},{"ruleId":"D1","level":"warning","message":{"text":"npm.Pack (cyclomatic 31): npm.Pack has cyclomatic complexity 31 (threshold 15). Of this number, 24 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/npm/package_builder.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"f316254e503b2a73346a426f936a8ddcacea474e339e2e4cf59d94bf272e7bad"}},{"ruleId":"D1","level":"warning","message":{"text":"state.evalCall (cyclomatic 31): state.evalCall has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/internal/go_templates/texttemplate/hugo_template.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fcdb39f56f1257ec93371721e15f3da14aa0287a9d9596990bc079798a7beb1"}},{"ruleId":"D1","level":"warning","message":{"text":"serverCommand.serve (cyclomatic 30): serverCommand.serve has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 13 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/server.go"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e9e6e8e183fdd7aa78a9461d130bb3e2e10278f9a06e39b493f7752a05d9e6"}},{"ruleId":"D1","level":"warning","message":{"text":"allconfig.fromLoadConfigResult (cyclomatic 30): allconfig.fromLoadConfigResult 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":"config/allconfig/allconfig.go"},"region":{"startLine":1035}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a882da6d8bc794f20af80ff73bf2df2f2a7fbed2f596e68edb25d4c87e8186e"}},{"ruleId":"D1","level":"warning","message":{"text":"LanguagesInternal.init (cyclomatic 30): LanguagesInternal.init has cyclomatic complexity 30 (threshold 15). Of this number, 24 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":"langs/config.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5a87fb68fd5393ccedbd53ce5f6811b871f49ebd4df67f00ba3c4a0651c261"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.Sort (cyclomatic 30): Namespace.Sort 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":"tpl/collections/sort.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3732bd1a33d082b31359c4b8bb444230576c2d77fd9f63177dcdae8eacc1e7"}},{"ruleId":"D1","level":"warning","message":{"text":"state.evalField (cyclomatic 30): state.evalField 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":"tpl/internal/go_templates/texttemplate/hugo_template.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"efcad93c0e4aa80d162b9b4649046962a151bc19a18b2bc059ac62991567e586"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.Truncate (cyclomatic 30): Namespace.Truncate 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":"tpl/strings/truncate.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f963eaece923c1b6e72fc5598a37e9a6c2ccca4217e1b637d8e03d4ba6e6ab9"}},{"ruleId":"D1","level":"warning","message":{"text":"hugolib.doRenderShortcode (cyclomatic 29): hugolib.doRenderShortcode 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":"hugolib/shortcode.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a79976242473d2d6ebca7f1215d32dfece692323ef053f1a2e958dd74b891e"}},{"ruleId":"D1","level":"warning","message":{"text":"TemplateStore.insertTemplate2 (cyclomatic 29): TemplateStore.insertTemplate2 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1235}}}],"partialFingerprints":{"codehealthFindingId/v1":"616c06ec5d88ae6d8220f37af08da7581e28281d683511a6eb350c0ed48edd42"}},{"ruleId":"D1","level":"warning","message":{"text":"sourceFilesystemsBuilder.createOverlayFs (cyclomatic 28): sourceFilesystemsBuilder.createOverlayFs has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/filesystems/basefs.go"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b14f170119f25b737e3156d7c1b8813605c0ebba761b526fca4d4a6f9212f40"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.resolveAndClearStateForIdentities (cyclomatic 28): HugoSites.resolveAndClearStateForIdentities has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map_page.go"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"1872d51f6b6dfddd914cdeac743221ef5c1e20cf4bca9a1ce2c4bd5f64f5f368"}},{"ruleId":"D1","level":"warning","message":{"text":"IntegrationTestBuilder.initBuilder (cyclomatic 28): IntegrationTestBuilder.initBuilder 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 876). 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":"hugolib/integrationtest_builder.go"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"27fb775cc2e8644f65a88110da3551318cccd65fc6b20e5bd540766ca902860b"}},{"ruleId":"D1","level":"warning","message":{"text":"AvifCodec.Encode (cyclomatic 28): AvifCodec.Encode has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"fda28818a2783c451472fe575d80d51c2e4e2859fef9d1fd3e85b2c804c31df2"}},{"ruleId":"D1","level":"warning","message":{"text":"collector.getAndCreateModule (cyclomatic 28): collector.getAndCreateModule 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/collect.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb8f5beac110c87ceda6d0ce1af6134e210ba083491c977709663acbc66a29f4"}},{"ruleId":"D1","level":"warning","message":{"text":"hugoBuilder.newWatcher (cyclomatic 27): hugoBuilder.newWatcher has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 364). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/hugobuilder.go"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"53441d0d62d9aad7917c0e726803f5597d9a34a2e6139e2a49b38e5bcb403fd8"}},{"ruleId":"D1","level":"warning","message":{"text":"configLoader.loadConfigMain (cyclomatic 27): configLoader.loadConfigMain 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":"config/allconfig/load.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f76d6b887a6e195c1750b60bfa30694f4a508d5315b7f620a7b5d3e27baa2e"}},{"ruleId":"D1","level":"warning","message":{"text":"Deps.Init (cyclomatic 27): Deps.Init has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, 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":"deps/deps.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b6c1eeaf8fd8c48bb429afbbde1a84420a9e6c024d298d464438c83aeb3641"}},{"ruleId":"D1","level":"warning","message":{"text":"NodeShiftTreeWalker.Walk (cyclomatic 27): NodeShiftTreeWalker.Walk has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 529). 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":"hugolib/doctree/nodeshifttree.go"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"a295fd97da5e369e52e95797e37336c4ae7bbb01eeeb658606b80f9e92dec3b0"}},{"ruleId":"D1","level":"warning","message":{"text":"warpc.newDispatcher (cyclomatic 27): warpc.newDispatcher has cyclomatic complexity 27 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 12 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/warpc.go"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d46927124a3f0d668bacf30aead0f6cd2ebaa9779101656a4c9d6b2014c4c01"}},{"ruleId":"D1","level":"warning","message":{"text":"sitePagesAssembler.applyAggregates (cyclomatic 26): sitePagesAssembler.applyAggregates has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 945). 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"1126368f5d2f89c555ab1794babc9b92eb926557953bfc4e8e82caa3fc1e0ac6"}},{"ruleId":"D1","level":"warning","message":{"text":"goldmark.newMarkdown (cyclomatic 26): goldmark.newMarkdown 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":"markup/goldmark/convert.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f1c2ffabe941c40d8551271848830579782d907ea31b7214350d2fe0708fe6"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.Vendor (cyclomatic 26): Client.Vendor 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/client.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a9fb3ea605f9e8bd036f699c09bee81df1b66167eb91b99ef92ea65d6625bfe"}},{"ruleId":"D1","level":"warning","message":{"text":"meta.init (cyclomatic 26): meta.init has cyclomatic complexity 26 (threshold 15). 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 395). 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":"resources/images/meta/meta.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"60516cf1f3f56c9c4466bfe8f34a3c1c5f780a4829aef6cbbe7f5ec2bbb98965"}},{"ruleId":"D1","level":"warning","message":{"text":"pageFinder.getContentNodeForRef (cyclomatic 25): pageFinder.getContentNodeForRef 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":"hugolib/pagecollections.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aea9b6b8a1934752f8ddb73e46c5f23d3a0529cf839d8363a9e7d4fd3ecc7a8"}},{"ruleId":"D1","level":"warning","message":{"text":"Cache.Prune (cyclomatic 24): Cache.Prune has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 86, 74). 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":"cache/filecache/filecache_pruner.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a034b6960dbb74494afb50e0e42dd37a4e656b9d2a19a7b1bc1d2f6c556694e"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.newModCommands (cyclomatic 24): commands.newModCommands has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 249, 103, 67, \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":"commands/mod.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ae195f12d53a51af496f8b7d18110bcdf9db1c98c63dbc9a87a17d8145d3e52"}},{"ruleId":"D1","level":"warning","message":{"text":"pagesCollector.Collect (cyclomatic 24): pagesCollector.Collect has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 189, 97, 122, \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":"hugolib/pages_capture.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"75d306c865fe4735bd8c8c6319b578437684bde9e7d369bf8855742149469460"}},{"ruleId":"D1","level":"warning","message":{"text":"AsciiDocConverter.ParseArgs (cyclomatic 24): AsciiDocConverter.ParseArgs 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":"markup/asciidocext/internal/converter.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"518ca53ab2777dbdfc24ea33e6aba1ee1184b412f41b439a4ea5df03749e0c0b"}},{"ruleId":"D1","level":"warning","message":{"text":"npm.ensureWorkspaceRef (cyclomatic 24): npm.ensureWorkspaceRef 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/npm/package_builder.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5a9a291e6afa2c8d17b7d374a011df2c299a400df423ea57979c46ae4fffac"}},{"ruleId":"D1","level":"warning","message":{"text":"collections.evaluateSubElem (cyclomatic 24): collections.evaluateSubElem 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":"tpl/collections/where.go"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"fad2864b0a3979813a72267a82009843213e41c9e9b372ffa70c95860fdb2dcb"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.Unmarshal (cyclomatic 24): Namespace.Unmarshal has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/transform/unmarshal.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"edcfa94b895f0a4e3965c8318a3a050818194821cd0de1312b2b12e3326dcfdc"}},{"ruleId":"D1","level":"warning","message":{"text":"collector.mountCommonJSConfig (cyclomatic 23): collector.mountCommonJSConfig 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/collect.go"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"c295e38429a36575e57e0e6e8df59e3d94f12a16adbb3b97076f511ddee992f9"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.Seq (cyclomatic 23): Namespace.Seq 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":"tpl/collections/collections.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"11af29e6fecf138df567330202d72af670ab63532eaffde1e230f36b1023121e"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.Union (cyclomatic 23): Namespace.Union 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":"tpl/collections/collections.go"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f8a417c3a4798651b128873a0b15525132feefdf8bcd26c8e078f3d4fdd2f89"}},{"ruleId":"D1","level":"warning","message":{"text":"Configs.Init (cyclomatic 22): Configs.Init 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"config/allconfig/allconfig.go"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"6651431384996fee6a647dbc5610ffe5fe798d67adae3a71d8a40809e856eeec"}},{"ruleId":"D1","level":"warning","message":{"text":"modules.ApplyProjectConfigDefaults (cyclomatic 22): modules.ApplyProjectConfigDefaults 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/config.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"8180e08b30c6b2d2dad405ebbdd9812282cbf171be8624d33929768976cc8b61"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.listGoMods (cyclomatic 22): Client.listGoMods has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/client.go"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0c065e9890ae47fe3980fecb18c061a73d68364f096d97fa8634777fea330de"}},{"ruleId":"D1","level":"warning","message":{"text":"InvertedIndex.searchDate (cyclomatic 22): InvertedIndex.searchDate 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":"related/inverted_index.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6bd46bc55686ed82e5bfe33ca0411a60c87648ca8893879859c6faeae58303b"}},{"ruleId":"D1","level":"warning","message":{"text":"Pages.GroupBy (cyclomatic 22): Pages.GroupBy 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":"resources/page/pagegroup.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0cd76171720c8bebe04aaabb3e4f891f8248f28f17ffa0c18c5c6ba3ee55f26"}},{"ruleId":"D1","level":"warning","message":{"text":"PathParser.applyPrefixIdentifier (cyclomatic 21): PathParser.applyPrefixIdentifier 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":"common/paths/pathparser.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ede95f54d56f132d389947e0f2c3bc4ff8540e98142db9e658ca88d53a38048"}},{"ruleId":"D1","level":"warning","message":{"text":"version.CompareVersions (cyclomatic 21): version.CompareVersions 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":"common/version/version.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"89ac7d874da38d1dbe668f5d268e61511ace2e3d4a7399b85434b9ea5bae67aa"}},{"ruleId":"D1","level":"warning","message":{"text":"config.LoadConfigFromDir (cyclomatic 21): config.LoadConfigFromDir has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"config/configLoader.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"534b79bc1aba34f98efc62f259c54872099a6a88657f4670b24c03339bb90f1d"}},{"ruleId":"D1","level":"warning","message":{"text":"Site.assembleMenus (cyclomatic 21): Site.assembleMenus 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":1417}}}],"partialFingerprints":{"codehealthFindingId/v1":"0341a2ab26d8136bf395b01ac94d75ac39dc0a543165f5edeec710787cd7d823"}},{"ruleId":"D1","level":"warning","message":{"text":"modules.decodeConfig (cyclomatic 21): modules.decodeConfig 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/config.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ff902bbdd9302874c31fd28dcb683ebf0327c712fae5d22db67a958d2377423"}},{"ruleId":"D1","level":"warning","message":{"text":"Filters.Text (cyclomatic 21): Filters.Text 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":"resources/images/filters.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"71232e54ff29bebd8e1727d3a49c725e65ab53361c0b0e1740a5984f0011e862"}},{"ruleId":"D1","level":"warning","message":{"text":"compare.compareFold (cyclomatic 20): compare.compareFold has cyclomatic complexity 20 (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":"compare/compare_strings.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8649a2cda114f1ecbca88fbe90154b632af250f91bcf66e378787db3de68181"}},{"ruleId":"D1","level":"warning","message":{"text":"RootMappingFs.collectDirEntries (cyclomatic 20): RootMappingFs.collectDirEntries 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 2 function literals inside it that branch (lines 532, 587). 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":"hugofs/rootmapping_fs.go"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8065adeeacfd4ce5dddd0793f1a11690e1d67ed01f8bd5f4048a271c80d49a2"}},{"ruleId":"D1","level":"warning","message":{"text":"pageMap.addPagesFromGoTmplFi (cyclomatic 20): pageMap.addPagesFromGoTmplFi has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"f809abc3de73e06d0b433e9181287a8f910c717353a581f46d49d72f6b8f0ecc"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.postProcess (cyclomatic 20): HugoSites.postProcess 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 2 function literals inside it that branch (lines 708, 659). 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab34c3b71966bf5f14c092d359a82bce230f967e47817f701d8d9466af3062ec"}},{"ruleId":"D1","level":"warning","message":{"text":"contentParseInfo.parseSource (cyclomatic 20): contentParseInfo.parseSource has cyclomatic complexity 20 (threshold 15). Of this number, 16 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":"hugolib/page__content.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"589768a0b3d072b644b6cfa311db5b8272581e61d15f7f05f161e9c3f06499ea"}},{"ruleId":"D1","level":"warning","message":{"text":"segmentsBuilder.buildOne (cyclomatic 20): segmentsBuilder.buildOne has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/segments/segments.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5981671037893b91fde233f23ced3c4f334e1d90ea1795a0eb819d9504d9e64"}},{"ruleId":"D1","level":"warning","message":{"text":"collector.applyThemeConfig (cyclomatic 20): collector.applyThemeConfig 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/collect.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d9fa534d9fe6fd4604511826fac5ef3de3c21040f9ff514e826473980e40fb"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.newElemResolver (cyclomatic 20): Namespace.newElemResolver has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/where.go"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba6586281688080df78714fb0b9a064c92f61d897374d9ae58fabc591846349"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.FormatNumberCustom (cyclomatic 20): Namespace.FormatNumberCustom 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":"tpl/lang/lang.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1c5df1f93b5b79b177f60c239707378edbf7ebd2865317c13a6c7b51a1d222"}},{"ruleId":"D1","level":"warning","message":{"text":"filecache.DecodeConfig (cyclomatic 19): filecache.DecodeConfig 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":"cache/filecache/filecache_config.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2dbef5714bf5c088fbe9e209ad98c0ed5d3c4efa0d32286bf30825eb5597302"}},{"ruleId":"D1","level":"warning","message":{"text":"aliasHandler.targetPathAlias (cyclomatic 19): aliasHandler.targetPathAlias 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":"hugolib/alias.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ddde2bfc15ab1267dc35f8cf9beb324240b9ae78fd72b8195f0d171ba281d65"}},{"ruleId":"D1","level":"warning","message":{"text":"hugolib.createTargetPathDescriptor (cyclomatic 19): hugolib.createTargetPathDescriptor has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, 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":"hugolib/page__paths.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"b026dc0814f7355205f32b14023a85dfb1ef5554d2ed975588df2c7c107c0d13"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.assemble (cyclomatic 19): HugoSites.assemble 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"090888daf36d1f43fd63b0dc7d7c7c103df16d66064d7f53835ef0784c311b09"}},{"ruleId":"D1","level":"warning","message":{"text":"cachedContentScope.contentRendered (cyclomatic 19): cachedContentScope.contentRendered 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 499). 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":"hugolib/page__content.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"122c630bd2d0d3bbdbebd6ce074e8eebc792ce6917d95ba6cdf787ced7baee8b"}},{"ruleId":"D1","level":"warning","message":{"text":"collector.normalizeMounts (cyclomatic 19): collector.normalizeMounts 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/collect.go"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"75de92b6fb0a08d29f546705700ccead90ec7507c35009e4a9342c220d088a22"}},{"ruleId":"D1","level":"warning","message":{"text":"pageparser.lexShortcodeParam (cyclomatic 19): pageparser.lexShortcodeParam 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":"parser/pageparser/pagelexer_shortcode.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c2a3ea1043d6b05bba5ff07244f22ac3322b07bc7ff16d733d28905e0d34b70"}},{"ruleId":"D1","level":"warning","message":{"text":"textFilter.Draw (cyclomatic 19): textFilter.Draw 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":"resources/images/text.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94fbf78c6bf561750a34d4ac2d275e7b107457e761e9cac0552cd6224a77a4b"}},{"ruleId":"D1","level":"warning","message":{"text":"babelTransformation.Transform (cyclomatic 19): babelTransformation.Transform 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":"resources/resource_transformers/babel/babel.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"358beece506ff59385ffc9082c4ac02b93a1b838a335d18b2349d69ff543e662"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.newMethodResolver (cyclomatic 19): Namespace.newMethodResolver has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/where.go"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6773f7f8a84fdff6c6f500f4f0a75471d554ec75e3355be6de8af332314a725"}},{"ruleId":"D1","level":"warning","message":{"text":"TemplateStore.parseTemplates (cyclomatic 19): TemplateStore.parseTemplates 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 1658). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"17229149ee2d688786469ace562b6146ec1c34b85979c69bb9334f0ddd477da8"}},{"ruleId":"D1","level":"warning","message":{"text":"TemplateStore.toKeyCategoryAndDescriptor (cyclomatic 19): TemplateStore.toKeyCategoryAndDescriptor 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1810}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f5e863beb4893b858e258b029bea6e4f50f123df4c092cf03f53826531c264"}},{"ruleId":"D1","level":"warning","message":{"text":"Inspector.MethodsFromTypes (cyclomatic 18): Inspector.MethodsFromTypes has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"codegen/methods.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"894f89b867c70a4296dc6141829ace73c22d597df310864e2ff186b3b7fd070f"}},{"ruleId":"D1","level":"warning","message":{"text":"componentFs.applyMeta (cyclomatic 18): componentFs.applyMeta 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":"hugofs/component_fs.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4c20b1349676c80bc2b2ba8243a75bdb3d681b037f5fb35298ae1eafb21be7"}},{"ruleId":"D1","level":"warning","message":{"text":"hugolib.newHugoSites (cyclomatic 18): hugolib.newHugoSites has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f624c65a92bd7c8fcd13405241f0c815696ebc07a1a3b01d0cea141e3341523"}},{"ruleId":"D1","level":"warning","message":{"text":"sitePagesAssembler.assembleResourcesAndSetHome (cyclomatic 18): sitePagesAssembler.assembleResourcesAndSetHome 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 1231). 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":1224}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c41f50b07b66898a3dbdf5dfbb9c2a85ceb7fafe9ba54a163cb4fcd886ae9e8"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.resolveAndResetDependententPageOutputs (cyclomatic 18): HugoSites.resolveAndResetDependententPageOutputs has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1106, 1086, 1144, \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":"hugolib/content_map_page.go"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"94c896ce7318e8032842affe22489e9aea025688c07c5d15dd95b43106ebc13b"}},{"ruleId":"D1","level":"warning","message":{"text":"pageMeta.applyDefaultValues (cyclomatic 18): pageMeta.applyDefaultValues 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":"hugolib/page__meta.go"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae8fe591fdc8f4b91abd07f65df61b4506374cb733b02105f3d4ae4dc8a4ffd4"}},{"ruleId":"D1","level":"warning","message":{"text":"pagesCollector.collectDirDir (cyclomatic 18): pagesCollector.collectDirDir 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 2 function literals inside it that branch (lines 267, 260). 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":"hugolib/pages_capture.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c79d0c3233251016937967b851b7e5375ab6cdcef2556ecc022753987b58af0"}},{"ruleId":"D1","level":"warning","message":{"text":"siteRefLinker.refLink (cyclomatic 18): siteRefLinker.refLink 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":"hugolib/site.go"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfcd10e3645245f92be907c48729b440d83388067e9eed5ad7d5ac310da9b408"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.Get (cyclomatic 18): Client.Get 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/client.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab3aba3e1e37aaf6b72e3782df04b96bb8647e2fc0f9014be9d8efc09afbd20"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.writeHugoDirectSum (cyclomatic 18): Client.writeHugoDirectSum has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/client.go"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a39e0ff63f1f140062dd22c1825431c0d10285993aaf63dca4805eadcf09c49"}},{"ruleId":"D1","level":"warning","message":{"text":"pageparser.lexInsideShortcode (cyclomatic 18): pageparser.lexInsideShortcode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"parser/pageparser/pagelexer_shortcode.go"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74bec43713cb7a42515582645641e76eaa6147c15146f6ebecc1ccfc4082ac0"}},{"ruleId":"D1","level":"warning","message":{"text":"InvertedIndex.Search (cyclomatic 18): InvertedIndex.Search 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":"related/inverted_index.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"5be05f8a8de564fd359b83460238762994bb6d09abb00c3232d5f99840061826"}},{"ruleId":"D1","level":"warning","message":{"text":"PermalinkExpander.toSliceFunc (cyclomatic 18): PermalinkExpander.toSliceFunc has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 432, 473, 491). 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":"resources/page/permalinks.go"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e3bcf94f15b54376cc24d0dc595b3cc134beeef251cb3b86fa77fa3f5dc6700"}},{"ruleId":"D1","level":"warning","message":{"text":"ResourceSourceDescriptor.init (cyclomatic 18): ResourceSourceDescriptor.init 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":"resources/resource.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b9e4535902693f4e3762cfcbf63da54af29ce6d2fc9a02daae68218b5a0104"}},{"ruleId":"D1","level":"warning","message":{"text":"postcssTransformation.Transform (cyclomatic 18): postcssTransformation.Transform 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":"resources/resource_transformers/cssjs/postcss.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec906cfdb3801e0f8d6a81bd14eea25dd12785fb7a82d9fa43d2d006052ebbc3"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.transform (cyclomatic 18): Client.transform 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":"resources/resource_transformers/js/build.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ab8c9e6f40fc082867793d8c69579e1144ea68e25972f6d3904cfd79bdea68"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.doIndex (cyclomatic 18): Namespace.doIndex has cyclomatic complexity 18 (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":"tpl/collections/index.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7064f70eed48d125c9d262f7f53a6f97d49edb66c6bdfcbdb47eb105cb98be7e"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.Substr (cyclomatic 18): Namespace.Substr 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":"tpl/strings/strings.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca8c00c4751a792f1b08a9e3e0932901b1c38fe3db8ff3fb3ffe77b835cbebbc"}},{"ruleId":"D1","level":"warning","message":{"text":"descriptorHandler.compareDescriptors (cyclomatic 18): descriptorHandler.compareDescriptors 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":"tpl/tplimpl/templatedescriptor.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd0fd970b0df5527a9aa9f093c76437b23521fbb85586f29113988abcde6aebe"}},{"ruleId":"D1","level":"warning","message":{"text":"bestMatch.isBetter (cyclomatic 18): bestMatch.isBetter 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":2073}}}],"partialFingerprints":{"codehealthFindingId/v1":"307c90c2447aa4f62b1385b939d593753d35222c9e1dbdb4b484a5e8bd2370bb"}},{"ruleId":"D1","level":"warning","message":{"text":"Methods.ToMarshalJSON (cyclomatic 17): Methods.ToMarshalJSON 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":"codegen/methods.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e0d04de06d9d9846204616f8b002a1311b3c2b0c4cac665ed6e34f44abe66ce"}},{"ruleId":"D1","level":"warning","message":{"text":"importCommand.copyJekyllFilesAndFolders (cyclomatic 17): importCommand.copyJekyllFilesAndFolders 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":"commands/import.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52928bf2a8a9420e818bf1bbf8541f8862653b65878707519b6cf32e019f87c"}},{"ruleId":"D1","level":"warning","message":{"text":"defaultConfigProvider.determineMergeStrategy (cyclomatic 17): defaultConfigProvider.determineMergeStrategy 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":"config/defaultConfigProvider.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"e26119bd090a6add8db8249bebe32a987f0175191685f70bc9f69a75e6dd621a"}},{"ruleId":"D1","level":"warning","message":{"text":"contentBuilder.buildDir (cyclomatic 17): contentBuilder.buildDir 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":"create/content.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bee4e5cadeb784db775bb12c720d779ae563cbcadfda80a89f910006bd578f2"}},{"ruleId":"D1","level":"warning","message":{"text":"PathSpec.RelURL (cyclomatic 17): PathSpec.RelURL 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":"helpers/url.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"05862c07f8a2bdf423b9efaccdd6d047785151c78c2baba5a98a936d535f613c"}},{"ruleId":"D1","level":"warning","message":{"text":"FilenameFilter.doMatch (cyclomatic 17): FilenameFilter.doMatch 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":"hugofs/hglob/filename_filter.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d3d05e734494ad32c282b0c5774666c813cca467fe6119fe2a94cad123aeed"}},{"ruleId":"D1","level":"warning","message":{"text":"pageMap.getOrCreateResourcesForPage (cyclomatic 17): pageMap.getOrCreateResourcesForPage 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 592). 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":"hugolib/content_map_page.go"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"8412b6da5f4acf473126b3ed924193832ef2cdc7d30330d8d5ef13b2fafb4007"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.render (cyclomatic 17): HugoSites.render has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 439, 408). 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bde65d10d6722d6c89f535d0c2a5f2ce84919be23465cc3d03380587dbe3fbe"}},{"ruleId":"D1","level":"warning","message":{"text":"HugoSites.fileEventsContentPaths (cyclomatic 17): HugoSites.fileEventsContentPaths 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":"hugolib/site.go"},"region":{"startLine":1321}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e3549e8cc8450963a9e906167a6ea29ca0193bf4baa178ab92fa6091120913f"}},{"ruleId":"D1","level":"warning","message":{"text":"pageState.shiftToOutputFormat (cyclomatic 17): pageState.shiftToOutputFormat has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page.go"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f4381c77ed6e7305aab96985b5c5e98e8327db3e901180613ce0440e53536a"}},{"ruleId":"D1","level":"warning","message":{"text":"Site.renderDefaultSiteRedirect (cyclomatic 17): Site.renderDefaultSiteRedirect 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":"hugolib/site_render.go"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4fcb936ec0cf521593686820ddfad4be746db7890fb497a53b59b7adefedcf3"}},{"ruleId":"D1","level":"warning","message":{"text":"Finder.doCheckOne (cyclomatic 17): Finder.doCheckOne 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":"identity/finder.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc6f6369ad4f2437199beed338e34168d62e92494f2d438326e668ee8222f840"}},{"ruleId":"D1","level":"warning","message":{"text":"tocTransformer.Transform (cyclomatic 17): tocTransformer.Transform has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 65). 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":"markup/goldmark/toc.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a085ca04efcbde8dde8b72d2030bfa3260289f7ca062f8f2a627dc17c11bf3"}},{"ruleId":"D1","level":"warning","message":{"text":"highlight.highlight (cyclomatic 17): highlight.highlight has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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":"markup/highlight/highlight.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"3602d9f0b07a71d7cf721013f34a166276685e2ebe86ba15bd6323fdc96a3b20"}},{"ruleId":"D1","level":"warning","message":{"text":"npm.PackageFilesSum (cyclomatic 17): npm.PackageFilesSum has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/npm/package_builder.go"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb4dae6bfb2b83cd8ec54fbffe42d63aab7148e9df63e95186d681647f2cd45"}},{"ruleId":"D1","level":"warning","message":{"text":"metadecoders.validateAliasLimitForCollections (cyclomatic 17): metadecoders.validateAliasLimitForCollections has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 237, 222). 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":"parser/metadecoders/decoder.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d15dca4d198512f28e4bb955103bd3e798e925c16e81dcbccde0d2a3a021900"}},{"ruleId":"D1","level":"warning","message":{"text":"Codec.EncodeTo (cyclomatic 17): Codec.EncodeTo 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":"resources/images/codec.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"dceb46774ea20a25fbf4276575ae0824fea75943408c7a14a6a4f3ce266dc49e"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageProcessor.doFilter (cyclomatic 17): ImageProcessor.doFilter has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function taking that case\u0027s concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases \u2014 they stay explicit and reviewable."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/image.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76f0bbb85e75a60e5176581f3fb3f559fc1a6308884b7a8d0e28e283fca1c6b"}},{"ruleId":"D1","level":"warning","message":{"text":"FrontMatterHandler.createContentAdapterDatesHandler (cyclomatic 17): FrontMatterHandler.createContentAdapterDatesHandler has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 939, 912, 925). 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":"resources/page/pagemeta/page_frontmatter.go"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7f43048f44cfc4ab30e487f19d27c407af53960e1cafb9a8845c35a3720ec9"}},{"ruleId":"D1","level":"warning","message":{"text":"transport.RoundTrip (cyclomatic 17): transport.RoundTrip 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":"resources/resource_factories/create/remote.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"561fd9948ae90ac0e256356c7262484028db18389d4b6c54fbbffdeb3443ecfc"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.checkWhereArray (cyclomatic 17): Namespace.checkWhereArray 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":"tpl/collections/where.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b9fe04cfc51367967bd35f4e5533dc4cffe55c042474a8487a5fcead42eef7"}},{"ruleId":"D1","level":"warning","message":{"text":"state.validateType (cyclomatic 17): state.validateType 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":"tpl/internal/go_templates/texttemplate/hugo_template.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"527718bc8a9113872aa9c05c3468e175e4934b2b6fc6be3ab6ff3e4abfcb3848"}},{"ruleId":"D1","level":"warning","message":{"text":"Namespace.Unmarshal (cyclomatic 17): Namespace.Unmarshal has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 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":"tpl/openapi/openapi3/openapi3.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"64fe55311d8b22fd730485fe55c38eb6898eab3589d4f64986b60f95a1abcc07"}},{"ruleId":"D1","level":"warning","message":{"text":"templateNamespace.doParseTemplate (cyclomatic 17): templateNamespace.doParseTemplate 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":"tpl/tplimpl/templates.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8c323e074f8232e1f319b7d1ac522ae34a3770dbcbe2b7eb2046d59f04f0592"}},{"ruleId":"D1","level":"warning","message":{"text":"TemplateStore.insertEmbedded (cyclomatic 17): TemplateStore.insertEmbedded has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 1092). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff33f948e56a1d5f8b81ff9d40edfe9e330857b1f307af4d7a9ffb20799d0bfc"}},{"ruleId":"D1","level":"warning","message":{"text":"Inspector.parseSource (cyclomatic 16): Inspector.parseSource 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 172). 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":"codegen/methods.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"654bf842e25dab7e515feba300e788544bbef98b1c01201811eb99e45746b5a2"}},{"ruleId":"D1","level":"warning","message":{"text":"pageMap.getPagesInSection (cyclomatic 16): pageMap.getPagesInSection 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 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":"hugolib/content_map_page.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"e852af2a794bfcec81d2f89302bd978f04fa07e5ba993f9d5bc167e71cbdb684"}},{"ruleId":"D1","level":"warning","message":{"text":"allPagesAssembler.createMissingStandalonePages (cyclomatic 16): allPagesAssembler.createMissingStandalonePages has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map_page_assembler.go"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a241eb89d9094ee9a171873fd79e19638ff220c9e55d7ef0e7fd4652a71cda5"}},{"ruleId":"D1","level":"warning","message":{"text":"pageState.setMetaPost (cyclomatic 16): pageState.setMetaPost 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":"hugolib/page__meta.go"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7911dbaed50515f11595767e9601b6f3c880be2e1550289f368f064760418e9"}},{"ruleId":"D1","level":"warning","message":{"text":"cachedContentScope.RenderShortcodes (cyclomatic 16): cachedContentScope.RenderShortcodes 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":"hugolib/page__content.go"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7aa3829b8f13a6466539709ff3da1b32ecdd3dcf238e15d61b534296fa30581"}},{"ruleId":"D1","level":"warning","message":{"text":"pageMetaSource.doInitEarly (cyclomatic 16): pageMetaSource.doInitEarly 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":"hugolib/page__meta.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1f22d1cce437987c25db58b39bd0ac4dccae8011862cf5528c0c8194695b273"}},{"ruleId":"D1","level":"warning","message":{"text":"Site.prepareInits (cyclomatic 16): Site.prepareInits 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 4 function literals inside it that branch (lines 897, 867, 946, \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":"hugolib/site.go"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"acee1b5d3506ba85973b5e28a02b6d9033bcff06d6a90d29e479c57a601fdefc"}},{"ruleId":"D1","level":"warning","message":{"text":"AvifCodec.Decode (cyclomatic 16): AvifCodec.Decode has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d8456d85c462b5eba0d329faef2d1a2abb250b4926951eed11972d1a4954b4d"}},{"ruleId":"D1","level":"warning","message":{"text":"WebpCodec.Encode (cyclomatic 16): WebpCodec.Encode has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/webp.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1494d3a7cc02b2b0f58bca03d16d42ca6ec69757bf691934a085032e875a7b"}},{"ruleId":"D1","level":"warning","message":{"text":"transformer.Transform (cyclomatic 16): transformer.Transform has cyclomatic complexity 16 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"markup/goldmark/internal/extensions/attributes/attributes.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef07f843a70e3696b52a7ef04a15829fe548659ce96e46d3ff9881ff3df8328"}},{"ruleId":"D1","level":"warning","message":{"text":"highlight.ChromaStylesCSS (cyclomatic 16): highlight.ChromaStylesCSS 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":"markup/highlight/chromastyles.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf001572d1a6d0895abf565193f0f30f5623ead56326e3b8616a3fa72d439709"}},{"ruleId":"D1","level":"warning","message":{"text":"minifiers.DecodeConfig (cyclomatic 16): minifiers.DecodeConfig 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":"minifiers/config.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"a388602a7e157d12384616b7b2828c990169ee28615931f759c26d56637fca04"}},{"ruleId":"D1","level":"warning","message":{"text":"pageparser.lexShortcodeQuotedParamVal (cyclomatic 16): pageparser.lexShortcodeQuotedParamVal 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":"parser/pageparser/pagelexer_shortcode.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"e208ab4dcdebb90efe5cada0f7dc801d8b8428776203a72ea3aa0a55b9b4544a"}},{"ruleId":"D1","level":"warning","message":{"text":"resources.assignMetadata (cyclomatic 16): resources.assignMetadata 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":"resources/resource_metadata.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f0b7cbd629a052ada0f330edfcd7488cffa90985a708f5f61b220aa1060fd08"}},{"ruleId":"D1","level":"warning","message":{"text":"PageConfigEarly.CompileEarly (cyclomatic 16): PageConfigEarly.CompileEarly 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":"resources/page/pagemeta/page_frontmatter.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc18b09bf8c0ef6220a845a6571fb81ca2855b278c5890b29b47c5986bdb9123"}},{"ruleId":"D1","level":"warning","message":{"text":"templateTransformContext.applyTransformations (cyclomatic 16): templateTransformContext.applyTransformations has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function taking that case\u0027s concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases \u2014 they stay explicit and reviewable."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimpl/templatetransform.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eba8217845712feab126ec309ab36ed50800990daedc85044a7e157c35d56d2"}},{"ruleId":"D2","level":"warning","message":{"text":"allPagesAssembler.doCreatePages (cognitive 243): allPagesAssembler.doCreatePages has cognitive complexity 243 (threshold 15). Drivers by points: if/else 196, loops 20, boolean chains 14, match/switch 13 (nesting depth added 107). Most of this is not in the body itself: 8 of the 243 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 226, 463, 762, \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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed100c9d09b4d7c242896053be94cae3e0e6c8ae9cbd06626097bb833ecbcf56"}},{"ruleId":"D2","level":"warning","message":{"text":"hugoBuilder.handleEvents (cognitive 173): hugoBuilder.handleEvents has cognitive complexity 173 (threshold 15). Drivers by points: if/else 139, loops 21, boolean chains 13 (nesting depth added 92). Of this number, 143 points are the body\u0027s own statements and 30 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":"commands/hugobuilder.go"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b015ad24571dd2ad3300453040333e3d54eab26d58a72c529089804f8d48f65"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.processPartialFileEvents (cognitive 139): HugoSites.processPartialFileEvents has cognitive complexity 139 (threshold 15). Drivers by points: if/else 104, loops 28, boolean chains 6, match/switch 1 (nesting depth added 63). Of this number, 61 points are the body\u0027s own statements and 78 belong to 7 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"68aee135248856b28b9a0eacceec789e5403df5899d9bf0b5125de201aceaa55"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.checkCondition (cognitive 128): Namespace.checkCondition has cognitive complexity 128 (threshold 15). Drivers by points: if/else 64, boolean chains 27, match/switch 24, loops 13 (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":"tpl/collections/where.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8808833a5b6b8ad9b145ad25d2a791b460a9236b2005c5217501e5ff4fb8e0ca"}},{"ruleId":"D2","level":"warning","message":{"text":"pageState.setMetaPostParams (cognitive 115): pageState.setMetaPostParams has cognitive complexity 115 (threshold 15). Drivers by points: if/else 71, loops 27, match/switch 13, boolean chains 4 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__meta.go"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"e308ce9429769c3aad72bd37992823c5d46cf5b19c023bd4d57e27dd9916e8b8"}},{"ruleId":"D2","level":"warning","message":{"text":"Config.CompileConfig (cognitive 98): Config.CompileConfig has cognitive complexity 98 (threshold 15). Drivers by points: if/else 81, loops 15, boolean chains 1, match/switch 1 (nesting depth added 43). Of this number, 92 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"config/allconfig/allconfig.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"560a652e04dcd2ce984168b10717597c0fe76c354362231ff75ec2c0c6e3a453"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.insertTemplates (cognitive 98): TemplateStore.insertTemplates has cognitive complexity 98 (threshold 15). Drivers by points: if/else 75, loops 11, boolean chains 8, match/switch 4 (nesting depth added 43). Most of this is not in the body itself: 12 of the 98 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1363, 1610). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1349}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec17aaa79a70643e2323055311d57b9e0153a91e5d5a585abbaf272f8bcfec2c"}},{"ruleId":"D2","level":"warning","message":{"text":"componentFsDir.ReadDirWithContext (cognitive 96): componentFsDir.ReadDirWithContext has cognitive complexity 96 (threshold 15). Drivers by points: if/else 74, boolean chains 8, loops 8, match/switch 6 (nesting depth added 50). Of this number, 75 points are the body\u0027s own statements and 21 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugofs/component_fs.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6fe3fc098dbb1d391591945b4b61648f7261f58b7fe65bc1d010171947ad327"}},{"ruleId":"D2","level":"warning","message":{"text":"shortcodeParseInfo.extractShortcode (cognitive 94): shortcodeParseInfo.extractShortcode has cognitive complexity 94 (threshold 15). Drivers by points: if/else 88, boolean chains 2, match/switch 2, jumps 1, loops 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/shortcode.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ded4ba606f4068f054199067cc6d2864dfeeb98468ccf1109d50ae79b544ccd"}},{"ruleId":"D2","level":"warning","message":{"text":"page.CreateTargetPaths (cognitive 86): page.CreateTargetPaths has cognitive complexity 86 (threshold 15). Drivers by points: if/else 68, boolean chains 18 (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":"resources/page/page_paths.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3938e6468f94ad153540af13fd6e1d327c645823d4f7fb7a9db77f694b24c0"}},{"ruleId":"D2","level":"warning","message":{"text":"BuildClient.Build (cognitive 79): BuildClient.Build has cognitive complexity 79 (threshold 15). Drivers by points: if/else 68, loops 10, boolean chains 1 (nesting depth added 41). Of this number, 24 points are the body\u0027s own statements and 55 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":"internal/js/esbuild/build.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"941d2fde7521776070c708e69b8cc4840c6828e77a71013611cf8cf517db552a"}},{"ruleId":"D2","level":"warning","message":{"text":"fileServer.createEndpoint (cognitive 77): fileServer.createEndpoint has cognitive complexity 77 (threshold 15). Drivers by points: if/else 69, match/switch 4, boolean chains 3, loops 1 (nesting depth added 43). Most of this is not in the body itself: 12 of the 77 points are its own statements and the rest belongs to one function literal inside it that branches (line 271). 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":"commands/server.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5872fb0e94e49a2059133d1ec801c954bc8ae8afa53b91e92325e797157732a"}},{"ruleId":"D2","level":"warning","message":{"text":"hugolib.pageRenderer (cognitive 76): hugolib.pageRenderer has cognitive complexity 76 (threshold 15). Drivers by points: if/else 66, boolean chains 6, match/switch 3, loops 1 (nesting depth added 40). Of this number, 75 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":"hugolib/site_render.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76dfa4574fde99cdfa50fd3aa6225bf7166cd669c0adea09a6c31987ac04946"}},{"ruleId":"D2","level":"warning","message":{"text":"allconfig.fromLoadConfigResult (cognitive 75): allconfig.fromLoadConfigResult has cognitive complexity 75 (threshold 15). Drivers by points: if/else 55, match/switch 13, loops 5, boolean chains 2 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"config/allconfig/allconfig.go"},"region":{"startLine":1035}}}],"partialFingerprints":{"codehealthFindingId/v1":"8885b2fab38866512061ce7ebd95135b67d495e249ccb6911b014a436d0b1bde"}},{"ruleId":"D2","level":"warning","message":{"text":"images.DecodeImageConfig (cognitive 73): images.DecodeImageConfig has cognitive complexity 73 (threshold 15). Drivers by points: if/else 63, boolean chains 7, loops 2, match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/config.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"645076fd050cf2e8de6aa668eb84dc4dfeb334a77db3f034abd3944e33e8c87d"}},{"ruleId":"D2","level":"warning","message":{"text":"collector.getAndCreateModule (cognitive 69): collector.getAndCreateModule has cognitive complexity 69 (threshold 15). Drivers by points: if/else 68, boolean chains 1 (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":"modules/collect.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff126fc74751ed42c31670a9a6a084ba80d5c3a41d3d6a5848d0ef4b42fa6e39"}},{"ruleId":"D2","level":"warning","message":{"text":"PathParser.parseIdentifier (cognitive 68): PathParser.parseIdentifier has cognitive complexity 68 (threshold 15). Drivers by points: if/else 57, boolean chains 11 (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":"common/paths/pathparser.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc2664d3c7b15720da5643b05db90c05c0c410da00604338fd8135ff5e82147"}},{"ruleId":"D2","level":"warning","message":{"text":"resourceAdapter.transform (cognitive 66): resourceAdapter.transform has cognitive complexity 66 (threshold 15). Drivers by points: if/else 57, boolean chains 5, match/switch 3, loops 1 (nesting depth added 30). Of this number, 61 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":"resources/transform.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"d812a8419e8df2af6b0a096b3dde07e2635104522bc28f290c759f75e3e9bdfa"}},{"ruleId":"D2","level":"warning","message":{"text":"sourceFilesystemsBuilder.createOverlayFs (cognitive 64): sourceFilesystemsBuilder.createOverlayFs has cognitive complexity 64 (threshold 15). Drivers by points: if/else 57, loops 6, boolean chains 1 (nesting depth added 35). Of this number, 58 points are the body\u0027s own statements and 6 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":"hugolib/filesystems/basefs.go"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bc23cc2dda54310cd6dccc25e57eb7333cff43da4e2b3285399baaa21e25467"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Truncate (cognitive 64): Namespace.Truncate has cognitive complexity 64 (threshold 15). Drivers by points: if/else 54, loops 5, boolean chains 4, match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/strings/truncate.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"6278d6caaabed8c15484204e47e05211e46c3107a033ad0126aeff15617c0aec"}},{"ruleId":"D2","level":"warning","message":{"text":"hugolib.doRenderShortcode (cognitive 62): hugolib.doRenderShortcode has cognitive complexity 62 (threshold 15). Drivers by points: if/else 48, boolean chains 6, match/switch 6, loops 2 (nesting depth added 32). Of this number, 60 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":"hugolib/shortcode.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3cd33d3f68ae55c346e56619bfa6451fda877a2c82f0813d5cd98df6f4cd7b"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Sort (cognitive 62): Namespace.Sort has cognitive complexity 62 (threshold 15). Drivers by points: if/else 41, loops 13, boolean chains 4, match/switch 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":"tpl/collections/sort.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8c32a4519593a3ed91d9b8ad8fd70c57ec0a698a8b813649d8fa85cb34e9055"}},{"ruleId":"D2","level":"warning","message":{"text":"PathParser.doParse (cognitive 61): PathParser.doParse has cognitive complexity 61 (threshold 15). Drivers by points: if/else 46, boolean chains 8, match/switch 6, 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":"common/paths/pathparser.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"a492b1c1f64ac12b7535e91f04b538e8d844a6088ac7415e496a5d1413073d80"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateDescriptor.doCompare (cognitive 61): TemplateDescriptor.doCompare has cognitive complexity 61 (threshold 15). Drivers by points: if/else 41, boolean chains 20 (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":"tpl/tplimpl/templatedescriptor.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"290d597b966a82a409d4f726c38469f9513154a744bcae1e3abc53288ab14cd2"}},{"ruleId":"D2","level":"warning","message":{"text":"pagesCollector.Collect (cognitive 60): pagesCollector.Collect has cognitive complexity 60 (threshold 15). Drivers by points: if/else 51, loops 6, boolean chains 3 (nesting depth added 35). Of this number, 20 points are the body\u0027s own statements and 40 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":"hugolib/pages_capture.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b161108b181a619f82dfaa0d947af586a532b3bce5085bac0f216a02a62d9db"}},{"ruleId":"D2","level":"warning","message":{"text":"batcher.doBuild (cognitive 60): batcher.doBuild has cognitive complexity 60 (threshold 15). Drivers by points: if/else 47, loops 13 (nesting depth added 23). Of this number, 29 points are the body\u0027s own statements and 31 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/batch.go"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"9afeb33c9a1b485c7802975dfcf5cf868ca4ebaaba7341998bcf9c3bca38a85e"}},{"ruleId":"D2","level":"warning","message":{"text":"InvertedIndex.searchDate (cognitive 60): InvertedIndex.searchDate has cognitive complexity 60 (threshold 15). Drivers by points: if/else 48, loops 10, boolean chains 2 (nesting depth added 38). Of this number, 59 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":"related/inverted_index.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f0271f0f6a19699e125ef366482fc8c55c9315fa4953cf4cf874c3f870f12fe"}},{"ruleId":"D2","level":"warning","message":{"text":"cachedContentScope.RenderString (cognitive 59): cachedContentScope.RenderString has cognitive complexity 59 (threshold 15). Drivers by points: if/else 56, boolean chains 3 (nesting depth added 27). Of this number, 44 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":"hugolib/page__content.go"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"52667d4cbd1723e9333eb8753a7638b7cea9e2122e400ab357ef2b5d9c909be6"}},{"ruleId":"D2","level":"warning","message":{"text":"Walkway.walk (cognitive 58): Walkway.walk has cognitive complexity 58 (threshold 15). Drivers by points: if/else 50, loops 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":"hugofs/walk.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b47fdfbfe232f733c9977320e500cb8f9c812a4e9fd422448fa47823181ab0"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.Vendor (cognitive 57): Client.Vendor has cognitive complexity 57 (threshold 15). Drivers by points: if/else 50, loops 5, boolean chains 2 (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":"modules/client.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"cebcaac2861a01c5bfcc21831012f0fa59b1d9319dbfb2b195f262f2c49e1c83"}},{"ruleId":"D2","level":"warning","message":{"text":"hugolib.NewHugoSites (cognitive 56): hugolib.NewHugoSites has cognitive complexity 56 (threshold 15). Drivers by points: if/else 42, loops 10, boolean chains 4 (nesting depth added 21). Of this number, 55 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"d921cc27e074240a6aa4e532ad3863e0a10760d78f8d2b7fb72d111f73a6d5e9"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.resolveAndClearStateForIdentities (cognitive 55): HugoSites.resolveAndClearStateForIdentities has cognitive complexity 55 (threshold 15). Drivers by points: if/else 38, loops 15, boolean chains 2 (nesting depth added 27). Of this number, 39 points are the body\u0027s own statements and 16 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":"hugolib/content_map_page.go"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf6d754dc19b0e2b33d5456a7611861b96528cd2f8f8cb051daa36a461e11792"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.Build (cognitive 53): HugoSites.Build has cognitive complexity 53 (threshold 15). Drivers by points: if/else 44, loops 6, boolean chains 3 (nesting depth added 17). Of this number, 33 points are the body\u0027s own statements and 20 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5416a0b85c170d237bba18b0b8208c9618c2a3a044651f2a40236b50200716d"}},{"ruleId":"D2","level":"warning","message":{"text":"esbuild.createBuildPlugins (cognitive 52): esbuild.createBuildPlugins has cognitive complexity 52 (threshold 15). Drivers by points: if/else 46, boolean chains 3, loops 3 (nesting depth added 16). Most of this is not in the body itself: 2 of the 52 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 192, 360, 306). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/resolve.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5ee0d0d649920d1bdd5547a54b5ce38fda18c91d7834ee5761565c6ba4941e"}},{"ruleId":"D2","level":"warning","message":{"text":"AvifCodec.Encode (cognitive 51): AvifCodec.Encode has cognitive complexity 51 (threshold 15). Drivers by points: if/else 36, loops 11, match/switch 3, 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":"internal/warpc/avif.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"28dd2b993f9f4cb67adef256d0bf6fef4a70fba0833b657a6d13a228c6363b92"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.parseTemplates (cognitive 51): TemplateStore.parseTemplates has cognitive complexity 51 (threshold 15). Drivers by points: if/else 35, loops 16 (nesting depth added 33). Most of this is not in the body itself: 15 of the 51 points are its own statements and the rest belongs to one function literal inside it that branches (line 1658). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f4bb0ac4c5313a2ae193475d9be6501b4b24977c65820da17781af57c876a5"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.render (cognitive 50): HugoSites.render has cognitive complexity 50 (threshold 15). Drivers by points: if/else 40, loops 7, match/switch 3 (nesting depth added 33). Most of this is not in the body itself: 11 of the 50 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 439, 408). 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"aab657c45f14364ed9157308d074b2968b3a28d829b6b3692f09960cc54246f1"}},{"ruleId":"D2","level":"warning","message":{"text":"state.evalField (cognitive 49): state.evalField has cognitive complexity 49 (threshold 15). Drivers by points: if/else 41, match/switch 5, boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/internal/go_templates/texttemplate/hugo_template.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fe9c295200b874478bc31dd83e1e9e553c497464d4474a5ec4304205a54684b"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.insertTemplate2 (cognitive 49): TemplateStore.insertTemplate2 has cognitive complexity 49 (threshold 15). Drivers by points: if/else 40, boolean chains 7, loops 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1235}}}],"partialFingerprints":{"codehealthFindingId/v1":"e865f002c30478621f3b80ca07a4b2fe5efa4f665b20fec580e692b6728d6553"}},{"ruleId":"D2","level":"warning","message":{"text":"AsciiDocConverter.ParseArgs (cognitive 48): AsciiDocConverter.ParseArgs has cognitive complexity 48 (threshold 15). Drivers by points: if/else 46, 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":"markup/asciidocext/internal/converter.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"c814fcf1e37075bd6912206ebefc40ed860cb5ec6980904061b61252abb6b97c"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Union (cognitive 48): Namespace.Union has cognitive complexity 48 (threshold 15). Drivers by points: if/else 31, match/switch 7, loops 6, boolean chains 4 (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":"tpl/collections/collections.go"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"cceb4dd73f5e0268ca82a21abc0137d3161116a34046e18e1a96498819e57cbe"}},{"ruleId":"D2","level":"warning","message":{"text":"configLoader.loadConfigMain (cognitive 47): configLoader.loadConfigMain has cognitive complexity 47 (threshold 15). Drivers by points: if/else 43, 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":"config/allconfig/load.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4379936e11f23cec051a6eca1d391390e34def7a77329045109077871101572"}},{"ruleId":"D2","level":"warning","message":{"text":"modules.decodeConfig (cognitive 47): modules.decodeConfig has cognitive complexity 47 (threshold 15). Drivers by points: if/else 33, loops 13, 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":"modules/config.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"f253d8a9b9866a12f4f44786c5eb13ba80d19ed9ee8683e517d1a2cc706377e9"}},{"ruleId":"D2","level":"warning","message":{"text":"minifiers.DecodeConfig (cognitive 46): minifiers.DecodeConfig has cognitive complexity 46 (threshold 15). Drivers by points: if/else 44, loops 2 (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":"minifiers/config.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"23040f5c0779e783574542977be216bc7e5263fe869296a37afd1778c7aa4557"}},{"ruleId":"D2","level":"warning","message":{"text":"collector.normalizeMounts (cognitive 46): collector.normalizeMounts has cognitive complexity 46 (threshold 15). Drivers by points: if/else 43, boolean chains 2, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/collect.go"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9dbd10a967830cb397161016099e336fae28abe1a2e64092ff6df9e4643d088"}},{"ruleId":"D2","level":"warning","message":{"text":"resources.assignMetadata (cognitive 46): resources.assignMetadata has cognitive complexity 46 (threshold 15). Drivers by points: if/else 43, boolean chains 2, loops 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":"resources/resource_metadata.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a96d6b6d88476e8fa52701fd1ce90f53fd2c02d3095a4925f7e803fb762fd6"}},{"ruleId":"D2","level":"warning","message":{"text":"state.evalCall (cognitive 46): state.evalCall has cognitive complexity 46 (threshold 15). Drivers by points: if/else 36, loops 6, boolean chains 4 (nesting depth added 13). Of this number, 39 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":"tpl/internal/go_templates/texttemplate/hugo_template.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95a9a6d3c5aa56957cdaeb8858f529de8f30b3577d0d4f1e484b0ae444212d4"}},{"ruleId":"D2","level":"warning","message":{"text":"sitePagesAssembler.applyAggregates (cognitive 45): sitePagesAssembler.applyAggregates has cognitive complexity 45 (threshold 15). Drivers by points: if/else 38, boolean chains 3, loops 2, match/switch 2 (nesting depth added 20). Most of this is not in the body itself: 9 of the 45 points are its own statements and the rest belongs to one function literal inside it that branches (line 945). 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e76f9d8f5d01f22bf587c7b0c379fc0d8ba512926c709dcb6743adaaefd8d8f"}},{"ruleId":"D2","level":"warning","message":{"text":"hugoBuilder.newWatcher (cognitive 44): hugoBuilder.newWatcher has cognitive complexity 44 (threshold 15). Drivers by points: if/else 33, boolean chains 6, loops 3, match/switch 2 (nesting depth added 20). Most of this is not in the body itself: 13 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 364). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/hugobuilder.go"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"705bc5398e97447f3e2744035daa27fca9bf849e42dfd3aebad74815fe98af4a"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMetaSource.initPathInfo (cognitive 44): pageMetaSource.initPathInfo has cognitive complexity 44 (threshold 15). Drivers by points: if/else 43, 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":"hugolib/page__meta.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"19336e8f344103ba45d37a4ccb82673d4b5cbe5171c3db79e7844387c8dfe627"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.FromRemote (cognitive 44): Client.FromRemote has cognitive complexity 44 (threshold 15). Drivers by points: if/else 40, boolean chains 4 (nesting depth added 12). Most of this is not in the body itself: 5 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 229). 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":"resources/resource_factories/create/remote.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b086b0227115832a206f08efaf76b0f30c3f30b824f05e77f4ffe06eb828b0f"}},{"ruleId":"D2","level":"warning","message":{"text":"serverCommand.serve (cognitive 43): serverCommand.serve has cognitive complexity 43 (threshold 15). Drivers by points: if/else 31, loops 7, boolean chains 3, match/switch 2 (nesting depth added 13). Of this number, 26 points are the body\u0027s own statements and 17 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/server.go"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7661c67c78ae2ce9775461df78adc26d0f983270e3b25cc229c575e89dddc13"}},{"ruleId":"D2","level":"warning","message":{"text":"LanguagesInternal.init (cognitive 43): LanguagesInternal.init has cognitive complexity 43 (threshold 15). Drivers by points: if/else 35, boolean chains 4, loops 4 (nesting depth added 15). Of this number, 34 points are the body\u0027s own statements and 9 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":"langs/config.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"10190d521cd5e30c9aea090ae99ffa982af71e7cf6d2ecb6e40bc3322fcbe291"}},{"ruleId":"D2","level":"warning","message":{"text":"compare.compareFold (cognitive 42): compare.compareFold has cognitive complexity 42 (threshold 15). Drivers by points: if/else 35, boolean chains 4, loops 3 (nesting depth added 21). 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":"compare/compare_strings.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5fc452942f46fd6d574018448fcb6abb9adc4205554a9f92892f273c9247a80"}},{"ruleId":"D2","level":"warning","message":{"text":"componentFs.applyMeta (cognitive 42): componentFs.applyMeta has cognitive complexity 42 (threshold 15). Drivers by points: if/else 34, loops 6, match/switch 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":"hugofs/component_fs.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"57c62beadee67dae8a27fd445bab968320810b4878d1b37a7926d47626ed3bc8"}},{"ruleId":"D2","level":"warning","message":{"text":"IntegrationTestBuilder.initBuilder (cognitive 42): IntegrationTestBuilder.initBuilder has cognitive complexity 42 (threshold 15). Drivers by points: if/else 29, loops 10, boolean chains 3 (nesting depth added 11). Most of this is not in the body itself: 0 of the 42 points are its own statements and the rest belongs to one function literal inside it that branches (line 876). 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":"hugolib/integrationtest_builder.go"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc4b8f886581a85eca3a4a771a9fdd0f9bbe1626346737c0dc5fd489e3cb0a46"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.checkWhereArray (cognitive 42): Namespace.checkWhereArray has cognitive complexity 42 (threshold 15). Drivers by points: if/else 34, loops 5, 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":"tpl/collections/where.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b0db095568be0731dcfad270372c8ef4372364bf7585e28ca83c5d3941a602"}},{"ruleId":"D2","level":"warning","message":{"text":"config.LoadConfigFromDir (cognitive 41): config.LoadConfigFromDir has cognitive complexity 41 (threshold 15). Drivers by points: if/else 30, loops 5, match/switch 4, boolean chains 2 (nesting depth added 21). Most of this is not in the body itself: 7 of the 41 points are its own statements and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"config/configLoader.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"0316e39946b49ee2fa5aef6b08f1f5aae6b04ebc92fd9ad8725137b381eaacd5"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMap.addPagesFromGoTmplFi (cognitive 41): pageMap.addPagesFromGoTmplFi has cognitive complexity 41 (threshold 15). Drivers by points: if/else 32, loops 6, boolean chains 3 (nesting depth added 18). Most of this is not in the body itself: 15 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 361, 405). 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":"hugolib/content_map.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"1231d9cad6b3397e75fc2a4052548b15ae0018ff0565235c8f23aef863137eed"}},{"ruleId":"D2","level":"warning","message":{"text":"Options.compile (cognitive 41): Options.compile has cognitive complexity 41 (threshold 15). Drivers by points: if/else 26, loops 6, match/switch 6, boolean chains 2, jumps 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/options.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"9746162b71843967c86f1e7f0dc7f2eb1a9d42cdd6487f050fc2af68650df1e8"}},{"ruleId":"D2","level":"warning","message":{"text":"warpc.newDispatcher (cognitive 41): warpc.newDispatcher has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36, loops 5 (nesting depth added 14). Of this number, 19 points are the body\u0027s own statements and 22 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/warpc.go"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b27d3a8109ef737b6e6fe67a827e09e8830496573724d75eb66c5b9359911ae"}},{"ruleId":"D2","level":"warning","message":{"text":"npm.ensureWorkspaceRef (cognitive 41): npm.ensureWorkspaceRef has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36, boolean chains 2, loops 2, match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"modules/npm/package_builder.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"15dbb7b80a16bf1f9b700c0c3bf3a0faed771a8c0fda8f8994613226e3df4943"}},{"ruleId":"D2","level":"warning","message":{"text":"htmlElementsCollectorWriter.parseHTMLElement (cognitive 41): htmlElementsCollectorWriter.parseHTMLElement has cognitive complexity 41 (threshold 15). Drivers by points: if/else 27, loops 10, match/switch 3, boolean chains 1 (nesting depth added 27). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to one function literal inside it that branches (line 394). 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":"publisher/htmlElementsCollector.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0cc71f0c8056577d8a6ef8ec93bb3a44b8bc4851de706da3103a20d0cdb6da4"}},{"ruleId":"D2","level":"warning","message":{"text":"InvertedIndex.Search (cognitive 41): InvertedIndex.Search has cognitive complexity 41 (threshold 15). Drivers by points: if/else 27, loops 14 (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":"related/inverted_index.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82f1af02d48baab52db46c694f898e352043f0954bca1fda01b84d01a8f7526"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Unmarshal (cognitive 41): Namespace.Unmarshal has cognitive complexity 41 (threshold 15). Drivers by points: if/else 40, boolean chains 1 (nesting depth added 15). Of this number, 19 points are the body\u0027s own statements and 22 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":"tpl/transform/unmarshal.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f843ebda56ce83acca29c41a90ff0cf5a7c1084b5564fd1ac66783a5fcd5e9e"}},{"ruleId":"D2","level":"warning","message":{"text":"filecache.DecodeConfig (cognitive 40): filecache.DecodeConfig has cognitive complexity 40 (threshold 15). Drivers by points: if/else 34, 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":"cache/filecache/filecache_config.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"2391e0fa702659e0c01bb963c74c53bbe09b14b32e3cc8dfe042457dbf73be16"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.postProcess (cognitive 40): HugoSites.postProcess has cognitive complexity 40 (threshold 15). Drivers by points: if/else 34, loops 6 (nesting depth added 19). Most of this is not in the body itself: 11 of the 40 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 708, 659). 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2dec57f7f587f82604c7c7313b5f0d1bb375f01314090feb3ca7a2622bf0753"}},{"ruleId":"D2","level":"warning","message":{"text":"collector.mountCommonJSConfig (cognitive 40): collector.mountCommonJSConfig has cognitive complexity 40 (threshold 15). Drivers by points: if/else 25, loops 10, boolean chains 5 (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/collect.go"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"d63af262d2935fffbc7a494f8c9d923de0c981b3955d9c43dfc12dfa712160dc"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.compareGetWithCollator (cognitive 39): Namespace.compareGetWithCollator has cognitive complexity 39 (threshold 15). Drivers by points: if/else 34, boolean chains 3, 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":"tpl/compare/compare.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ec04270b81d9333989ca46e1e38b232c0acc354df05b7229d8953d146c8d72"}},{"ruleId":"D2","level":"warning","message":{"text":"internal.getGetTplPackagesGoDoc (cognitive 39): internal.getGetTplPackagesGoDoc has cognitive complexity 39 (threshold 15). Drivers by points: loops 22, if/else 17 (nesting depth added 25). Most of this is not in the body itself: 0 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 265). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/internal/templatefuncsRegistry.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"833472d5748932fdbdac98fec44117df06de601e83fc892bd62ddfdaca31d9d4"}},{"ruleId":"D2","level":"warning","message":{"text":"defaultConfigProvider.Merge (cognitive 38): defaultConfigProvider.Merge has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30, loops 6, boolean chains 1, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"config/defaultConfigProvider.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"30c8d2fd2152b04b42bcb2ed8c27177a99278803387e1916b47cf573f4adbfd4"}},{"ruleId":"D2","level":"warning","message":{"text":"RootMappingFs.collectDirEntries (cognitive 38): RootMappingFs.collectDirEntries has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, loops 6 (nesting depth added 19). Of this number, 18 points are the body\u0027s own statements and 20 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":"hugofs/rootmapping_fs.go"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"29e2056b5eab76e86f8e21d884ce6ab1036d45b5588268a7b17056203a3e4bdb"}},{"ruleId":"D2","level":"warning","message":{"text":"segmentsBuilder.buildOne (cognitive 38): segmentsBuilder.buildOne has cognitive complexity 38 (threshold 15). Drivers by points: if/else 36, loops 2 (nesting depth added 16). Of this number, 24 points are the body\u0027s own statements and 14 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":"hugolib/segments/segments.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"4623f7ae1671502dacb15b45d33fab287cea14a218efcc812483178fce897b1d"}},{"ruleId":"D2","level":"warning","message":{"text":"collector.applyThemeConfig (cognitive 38): collector.applyThemeConfig has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, loops 5, jumps 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/collect.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"982bb8768d6fc3b19e2fe23c9459df41ed54f3cbcf477267cd0fb3bb7c88abe8"}},{"ruleId":"D2","level":"warning","message":{"text":"importResolver.importRecursive (cognitive 38): importResolver.importRecursive has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, loops 5 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/resource_transformers/cssjs/inline_imports.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a1dcd467c6d854c4f38184a128e5f2bd36505bcfe915bd94d0b10ae39f34661"}},{"ruleId":"D2","level":"warning","message":{"text":"Inspector.MethodsFromTypes (cognitive 37): Inspector.MethodsFromTypes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24, loops 12, boolean chains 1 (nesting depth added 20). Of this number, 32 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":"codegen/methods.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"3642ef14bfba11769a0b0fd42dc0cea2556f6d4367cb963304ade2b30023d171"}},{"ruleId":"D2","level":"warning","message":{"text":"hugolib.newHugoSites (cognitive 37): hugolib.newHugoSites has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22, loops 15 (nesting depth added 19). Of this number, 35 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac7e27da51ff012caebb56af182bb7365593eb976a4660967fa5f004be5c6036"}},{"ruleId":"D2","level":"warning","message":{"text":"NodeShiftTreeWalker.Walk (cognitive 37): NodeShiftTreeWalker.Walk has cognitive complexity 37 (threshold 15). Drivers by points: if/else 29, boolean chains 5, match/switch 2, loops 1 (nesting depth added 10). Most of this is not in the body itself: 0 of the 37 points are its own statements and the rest belongs to one function literal inside it that branches (line 529). 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":"hugolib/doctree/nodeshifttree.go"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"77876be53564c197570214d3a3e0cf74150ed409ffc07dbff2026112766133cb"}},{"ruleId":"D2","level":"warning","message":{"text":"npm.Pack (cognitive 37): npm.Pack has cognitive complexity 37 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 3 (nesting depth added 8). Of this number, 30 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/npm/package_builder.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"e763810f004e4976e71600399a31086518bf915007cc58633cd5b871996713e0"}},{"ruleId":"D2","level":"warning","message":{"text":"Cache.Prune (cognitive 36): Cache.Prune has cognitive complexity 36 (threshold 15). Drivers by points: if/else 31, boolean chains 3, loops 2 (nesting depth added 11). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 86, 74). 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":"cache/filecache/filecache_pruner.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbe5dba3b93e69a31e5ec68cd872d3fd843b2d1be50994dda16b2bf46f73c3bc"}},{"ruleId":"D2","level":"warning","message":{"text":"importCommand.copyJekyllFilesAndFolders (cognitive 36): importCommand.copyJekyllFilesAndFolders has cognitive complexity 36 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/import.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"663959add9c576617e5f18f7656f5345ac8c3a5d644071d7fbd289c3ebb93b01"}},{"ruleId":"D2","level":"warning","message":{"text":"Site.assembleMenus (cognitive 36): Site.assembleMenus has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, loops 7, boolean chains 1 (nesting depth added 15). Of this number, 26 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":1417}}}],"partialFingerprints":{"codehealthFindingId/v1":"e09d78cfe71a9fe38b655820c0598f48b98b39381df7275f06375f55d0879804"}},{"ruleId":"D2","level":"warning","message":{"text":"modules.ApplyProjectConfigDefaults (cognitive 36): modules.ApplyProjectConfigDefaults has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20, loops 8, match/switch 6, 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":"modules/config.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5958574e37a41e1843f621944a4626ddefe202407083478761c1a1e4d7c0c0"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.Get (cognitive 36): Client.Get has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22, loops 8, boolean chains 6 (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/client.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c13fb4e5e003f2a70fca410fa07cd9b273d7b277c1978d391f928d66ad4919"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.listGoMods (cognitive 36): Client.listGoMods has cognitive complexity 36 (threshold 15). Drivers by points: if/else 32, boolean chains 2, loops 2 (nesting depth added 14). Of this number, 22 points are the body\u0027s own statements and 14 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/client.go"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"674c49bd19e287a140742261ead59434a262bdf4d98f57f0e05982f069d1fafa"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.newElemResolver (cognitive 36): Namespace.newElemResolver has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, boolean chains 1, match/switch 1 (nesting depth added 18). Of this number, 17 points are the body\u0027s own statements and 19 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":"tpl/collections/where.go"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cf2940d187ce99ce389b12d5840354e05ca782cc63d84afffc01ef7c0a49a0a"}},{"ruleId":"D2","level":"warning","message":{"text":"math.DoArithmetic (cognitive 35): math.DoArithmetic has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23, match/switch 8, boolean chains 4 (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":"common/math/math.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"53e51ab4454ddcaa4c75d4681535dc5ae0ea9fb425778f80a80198a9236d9940"}},{"ruleId":"D2","level":"warning","message":{"text":"Configs.Init (cognitive 35): Configs.Init has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, loops 9, boolean chains 1 (nesting depth added 14). Of this number, 30 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":"config/allconfig/allconfig.go"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"751e6927794920946fbdd9469a35b0f48d0c9c46195dad72c287113a4e89be25"}},{"ruleId":"D2","level":"warning","message":{"text":"hugofs.NewRootMappingFs (cognitive 35): hugofs.NewRootMappingFs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 34, loops 1 (nesting depth added 21). Of this number, 25 points are the body\u0027s own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugofs/rootmapping_fs.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"88573297181a27a339a3f44928d9da6244060adc6c8c9e6151b14aa8207695c9"}},{"ruleId":"D2","level":"warning","message":{"text":"helperContentNode.findContentNodeForSiteVector (cognitive 35): helperContentNode.findContentNodeForSiteVector has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28, loops 4, boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map_page_contentnode.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c9bb232c323ef5adacbc85f635fae572faf5b491a28006b71e221117a1e966"}},{"ruleId":"D2","level":"warning","message":{"text":"contentParseInfo.parseSource (cognitive 35): contentParseInfo.parseSource has cognitive complexity 35 (threshold 15). Drivers by points: if/else 30, match/switch 2, boolean chains 1, jumps 1, loops 1 (nesting depth added 20). Of this number, 27 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__content.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a673d2b28cc1f32f40e31105f9c8966d756fa7bd19e387c6242cab1cfb2b5e"}},{"ruleId":"D2","level":"warning","message":{"text":"siteRefLinker.refLink (cognitive 35): siteRefLinker.refLink has cognitive complexity 35 (threshold 15). Drivers by points: if/else 34, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"774ff0c170b6e1a43bac7d174d977159d58e7eb383178c6cab837433c4f27106"}},{"ruleId":"D2","level":"warning","message":{"text":"configLoader.applyOsEnvOverrides (cognitive 34): configLoader.applyOsEnvOverrides has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, 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":"config/allconfig/load.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f0750a17f08691a18415b0eba8f12a51089fdd8c8e32a5ac014eee1a6da2edb"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMap.getOrCreateResourcesForPage (cognitive 34): pageMap.getOrCreateResourcesForPage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23, loops 11 (nesting depth added 18). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 592). 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":"hugolib/content_map_page.go"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"de0180c0abfc746d80dcacb2799acca45e91c32115ad5fff06d40ea04f614c99"}},{"ruleId":"D2","level":"warning","message":{"text":"transport.RoundTrip (cognitive 34): transport.RoundTrip has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, boolean chains 3, loops 1 (nesting depth added 19). Of this number, 23 points are the body\u0027s own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/resource_factories/create/remote.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e9989258718a71d4f4d74a2abb7481de28fe976f9b00889c902d33f5b69df96"}},{"ruleId":"D2","level":"warning","message":{"text":"templateNamespace.doParseTemplate (cognitive 34): templateNamespace.doParseTemplate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimpl/templates.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"e731ac01ab362b38f3a95c3a07e7f2bf5ed06a0ca7db2ee7a994f6d23d7ab056"}},{"ruleId":"D2","level":"warning","message":{"text":"Inspector.parseSource (cognitive 33): Inspector.parseSource has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13, loops 13, match/switch 6, boolean chains 1 (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 172). 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":"codegen/methods.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"454632e0fe1be4349caac58d4f69756cc032170467219d4dfdec64158108df1a"}},{"ruleId":"D2","level":"warning","message":{"text":"PathParser.applyPrefixIdentifier (cognitive 33): PathParser.applyPrefixIdentifier has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 2, match/switch 1 (nesting depth added 18). 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":"common/paths/pathparser.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"53432ad865790ac1f9f25f48c8a50c50cd62777e42a3195d3d55e891634c3624"}},{"ruleId":"D2","level":"warning","message":{"text":"pageContentOutput.initRenderHooks (cognitive 33): pageContentOutput.initRenderHooks has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24, boolean chains 7, match/switch 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to one function literal inside it that branches (line 232). 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":"hugolib/page__per_output.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"699682e21ef78daed7920fd1d8085a4dede7c99443e55a1e1cfb39e6ff440b70"}},{"ruleId":"D2","level":"warning","message":{"text":"attributes.New (cognitive 33): attributes.New has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, loops 4, match/switch 2, 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":"markup/internal/attributes/attributes.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4624808da01b16ceda649f1d0d446816240427a9462eb5c00124ea2ae809315"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.FormatNumberCustom (cognitive 33): Namespace.FormatNumberCustom has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20, loops 11, match/switch 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/lang/lang.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f535d68237f6352cd4b925e3d931f2ac35ce90c158cbb70b4d88da829835731"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.newModCommands (cognitive 32): commands.newModCommands has cognitive complexity 32 (threshold 15). Drivers by points: if/else 30, boolean chains 2 (nesting depth added 8). Most of this is not in the body itself: 0 of the 32 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 249, 103, 67, \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":"commands/mod.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"77529cc58ed20539722eab9c40cfbced3c30ab7827277143021a6f0f57c62e53"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.fileEventsContentPaths (cognitive 32): HugoSites.fileEventsContentPaths has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20, loops 10, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":1321}}}],"partialFingerprints":{"codehealthFindingId/v1":"a562a8a09f5653fc0d96d32b8195499708a7e4f5ad67af608991f2b3953cbe5b"}},{"ruleId":"D2","level":"warning","message":{"text":"pageState.shiftToOutputFormat (cognitive 32): pageState.shiftToOutputFormat has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, loops 3, boolean chains 2 (nesting depth added 15). Of this number, 29 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":"hugolib/page.go"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b48083f13c52e4dde85f4ceaa195aa7d3ff841c7015d9db9a5ca249e64897e"}},{"ruleId":"D2","level":"warning","message":{"text":"pageFinder.getContentNodeForRef (cognitive 32): pageFinder.getContentNodeForRef has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22, boolean chains 10 (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":"hugolib/pagecollections.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"124478cfde8bf821bcf14443dcad2ea484774cad0bdb5699fdf9048a97393d86"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.checkWhereMap (cognitive 32): Namespace.checkWhereMap has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19, match/switch 12, 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":"tpl/collections/where.go"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"1829c17656cb837557e3b0e3886c11fbedbdbfd819e0f7021b5c9b15d38a8f6a"}},{"ruleId":"D2","level":"warning","message":{"text":"Deps.Init (cognitive 31): Deps.Init has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, match/switch 2, boolean chains 1 (nesting depth added 5). Of this number, 29 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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":"deps/deps.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"d165f2703512fff9bd9128a8f4ab4379396422eb83520f56d8f1aef40fc67d89"}},{"ruleId":"D2","level":"warning","message":{"text":"pageState.setMetaPost (cognitive 31): pageState.setMetaPost has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, loops 5, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__meta.go"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"7934af304ede25e84fc40c45f9efad95d5eb4c8ad05a70dff1b8925edc44aa6c"}},{"ruleId":"D2","level":"warning","message":{"text":"pageparser.lexShortcodeParam (cognitive 31): pageparser.lexShortcodeParam has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, boolean chains 6, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"parser/pageparser/pagelexer_shortcode.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"6058325157dec3701f5bd28c42c2ed29698864d935bd767f995a45bbd7bce3d8"}},{"ruleId":"D2","level":"warning","message":{"text":"pageparser.lexShortcodeQuotedParamVal (cognitive 31): pageparser.lexShortcodeQuotedParamVal has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, jumps 2, match/switch 2, 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":"parser/pageparser/pagelexer_shortcode.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a6099f421d9ddc9f38a42b528d5c29e8c795b5a5acdcf4662764b5c2da91442"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.transform (cognitive 31): Client.transform has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/resource_transformers/js/build.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f1e08fe61d6d97598c2bb77cb9464cfaee90b5441701a446eb88bbcfa6d950"}},{"ruleId":"D2","level":"warning","message":{"text":"bestMatch.isBetter (cognitive 31): bestMatch.isBetter has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":2073}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5ca1074a86b625da6a28232fcbb14e32bf1e302d30383202ed94b90a9a22005"}},{"ruleId":"D2","level":"warning","message":{"text":"paths.findWrapperDotPositions (cognitive 30): paths.findWrapperDotPositions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, loops 8, boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/paths/pathparser.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e0347e5bd872e8aec87d5d0646d01794ecf248c9d9338391a70e7c3d5127c6e"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMeta.applyDefaultValues (cognitive 30): pageMeta.applyDefaultValues has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, match/switch 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__meta.go"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4bd5dd284f754e420f4acd58b40e0c809e953d8e9c090bf3abda0298b26cdb"}},{"ruleId":"D2","level":"warning","message":{"text":"goldmark.newMarkdown (cognitive 30): goldmark.newMarkdown has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"markup/goldmark/convert.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"6344d08228083368b54047a8f52caed875c69e2469a730ef6bdcd47f9536bcd3"}},{"ruleId":"D2","level":"warning","message":{"text":"babelTransformation.Transform (cognitive 30): babelTransformation.Transform has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/resource_transformers/babel/babel.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ddc7bd7d9a91c02000be0a50bbdd998f8c4647bd97028edafb2194393e18402"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Seq (cognitive 30): Namespace.Seq has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, boolean chains 8, 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":"tpl/collections/collections.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc7ea9128d886be11048ce3ff7e91aa33596d5a4126c093af722ce808c7e67e"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.templates (cognitive 30): TemplateStore.templates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17, loops 13 (nesting depth added 19). 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 1782). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1781}}}],"partialFingerprints":{"codehealthFindingId/v1":"6683e443e9066551fb716b5f49e6ddcca4585206c583156b4a687806e1559e6a"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.MatchRedirect (cognitive 29): Server.MatchRedirect has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, loops 6, 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":"config/commonConfig.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1650bb48c8831b85c789e323a1812aa103f45aeddc51c8b7f69d33904ade59"}},{"ruleId":"D2","level":"warning","message":{"text":"Filters.Text (cognitive 29): Filters.Text has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, boolean chains 3, match/switch 3, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/filters.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9bec83589c946339dcf6fb4c3da929e77e927b968ff0c89a0c9c7fe24e6b7c"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.doIndex (cognitive 29): Namespace.doIndex has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, match/switch 5, loops 4, boolean chains 1 (nesting depth added 13). 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":"tpl/collections/index.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4158f327a52612ec546f29d3b66dbb75b19237d243703c378aa94c13749fa47"}},{"ruleId":"D2","level":"warning","message":{"text":"FilenameFilter.doMatch (cognitive 28): FilenameFilter.doMatch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, boolean chains 2, match/switch 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugofs/hglob/filename_filter.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"b55e316d1e4e04d9668bef761cbfe2cb3e35b28ff6e27b8a42e5be969b02256e"}},{"ruleId":"D2","level":"warning","message":{"text":"hugolib.createTargetPathDescriptor (cognitive 28): hugolib.createTargetPathDescriptor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 3 (nesting depth added 5). Of this number, 20 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, 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":"hugolib/page__paths.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d297db8bbc04a2c7fd2661704c7d2e6e271299aedac8973b17aebedbb17ce1b"}},{"ruleId":"D2","level":"warning","message":{"text":"allPagesAssembler.createAllPages (cognitive 28): allPagesAssembler.createAllPages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 9, boolean chains 1 (nesting depth added 16). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 113, 103). 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"b294497b940212b5973ecb44cb9f6df87b0a5d01c87dd4736704f2e9b2ffa0e6"}},{"ruleId":"D2","level":"warning","message":{"text":"collections._d (cognitive 28): collections._d has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17, loops 9, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/vitter.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"715310558c3dc6c6e30b75c47d85136f397944344ee9bb4f745bac51a2691897"}},{"ruleId":"D2","level":"warning","message":{"text":"Methods.ToMarshalJSON (cognitive 27): Methods.ToMarshalJSON has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, loops 9, 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":"codegen/methods.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"c401a27797b54bf299eb8edbf6ce170853ee97582483c4d69d026fe524b2c111"}},{"ruleId":"D2","level":"warning","message":{"text":"aliasHandler.targetPathAlias (cognitive 27): aliasHandler.targetPathAlias has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, loops 9, 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":"hugolib/alias.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"38df1215ee5638daf0eb5b2d2300917574d80d1886eb839c085e777716162053"}},{"ruleId":"D2","level":"warning","message":{"text":"pagesCollector.collectDirDir (cognitive 27): pagesCollector.collectDirDir has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, loops 4 (nesting depth added 9). Most of this is not in the body itself: 0 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 267, 260). 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":"hugolib/pages_capture.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"17655956c13d94e769408916ca574d43de757f9e9266b023d95b2fc742827f0b"}},{"ruleId":"D2","level":"warning","message":{"text":"InvertedIndex.Add (cognitive 27): InvertedIndex.Add has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, loops 11 (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":"related/inverted_index.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"93cd950a5822da7a278dda571ea6519e10f8b6e4e8ceb9089e770c67e73a5a92"}},{"ruleId":"D2","level":"warning","message":{"text":"postcssTransformation.Transform (cognitive 27): postcssTransformation.Transform has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, 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":"resources/resource_transformers/cssjs/postcss.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"99f4e31eaa1c223fc732140c96d4fe3f9fc0768aaa1c1edf0eb5c6de4dcf57c7"}},{"ruleId":"D2","level":"warning","message":{"text":"contentBuilder.buildDir (cognitive 26): contentBuilder.buildDir has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 5, boolean chains 1 (nesting depth added 10). Of this number, 21 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"create/content.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"16bbd3264c3472320b46d350b56a6ff3604204bc682ecab0f2b4a4370edabe8a"}},{"ruleId":"D2","level":"warning","message":{"text":"PathSpec.RelURL (cognitive 26): PathSpec.RelURL has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, 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":"helpers/url.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"69ddb19de52f4a8de0a8fb3f7e3d7fc6fe596cdd01b8ebd8a325b615f0492ab5"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseFs.WatchFilenames (cognitive 26): BaseFs.WatchFilenames has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 6, boolean chains 1 (nesting depth added 17). Of this number, 17 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":"hugolib/filesystems/basefs.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f2aa3ce29119265a3181d74e06d7b77f023f7885d136ac321e95b2bea3ad07"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.resolveAndResetDependententPageOutputs (cognitive 26): HugoSites.resolveAndResetDependententPageOutputs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14, loops 9, boolean chains 2, jumps 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 1106, 1086, 1144, \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":"hugolib/content_map_page.go"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"809b208caa94bc467f5b9018eec2e74c6fe68c1fe3c1ead7cadf4eef8ced3a0d"}},{"ruleId":"D2","level":"warning","message":{"text":"scriptGroup.removeNotSet (cognitive 26): scriptGroup.removeNotSet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 9 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/batch.go"},"region":{"startLine":1128}}}],"partialFingerprints":{"codehealthFindingId/v1":"d72ef517a12c24e5eb207a1e610b542e79f63e9e1280c52ec12ae4d12b1584cf"}},{"ruleId":"D2","level":"warning","message":{"text":"Translator.initFuncs (cognitive 26): Translator.initFuncs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, boolean chains 2, loops 1 (nesting depth added 13). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 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":"langs/i18n/i18n.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"8defd77fb8df612ec8e536e67a6b7bb0ff7cc0923620086f7958e2af1e2e6f98"}},{"ruleId":"D2","level":"warning","message":{"text":"Pages.GroupBy (cognitive 26): Pages.GroupBy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 5, match/switch 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/page/pagegroup.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"da18b5a391a0385b2d521051058610b9eaed654072038ff3994e6be90da9a638"}},{"ruleId":"D2","level":"warning","message":{"text":"state.validateType (cognitive 26): state.validateType has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, boolean chains 5, 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":"tpl/internal/go_templates/texttemplate/hugo_template.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"143b3665fdf67c254805ecdc4e97e7d14762c0ef232c84038af8426da6eacd4c"}},{"ruleId":"D2","level":"warning","message":{"text":"predicate.NewIndexStringPredicateFromGlobsAndRanges (cognitive 25): predicate.NewIndexStringPredicateFromGlobsAndRanges has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, match/switch 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/predicate/predicate.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2916df91044b406ca04245e013ab313d9fff3a19d4aaa22d5169e6b125fe813"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.assemble (cognitive 25): HugoSites.assemble has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 6 (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":"hugolib/hugo_sites_build.go"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"46e79d6add55130a00f8fb80993aeac5cba7791c76767087406f185f9cb0589a"}},{"ruleId":"D2","level":"warning","message":{"text":"hugoContextRenderer.renderHTMLBlock (cognitive 25): hugoContextRenderer.renderHTMLBlock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, 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":"markup/goldmark/hugocontext/hugocontext.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"6289822e0f3413406b41d40c974788f52ed3de24f448f510bc8867ec1360913e"}},{"ruleId":"D2","level":"warning","message":{"text":"metadecoders.validateAliasLimitForCollections (cognitive 25): metadecoders.validateAliasLimitForCollections has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 6, match/switch 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 237, 222). 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":"parser/metadecoders/decoder.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab32261c9f0a8606b3da39dbb9417bf0b1f101819dc73e990c81d1b1f18f269d"}},{"ruleId":"D2","level":"warning","message":{"text":"PageConfigEarly.CompileEarly (cognitive 25): PageConfigEarly.CompileEarly has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 6, 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":"resources/page/pagemeta/page_frontmatter.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"0decf9d444a788d34f4813ba03946bd6a00c3a99930a749793db627d4b9dade6"}},{"ruleId":"D2","level":"warning","message":{"text":"descriptorHandler.compareDescriptors (cognitive 25): descriptorHandler.compareDescriptors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, boolean chains 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":"tpl/tplimpl/templatedescriptor.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"22dcef47ae23a757a508dd66dbc092500261b917a64728c1cad8f0931ac03bf5"}},{"ruleId":"D2","level":"warning","message":{"text":"readInput (cognitive 25): readInput has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/js/common.js"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"27f219a4db6122ce742d8415a0ee3a5332aaaf5abd1993ba72a5b6d60bc12ac0"}},{"ruleId":"D2","level":"warning","message":{"text":"Params.merge (cognitive 24): Params.merge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/hmaps/params.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b1b0350af5f6a2948d261f6bf8ee4259dafe5996b0dfc64f2a8269953ac4ad"}},{"ruleId":"D2","level":"warning","message":{"text":"cachedContentScope.contentRendered (cognitive 24): cachedContentScope.contentRendered has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 499). 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":"hugolib/page__content.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb935b9531b1a7c9ed3f821e1b483c74e790d3a456b7bf23f8c85067ea112323"}},{"ruleId":"D2","level":"warning","message":{"text":"Site.prepareInits (cognitive 24): Site.prepareInits has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, loops 3 (nesting depth added 9). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 897, 867, 946, \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":"hugolib/site.go"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"87a36e598371e19373e3ef46e25f5cd0cfa7da442d88b2acad54e7de0d40a66e"}},{"ruleId":"D2","level":"warning","message":{"text":"transformer.Transform (cognitive 24): transformer.Transform has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 5, boolean chains 3 (nesting depth added 8). Of this number, 13 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":"markup/goldmark/internal/extensions/attributes/attributes.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"326dad240c165f56969a563ae765f03b588c624a0950c9a1989a6de772922321"}},{"ruleId":"D2","level":"warning","message":{"text":"output.DecodeConfig (cognitive 24): output.DecodeConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, loops 6 (nesting depth added 15). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"output/config.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd6f7c9ceffb006cc1c1779cf763d88c257fe04ccf27c3e7631acc0b11fb579"}},{"ruleId":"D2","level":"warning","message":{"text":"Codec.EncodeTo (cognitive 24): Codec.EncodeTo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 3, match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/codec.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"9636fd520173d239003918c7bd69ac8b8ec405fd3f60a5ab5d1dd8810ac109dc"}},{"ruleId":"D2","level":"warning","message":{"text":"collections.evaluateSubElem (cognitive 24): collections.evaluateSubElem has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, boolean chains 6, match/switch 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":"tpl/collections/where.go"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba0b758c523e6b8118595d02921721b9a36f40721e97d735c2ecdf8cc4be76be"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.insertEmbedded (cognitive 24): TemplateStore.insertEmbedded 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: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 1092). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"b927be98837836cd3cba48825d32cf89892cd7cc9d2a97e18e5147878b9b8192"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.toKeyCategoryAndDescriptor (cognitive 24): TemplateStore.toKeyCategoryAndDescriptor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, match/switch 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1810}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a2ad8911d208803a6cecbbfa83dd0601a2a30e1c9e517fa832cb7e8858684ba"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.CompileConfig (cognitive 23): Server.CompileConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 4, 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":"config/commonConfig.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"70c28f3bd616752744358a8520a81b87b2275f6da642a75d3546f1d2a132d930"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMap.getPagesInSection (cognitive 23): pageMap.getPagesInSection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 4 (nesting depth added 8). 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 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":"hugolib/content_map_page.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1cd765ba4995c131e567dd60d888b6f48e8a3dccce784c1226f5f044688b1f"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseFs.AbsProjectContentDir (cognitive 23): BaseFs.AbsProjectContentDir 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":"hugolib/filesystems/basefs.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"26dbcf453dd69bb631d7a67d1e3b07e0303867a41f603d9dec6170950af19f55"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.handleDataFile (cognitive 23): HugoSites.handleDataFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 4, 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":"hugolib/hugo_sites.go"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"222031fbbbcc41297f00f24b35603793024f01174cc47d9b9f83f2ca9d7adcab"}},{"ruleId":"D2","level":"warning","message":{"text":"cachedContentScope.contentToC (cognitive 23): cachedContentScope.contentToC has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, loops 2 (nesting depth added 7). 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 651). 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":"hugolib/page__content.go"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b56f10ea90531a3efcaeb35a1edc5d009e69a20c4503712e2df25e619a43df4"}},{"ruleId":"D2","level":"warning","message":{"text":"cachedContentScope.RenderShortcodes (cognitive 23): cachedContentScope.RenderShortcodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, 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":"hugolib/page__content.go"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c8769241c16636d1afb35f138b2627f4c0aaa9be06e64fea87d61ab9d9c36f"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMetaSource.doInitEarly (cognitive 23): pageMetaSource.doInitEarly has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, 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":"hugolib/page__meta.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b458aa3e678b070dc84800fee6746457054128687cc717af543cf6fef693cfd"}},{"ruleId":"D2","level":"warning","message":{"text":"codeblocks.getAttributes (cognitive 23): codeblocks.getAttributes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, loops 6, 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":"markup/goldmark/codeblocks/render.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d13793ce1b9faa5e822f297370db4a8490fe4b930f1c946ded4710fd62a158f"}},{"ruleId":"D2","level":"warning","message":{"text":"npm.PackageFilesSum (cognitive 23): npm.PackageFilesSum has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 2 (nesting depth added 6). Of this number, 21 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into 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/npm/package_builder.go"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1dce231aac5f285917b050dd35608a98e816d87cd2b83fc440478a5df3c27b9"}},{"ruleId":"D2","level":"warning","message":{"text":"publisher.isClosedByTag (cognitive 23): publisher.isClosedByTag has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, match/switch 2, boolean chains 1, jumps 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":"publisher/htmlElementsCollector.go"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"e954ca3ff01f52f4ef57455b7a33fafe33bc7328afb06e96c24c6cd99b2c38d6"}},{"ruleId":"D2","level":"warning","message":{"text":"page.ExtractSummaryFromHTML (cognitive 23): page.ExtractSummaryFromHTML has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 1 (nesting depth added 9). Of this number, 17 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":"resources/page/page_markup.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65dd12f18a570a4081baa717c5cd7e0fe1b0bc3a18e5e99e532a09bbba72a9c"}},{"ruleId":"D2","level":"warning","message":{"text":"PermalinkExpander.toSliceFunc (cognitive 23): PermalinkExpander.toSliceFunc has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 432, 473, 491). 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":"resources/page/permalinks.go"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"3746206281ed63f554a2e39899c69d80577dc7c044a5e8080a138097f62e7cb4"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.Concat (cognitive 23): Client.Concat has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, loops 8, boolean chains 2 (nesting depth added 9). 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 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":"resources/resource_factories/bundler/bundler.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"af687826bd0bb36b47de8caec39faed47ffdca0cd1db0fd1eae04b7fb7cf6e46"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMap.CreateSiteTaxonomies (cognitive 22): pageMap.CreateSiteTaxonomies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 4, match/switch 2, boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1179). 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":"hugolib/content_map_page.go"},"region":{"startLine":1165}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c811396d84e061a7f4cd7aeca6eea4a701b572d0d797c5e6bc48c05c9481baa"}},{"ruleId":"D2","level":"warning","message":{"text":"allPagesAssembler.createMissingStandalonePages (cognitive 22): allPagesAssembler.createMissingStandalonePages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 4, match/switch 2, loops 1 (nesting depth added 7). Of this number, 17 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map_page_assembler.go"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b7f2bccac541bb6ce7b466b33a0d14f23f591bd0b2323afb5b7e3f7c64f441"}},{"ruleId":"D2","level":"warning","message":{"text":"sitePagesAssembler.assembleResourcesAndSetHome (cognitive 22): sitePagesAssembler.assembleResourcesAndSetHome has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, boolean chains 1 (nesting depth added 5). 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 1231). 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":1224}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b319ba49aa2a81b6ab24cb2455688cbc34b156fd6da379e680535e1a9225044"}},{"ruleId":"D2","level":"warning","message":{"text":"Site.executeDeferredTemplates (cognitive 22): Site.executeDeferredTemplates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, loops 1 (nesting depth added 11). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 520). 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1af3f641342b32dc3f2c47d5600735ffa09ceb2c201a72159d32e6b4825de9"}},{"ruleId":"D2","level":"warning","message":{"text":"Site.handleContentAdapterChanges (cognitive 22): Site.handleContentAdapterChanges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, loops 1 (nesting depth added 11). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1294). 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5c94cad270a600b5db9f886b0bf4960e41d1122988a43df3ec92e753ebaaac"}},{"ruleId":"D2","level":"warning","message":{"text":"IntSetsBuilder.WithConfig (cognitive 22): IntSetsBuilder.WithConfig has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 3, match/switch 2 (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 one function literal inside it that branches (line 783). 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":"hugolib/sitesmatrix/vectorstores.go"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c5572b6111749e25328a2082693c5834798cadb0c804914a771daecd9cecfbc"}},{"ruleId":"D2","level":"warning","message":{"text":"scriptGroup.removeTouchedButNotSet (cognitive 22): scriptGroup.removeTouchedButNotSet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, loops 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/batch.go"},"region":{"startLine":1182}}}],"partialFingerprints":{"codehealthFindingId/v1":"818c002d9316c58640aae9aefd98b8992dcd4140026516dbaba822ed47bd9abc"}},{"ruleId":"D2","level":"warning","message":{"text":"WebpCodec.Encode (cognitive 22): WebpCodec.Encode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, loops 4, boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/webp.go"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f2db681b09059ae05754ab31141556a5af8b759fd28a37e8e1525fd99c48f32"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.writeHugoDirectSum (cognitive 22): Client.writeHugoDirectSum has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 3 (nesting depth added 5). 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/client.go"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"9920e231f32e7ad9f0504f0ecf60485b621785e4ffd29586a94448242da6906a"}},{"ruleId":"D2","level":"warning","message":{"text":"collector.addAndRecurse (cognitive 22): collector.addAndRecurse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, 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/collect.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"68fb3b08929c99e77a597480707854ad4a9082be96b753b3064aa3af73871eac"}},{"ruleId":"D2","level":"warning","message":{"text":"imageResource.Filter (cognitive 22): imageResource.Filter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 3 (nesting depth added 10). 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 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":"resources/image.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"fab2913d5dd78f0345c00bb683e22e861ec9f9bc96ddef6b05817533239cb501"}},{"ruleId":"D2","level":"warning","message":{"text":"ResourceSourceDescriptor.init (cognitive 22): ResourceSourceDescriptor.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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":"resources/resource.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5bbcfc19e73104f532359c5c3c9be04356a62c5df341c870c1e05c470e66b3f"}},{"ruleId":"D2","level":"warning","message":{"text":"importCommand.convertJekyllMetaData (cognitive 21): importCommand.convertJekyllMetaData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, match/switch 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":"commands/import.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"d110ba75106916073a3fa5016a2a7d5b8b579c7f08912a7a052ec8d56cc1aaef"}},{"ruleId":"D2","level":"warning","message":{"text":"version.CompareVersions (cognitive 21): version.CompareVersions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 3, 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":"common/version/version.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd10c55bd7601020cf9d80909318d8a46b7a9966b4671549815d6ac7a37d63b3"}},{"ruleId":"D2","level":"warning","message":{"text":"defaultConfigProvider.determineMergeStrategy (cognitive 21): defaultConfigProvider.determineMergeStrategy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, 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":"config/defaultConfigProvider.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bccb5235aba443d5921a3689a8780bfb17ffec07acb32414268d0df09e3ec2f"}},{"ruleId":"D2","level":"warning","message":{"text":"PathSpec.AbsURL (cognitive 21): PathSpec.AbsURL has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, 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":"helpers/url.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"1751ac461efa42cd7a1b5320dda73d1b52048e4d07a23e8736500d7313de9565"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMap.forEachResourceInPage (cognitive 21): pageMap.forEachResourceInPage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 500, 543, 535). 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":"hugolib/content_map_page.go"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37df4cb5e5aca798179d074ec925da6e785eab667343380f581106254ccbd3e"}},{"ruleId":"D2","level":"warning","message":{"text":"Site.renderDefaultSiteRedirect (cognitive 21): Site.renderDefaultSiteRedirect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 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":"hugolib/site_render.go"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04908391437e469ab666b40a37bb910f2a8b809c37a0984a30b334cde0a59b9"}},{"ruleId":"D2","level":"warning","message":{"text":"AvifCodec.Decode (cognitive 21): AvifCodec.Decode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 4, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7f576ce681fdbb09b63aad0ab3cfc0eeefbcaa477ee22ca0ae409f0c1ad27c0"}},{"ruleId":"D2","level":"warning","message":{"text":"highlight.highlight (cognitive 21): highlight.highlight has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 4). Of this number, 17 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: 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":"markup/highlight/highlight.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"ece12c03d519de5018b2608db228550bdf001e33aa2414e96c05df8a23f7d8ba"}},{"ruleId":"D2","level":"warning","message":{"text":"Decoder.unmarshalCSV (cognitive 21): Decoder.unmarshalCSV has cognitive complexity 21 (threshold 15). Drivers by points: loops 10, if/else 8, match/switch 3 (nesting depth added 13). 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":"parser/metadecoders/decoder.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"17fd583a57b780048c785898440beb3036a1836de97aa785c4b7293943f65adf"}},{"ruleId":"D2","level":"warning","message":{"text":"page.expandSummaryDivider (cognitive 21): page.expandSummaryDivider has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"resources/page/page_markup.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9af7db63b51c34b9fd9c559237ecb64cbd16efb21ae1d2f24b53b0dc612c150"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Intersect (cognitive 21): Namespace.Intersect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, loops 7, match/switch 3, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/collections.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"167cd44b1ab32a31104288a252660e2e1c60f0c22e19b93a3530c94049f5616c"}},{"ruleId":"D2","level":"warning","message":{"text":"staticSyncer.syncsStaticEvents (cognitive 20): staticSyncer.syncsStaticEvents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 1 (nesting depth added 8). 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 1071). 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":"commands/server.go"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"075eea9f72a517dd11507522cf097c23e04729bc8cb4faf5fb5bb94a59f560a7"}},{"ruleId":"D2","level":"warning","message":{"text":"skeletons.CreateProject (cognitive 20): skeletons.CreateProject has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 3, match/switch 2 (nesting depth added 9). Of this number, 16 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":"create/skeletons/skeletons.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fea2b8f042106079a8b97e4ce57fa2be3d54230a99dd9257ce1bc158cea65e5"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.fileEventsApplyInfo (cognitive 20): HugoSites.fileEventsApplyInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, 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":"hugolib/site.go"},"region":{"startLine":1254}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea24e4df94fdfdb458f64e5ff0349c1b5168c15395d68795f3c3f611ed25867b"}},{"ruleId":"D2","level":"warning","message":{"text":"highlight.normalizeHighlightOptions (cognitive 20): highlight.normalizeHighlightOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, loops 6, 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":"markup/highlight/config.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"25869a98d4817e30947187fe443afdb327a1165c9e5c3c12908ac8628dcceee8"}},{"ruleId":"D2","level":"warning","message":{"text":"pageMenus.HasMenuCurrent (cognitive 20): pageMenus.HasMenuCurrent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, 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":"navigation/pagemenus.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c23c774272196855a947e739a2906bc09fb26826aedf3648358eea37d886f04"}},{"ruleId":"D2","level":"warning","message":{"text":"output.decode (cognitive 20): output.decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, match/switch 4, loops 2 (nesting depth added 12). 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 99). 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":"output/config.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd72ae7e06e561f89a1c3d3dd3b5e32501b4e5a1cd225b31a6cf532139e8cc1"}},{"ruleId":"D2","level":"warning","message":{"text":"Decoder.Decode (cognitive 20): Decoder.Decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 229, 217). 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":"resources/images/meta/meta.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0d0e82ab9e281064a596aa0e203ec23a2eee555cce70fd9d1042ad7df8d2b5a"}},{"ruleId":"D2","level":"warning","message":{"text":"collections.mergeMap (cognitive 20): collections.mergeMap has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/merge.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"00276f987eeb8f50555d8af9a1db8c7ae75ba2eb4c23472ef9a42d89336b9eb2"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.SymDiff (cognitive 20): Namespace.SymDiff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, 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":"tpl/collections/symdiff.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b04315d010b7e018fde2b84ed8a6bb29bec032141ad6fef678c50983ca7f44a5"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Sass (cognitive 20): Namespace.Sass has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, match/switch 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":"tpl/css/css.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"971f91ada3162d8b714a84f9a4ef688bd104a7cf2c32192641b24ebc9d74ca40"}},{"ruleId":"D2","level":"warning","message":{"text":"tplimpl.needsBaseTemplate (cognitive 20): tplimpl.needsBaseTemplate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 4, 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":"tpl/tplimpl/templates.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"52204b066011b91fac13f1c5efb4073a85479110cb0ef8042fb1e30216435ecc"}},{"ruleId":"D2","level":"warning","message":{"text":"serverCommand.fixURL (cognitive 19): serverCommand.fixURL has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"commands/server.go"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"445a869a97e182aef440bc8e6c53791e87e2089ba3d1af27d577fbf6b4904573"}},{"ruleId":"D2","level":"warning","message":{"text":"sitePagesAssembler.assembleTerms (cognitive 19): sitePagesAssembler.assembleTerms has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (nesting depth added 9). 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 1156). 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"03eddbcf9d42aeb1e483c9031bf6fde9d287b2a5342e108fb02de0540a457538"}},{"ruleId":"D2","level":"warning","message":{"text":"BatcherClient.New (cognitive 19): BatcherClient.New has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (nesting depth added 10). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 242, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/batch.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b546da81b2684ef260f93664b7067a1589266defd5d88137b55fc084ba3cc02"}},{"ruleId":"D2","level":"warning","message":{"text":"dispatcher.inputJSON (cognitive 19): dispatcher.inputJSON has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (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":"internal/warpc/warpc.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f6ca5e566e515053bcc4e48ee4ab11284bfac00ecc68ea3c7f2a91d9342a954"}},{"ruleId":"D2","level":"warning","message":{"text":"hugoContextTransformer.Transform (cognitive 19): hugoContextTransformer.Transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, boolean chains 1 (nesting depth added 10). 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 285). 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":"markup/goldmark/hugocontext/hugocontext.go"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea703c28002696719dd46b7e919944ba52c435c6e9567aff5f2e2fb31acda662"}},{"ruleId":"D2","level":"warning","message":{"text":"tocTransformer.Transform (cognitive 19): tocTransformer.Transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 4, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 65). 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":"markup/goldmark/toc.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2969310199d0509660b6e8344171c148424f8cbb63886b3fb72cb2845324272"}},{"ruleId":"D2","level":"warning","message":{"text":"highlight.ChromaStylesCSS (cognitive 19): highlight.ChromaStylesCSS has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, match/switch 4 (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":"markup/highlight/chromastyles.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"828201a75502fd1f629af650b991d56b1dc59d5d811b3350c06fe52b4b46a86c"}},{"ruleId":"D2","level":"warning","message":{"text":"pageparser.lexIdentifierInShortcode (cognitive 19): pageparser.lexIdentifierInShortcode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, match/switch 2, jumps 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":"parser/pageparser/pagelexer_shortcode.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"652ef6c101af2dfb6aa3d8a80ab3c49726960481f141bc0319bc11bb36486774"}},{"ruleId":"D2","level":"warning","message":{"text":"RelatedDocsHandler.getOrCreateIndex (cognitive 19): RelatedDocsHandler.getOrCreateIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, 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":"resources/page/pages_related.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8446eb55a4140dd01d32789a4e2d662e8343d982e4d50a51da959964da96f15"}},{"ruleId":"D2","level":"warning","message":{"text":"sass.CreateVarsStyleSheet (cognitive 19): sass.CreateVarsStyleSheet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, 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":"resources/resource_transformers/tocss/sass/helpers.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"534666cb6f4af5de0d804eceffbff2d3ef4c13dba05ba64329f00a8039ede1aa"}},{"ruleId":"D2","level":"warning","message":{"text":"resourceAdapter.getOrTransform (cognitive 19): resourceAdapter.getOrTransform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 3 (nesting depth added 8). Of this number, 15 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/transform.go"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5229d51d9c76236ba40e2fa128b0af0cb4aae453565eae928bec95a2044b4fc"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Eq (cognitive 19): Namespace.Eq has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 1, match/switch 1 (nesting depth added 8). 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":"tpl/compare/compare.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd52dec2a176ad772c16b6781cd1d4b894f9b380556aa642ce7184fab74fc75c"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Unmarshal (cognitive 19): Namespace.Unmarshal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 19 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":"tpl/openapi/openapi3/openapi3.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1b833ade4a0d22462d0c8e8fc9abaa081bc2cba4db75050f2c0a5204b338b8c"}},{"ruleId":"D2","level":"warning","message":{"text":"templateTransformContext.hasBreakOrContinueOutsideRange (cognitive 19): templateTransformContext.hasBreakOrContinueOutsideRange 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":"tpl/tplimpl/templatetransform.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f0b1da08bc8a2e446bb4030c3e0f460401d09267b908a790dcfd3feb4464f2d"}},{"ruleId":"D2","level":"warning","message":{"text":"convertCommand.convertContents (cognitive 18): convertCommand.convertContents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1 (nesting depth added 4). Of this number, 14 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/convert.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"4504eac7e823530721e3ddc6ede65a777cc1a4cea985a28a87c30506cff6c884"}},{"ruleId":"D2","level":"warning","message":{"text":"hugoBuilder.fullBuild (cognitive 18): hugoBuilder.fullBuild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (nesting depth added 5). Of this number, 16 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":"commands/hugobuilder.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df4fb0279b17bb1ddb4d2db0f050549edf619054567f7c2467c40b01285b39e"}},{"ruleId":"D2","level":"warning","message":{"text":"hmaps.ConvertFloat64WithNoDecimalsToInt (cognitive 18): hmaps.ConvertFloat64WithNoDecimalsToInt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, match/switch 6, 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":"common/hmaps/maps.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f8d9154d7388c808ef738b1f0053edd2e3f2fca6cacbd6a2f4d2c4504cff98"}},{"ruleId":"D2","level":"warning","message":{"text":"hugio.CopyDir (cognitive 18): hugio.CopyDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/hugio/copy.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"06fafed72a6a96492c580aff02c2bbd3e66f44f5a14f56cf2929c3aec3b10a61"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.getPluralCount (cognitive 18): i18n.getPluralCount has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"langs/i18n/i18n.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed97e941e32839beaef62af012e4197ca3972221ab427d5dcbf401b7f6bffdda"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageProcessor.doFilter (cognitive 18): ImageProcessor.doFilter has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 8, if/else 4, boolean chains 3, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/image.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ffd7f19f15fae4a4435e286e6adc7dd1db4b9e53d7331c3282be390ad0b88f7"}},{"ruleId":"D2","level":"warning","message":{"text":"textFilter.Draw (cognitive 18): textFilter.Draw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 4, match/switch 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":"resources/images/text.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4ffd7587591c0a825089a1c59bf62e7b4de3826f15ff211740cb1e05b9b13ad"}},{"ruleId":"D2","level":"warning","message":{"text":"page.DecodeCascadeConfig (cognitive 18): page.DecodeCascadeConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 2 (nesting depth added 5). 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 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":"resources/page/page_matcher.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"c081df946c77beafb8c9d75fa68f6722d8c5f2fc3e219ddd999b7dc876c16a19"}},{"ruleId":"D2","level":"warning","message":{"text":"cascadeConfigDecoder.mapToPageMatcherParamsConfig (cognitive 18): cascadeConfigDecoder.mapToPageMatcherParamsConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, 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":"resources/page/page_matcher.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"8780e60a004c37e6c3d5cd85c9082d7342aa445a86fed6db6f420f0be4e456a1"}},{"ruleId":"D2","level":"warning","message":{"text":"Pages.GroupByParam (cognitive 18): Pages.GroupByParam has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, 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":"resources/page/pagegroup.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd943620c876e1e1424b47a868d967f92ee5a774acbacd5a7a492f241b0e359c"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Delimit (cognitive 18): Namespace.Delimit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, match/switch 4, loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/collections.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8fb3e71ece6c16026a568c6f1c0ac9ce59cbac2cd985fadc35bf75884363f81"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.allRawTemplates (cognitive 18): TemplateStore.allRawTemplates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 8 (nesting depth added 8). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1062). 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4e842e49c5cee8b2bfb34475ae6260137674e94cac082d2501dc2b6ac710ff9"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.transformTemplates (cognitive 18): TemplateStore.transformTemplates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (nesting depth added 8). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1916}}}],"partialFingerprints":{"codehealthFindingId/v1":"75df49a98c770c3f03d6d18ec888b0a1cf573c7a014a834eacc4c6b17d006824"}},{"ruleId":"D2","level":"warning","message":{"text":"rootCommand.ConfigFromProvider (cognitive 17): rootCommand.ConfigFromProvider has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 245). 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":"commands/commandeer.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"325fc98bedccbd30fccf0330b0200d3c6dd136417b80afaf1b22409d6b7fa17b"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.ExtractAndGroupRootPaths (cognitive 17): helpers.ExtractAndGroupRootPaths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 1, jumps 1, loops 1 (nesting depth added 5). Of this number, 14 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"helpers/path.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"73a0379628a526147d3b80402e07d28a783e6ccae41d53f0e7a31515324fb5b6"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.GetCacheDir (cognitive 17): helpers.GetCacheDir has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"helpers/path.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b311039eaf73ad3286a8289c4e30b356f5a4a40ab6f5ea1095717160f1ba119"}},{"ruleId":"D2","level":"warning","message":{"text":"resourceSource.lookupContentNodes (cognitive 17): resourceSource.lookupContentNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 4). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"5666ed6f070c1301918b2a20310fbee12551396f38cd8eafbee39ff395224110"}},{"ruleId":"D2","level":"warning","message":{"text":"HugoSites.allSiteLanguages (cognitive 17): HugoSites.allSiteLanguages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, loops 6, jumps 2, boolean chains 1 (nesting depth added 9). 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 210). 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":"hugolib/hugo_sites.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"27bb5c0604d62da6b43d752a5c23dac41a5e8f02cc758ef8fe7bdeb2ffbebd0d"}},{"ruleId":"D2","level":"warning","message":{"text":"pageFinder.getContentNode (cognitive 17): pageFinder.getContentNode 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":"hugolib/pagecollections.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ef57f515295d62617cf8ec78903b39e7a70a27528d41d8a8b40070b205e4f1f"}},{"ruleId":"D2","level":"warning","message":{"text":"RolesInternal.init (cognitive 17): RolesInternal.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 5). Of this number, 14 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/roles/roles.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"24bb6e1f8073cf9b2d4a7e1826b68b7f7130a50f35ea8ce02f0aae6275de0178"}},{"ruleId":"D2","level":"warning","message":{"text":"Site.initRenderFormats (cognitive 17): Site.initRenderFormats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (nesting depth added 9). Of this number, 11 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e8e9cab089c1e8ae5873600864017069f037116162efae733a6a7c140486cae"}},{"ruleId":"D2","level":"warning","message":{"text":"VersionsInternal.init (cognitive 17): VersionsInternal.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 5). Of this number, 14 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/versions/versions.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"551f76434d786bf42ba7d7831dd4a7f4c8c7599b9cbb372c0ee3e02d331447ab"}},{"ruleId":"D2","level":"warning","message":{"text":"Finder.doCheckOne (cognitive 17): Finder.doCheckOne has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"identity/finder.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"02d0efe54700013d69630a2145c5abc77718c162d4c3c9c129d16de60c74cb2a"}},{"ruleId":"D2","level":"warning","message":{"text":"navigation.DecodeConfig (cognitive 17): navigation.DecodeConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (nesting depth added 9). 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 275). 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":"navigation/menu.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b9d7dad7679d3bf5b8aaaca74c1cdbe718c1750b728ed86a7efef41064f75c"}},{"ruleId":"D2","level":"warning","message":{"text":"imageResource.doWithImageConfig (cognitive 17): imageResource.doWithImageConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 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":"resources/image.go"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae1b555c953545e2b31cb92d54557f1c98f4a0d06ce54acbc9074973538939c"}},{"ruleId":"D2","level":"warning","message":{"text":"imagetesting.RunGolden (cognitive 17): imagetesting.RunGolden has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 5). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 125, 136, 160). 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":"resources/images/imagetesting/testing.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"a747593856ff179e7774fdfac26b4c65313797302a409509888510b19ea0c496"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.ReplacePairs (cognitive 17): Namespace.ReplacePairs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/strings/strings.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e513c23465d8f18263788e2eabbc072738458cf92f6cc5983e0a105b746968c"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.SliceString (cognitive 17): Namespace.SliceString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, 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":"tpl/strings/strings.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3b95861149b84d9e8b4c56f6894d88cea29e549e31fbb8ccbad8d9245f5298"}},{"ruleId":"D2","level":"warning","message":{"text":"templateTransformContext.applyTransformations (cognitive 17): templateTransformContext.applyTransformations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 4, match/switch 4 (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":"tpl/tplimpl/templatetransform.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"e469cd159a524a4aa075813b95e0dc345a825aebc15ee2d4d4b04e7ebf1ed16f"}},{"ruleId":"D2","level":"warning","message":{"text":"templateTransformContext.isWithPartial (cognitive 17): templateTransformContext.isWithPartial has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, 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":"tpl/tplimpl/templatetransform.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"c042ffe77d483074d9f8dfa5487d3c357cb2dddf1143fd7645032bcca5ced55f"}},{"ruleId":"D2","level":"warning","message":{"text":"tplimplinit.CreateFuncMap (cognitive 17): tplimplinit.CreateFuncMap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 7 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimplinit/tplimplinit.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d55302986be1b01f9db3f7a1d9d482aa8a94b76801ef9f8905c60fccc9a8dc74"}},{"ruleId":"D2","level":"warning","message":{"text":"urlreplacers.checkCandidateSrcset (cognitive 17): urlreplacers.checkCandidateSrcset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"transform/urlreplacers/absurlreplacer.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d68cc911caa1d068130b52c66fc3e99a79cc9fa8c249d396d9a620ca35e495"}},{"ruleId":"D2","level":"warning","message":{"text":"convertCommand.convertAndSavePage (cognitive 16): convertCommand.convertAndSavePage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 3, match/switch 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/convert.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0a8153c903485b0ceaadb259d4acd74cd7652492c322eef2dffc4403052a39"}},{"ruleId":"D2","level":"warning","message":{"text":"convertCommand.copyContentDirsForOutput (cognitive 16): convertCommand.copyContentDirsForOutput 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":"commands/convert.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44ec096ee56f0ee457cb9b3e69c3af5e54554449ec0625af1d642e8c8463c14"}},{"ruleId":"D2","level":"warning","message":{"text":"serverCommand.PreRun (cognitive 16): serverCommand.PreRun has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6 (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 573). 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":"commands/server.go"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c4044b7ab4a2ddfd77088f480dd7609ff0a703d8d3742b7303df5b91b9b0cc"}},{"ruleId":"D2","level":"warning","message":{"text":"hreflect.convertToUintIfPossible (cognitive 16): hreflect.convertToUintIfPossible has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/hreflect/convert.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"44776ac792078205526a643ab98858038b4c564b87d7193f49612199a26f4f0b"}},{"ruleId":"D2","level":"warning","message":{"text":"hreflect.convertToIntIfPossible (cognitive 16): hreflect.convertToIntIfPossible has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/hreflect/convert.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c68c731a63155024518701b5ad83bc4b40dd2daa9474ab3c0f32059d022960"}},{"ruleId":"D2","level":"warning","message":{"text":"paths.Sanitize (cognitive 16): paths.Sanitize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/paths/path.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3bb656ac0d1109a451afdd42007b35d2fe0b940e6a032b75616b75b032c128a"}},{"ruleId":"D2","level":"warning","message":{"text":"PathParser.SitesMatrixFromPath (cognitive 16): PathParser.SitesMatrixFromPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 232). 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":"common/paths/pathparser.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"d170759744eba5a18f782d80d59d0717cf146f614508f57628e895596dd160a7"}},{"ruleId":"D2","level":"warning","message":{"text":"rungroup.Run (cognitive 16): rungroup.Run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 3, match/switch 3 (nesting depth added 9). 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 55). 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":"common/rungroup/rungroup.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d790903c44e84a73801deb16bf52efe24cefbc497337220b7df3c99617f6ecf"}},{"ruleId":"D2","level":"warning","message":{"text":"allconfig.LoadConfig (cognitive 16): allconfig.LoadConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 2). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"config/allconfig/load.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a6ca7199bf159f66e8b381e90c12ec091af13c1b6a9c2e1d3b4bd1f98f0ded"}},{"ruleId":"D2","level":"warning","message":{"text":"deployconfig.DecodeConfig (cognitive 16): deployconfig.DecodeConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"deploy/deployconfig/deployConfig.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f10baa418ff499f80bda402300dff200d28507d491d473b11b33d22481695d"}},{"ruleId":"D2","level":"warning","message":{"text":"hugofs.AddFileInfoToError (cognitive 16): hugofs.AddFileInfoToError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugofs/fileinfo.go"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"793c1ca432a60e0a7b6bd6248f4e364a06ce222ed8147be736d32ead39dd58b6"}},{"ruleId":"D2","level":"warning","message":{"text":"hugofs.WalkFilesystems (cognitive 16): hugofs.WalkFilesystems 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":"hugofs/fs.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dbcc97dd197c1854d7df45490ac7bb4350e8119d0e94d5d4b3fdab0896598ba"}},{"ruleId":"D2","level":"warning","message":{"text":"hugofs.Glob (cognitive 16): hugofs.Glob has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 5). 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 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":"hugofs/glob.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"67344aa35e36c8144d25ac48fbf482f6ae55bbcd6eb96f8267698ba5d02826f8"}},{"ruleId":"D2","level":"warning","message":{"text":"hglob.NewFilenameFilterV2 (cognitive 16): hglob.NewFilenameFilterV2 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":"hugofs/hglob/filename_filter.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b82950c83feb42bf384cbff9f5f969824e6e3daf3e1c91c87d9f1bf132fadd"}},{"ruleId":"D2","level":"warning","message":{"text":"RootMappingFs.newUnionFile (cognitive 16): RootMappingFs.newUnionFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (nesting depth added 7). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 488, 478). 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":"hugofs/rootmapping_fs.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"31b64cec2c211a8e31f6f6bbda8b6868bf0525261c84f056788ca8d46f857004"}},{"ruleId":"D2","level":"warning","message":{"text":"pageState.renderResources (cognitive 16): pageState.renderResources has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page.go"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a83dd422041993b615cfac5f421181bb5d463e5c658557d9b7e4a64212a72b2"}},{"ruleId":"D2","level":"warning","message":{"text":"contentParseInfo.contentToRender (cognitive 16): contentParseInfo.contentToRender has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, match/switch 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__content.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"814acbeb998d1635cf6153e4c26aca3b97082a14f533766ed920c26c8a3ba8de"}},{"ruleId":"D2","level":"warning","message":{"text":"optsHolder.isStaleOpts (cognitive 16): optsHolder.isStaleOpts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 6). 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 1390). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/batch.go"},"region":{"startLine":1386}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2c22d218133d22d6922bff7cb29692bedd9c0f32c1ee03f66d1f6f7103d222"}},{"ruleId":"D2","level":"warning","message":{"text":"related.DecodeConfig (cognitive 16): related.DecodeConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, 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":"related/inverted_index.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecfce8de164df927c89a10bb3ad7ac28a7feb3cf0e461c23793e32bd75b4173a"}},{"ruleId":"D2","level":"warning","message":{"text":"ImagingConfig.init (cognitive 16): ImagingConfig.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/config.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"620506376013bf49e4179ab35784f434a5e495848433f37a7cc97da5bb6ccb51"}},{"ruleId":"D2","level":"warning","message":{"text":"page.isPagesProbablySorted (cognitive 16): page.isPagesProbablySorted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 6). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 82, 97). 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":"resources/page/pages_sort_search.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"7915dd99005d604d4f601451199a2defbefbeb373478f07d774f39ee33a26324"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.IncludeCached (cognitive 16): Namespace.IncludeCached has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2 (nesting depth added 4). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/partials/partials.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff19089e80ce692af1f291379c7ca3620f458d526eb93508c25d5a00258bacfa"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Join (cognitive 16): Namespace.Join has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, loops 7, 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":"tpl/path/path.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"13988a401b52eeff656fa04232d4f603e7a1b5d62d084fa61f309347b27fd41c"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Substr (cognitive 16): Namespace.Substr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"tpl/strings/strings.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"387120fdae6de161163fab8c87adc3b88f949c75ff743229946e26b5c99e87a5"}},{"ruleId":"D2","level":"warning","message":{"text":"TemplateStore.extractInlinePartials (cognitive 16): TemplateStore.extractInlinePartials has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 1 (nesting depth added 6). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a3ce8d3547e648e9718efe476b6f4e425d9f6ac333971d124796d3d520e4dc"}},{"ruleId":"D2","level":"warning","message":{"text":"Namespace.Highlight (cognitive 16): Namespace.Highlight has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/transform/transform.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"487ac6597308cf4736e56b61d26b0f79f1aedf64f23ae8ef042b0fd7b6046b21"}},{"ruleId":"D2","level":"warning","message":{"text":"absurllexer.replace (cognitive 16): absurllexer.replace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, 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":"transform/urlreplacers/absurlreplacer.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fe5997e5f83e8f677fce2075cc231a009a81866c136ac23200507c81129096e"}},{"ruleId":"D2","level":"warning","message":{"text":"recording.record (cognitive 16): recording.record has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"watcher/filenotify/poller.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5816c2b278e95079d3fac538f4a99620fccbc059baab432d125708a77e254f4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: nopPage: TooManyMethods \u2014 114 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":"resources/page/page_nop.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d615d7eae1856ec645e6111576c4da2d9f97d990ce13093319c0fa182b0e58"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tplimpl/templatestore.go: FileTooLong \u2014 1298 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":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f78e2b9c4893f0cc23fce9398c0bfbc34b56b72a4c7f8eaf5ab733942368fe05"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Site: TooManyMethods \u2014 71 methods, declared across 8 files: hugolib/site.go (55), hugolib/site_render.go (5), hugolib/alias.go (2), hugolib/hugo_sites_build.go (2), \u002B4 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"hugolib/site.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"e380c8c192598516c308f980f28459f0c5b47e920c8d4631c731db872614a3e3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: pageState: TooManyMethods \u2014 66 methods, declared across 3 files: hugolib/page.go (60), hugolib/page__meta.go (4), hugolib/collections.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":"hugolib/page.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"581b3f27963303c3ad7d568127b286f6761998f07fa43164710e5b319eaad6e2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/site.go: FileTooLong \u2014 1069 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":"hugolib/site.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ebbb40c0bc33bced2a95db5042ee70422206bcabb3e67038effd4d4ba56aaad"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: HugoSites: TooManyMethods \u2014 57 methods, declared across 6 files: hugolib/hugo_sites.go (29), hugolib/hugo_sites_build.go (17), hugolib/content_map_page.go (4), hugolib/site.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":"hugolib/hugo_sites.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d156032910945ac2d825d023db320e75154c3fb00f863979bd2e0075c7574e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ConfigLanguage: TooManyMethods \u2014 56 methods. Most of these members implement config.AllProvider (55 of 56 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":"config/allconfig/configlanguage.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f62dbbf92a372ce37e35ccc4fa5c334fb9604699ca15dad4fa4f08e4dc316d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/content_map_page_assembler.go: FileTooLong \u2014 889 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map_page_assembler.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e33549f9c96ed2c849b0970e71d6eccd72a3dff372d39c7cb75dbfdbc5caae36"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: esbuild/batch.go: FileTooLong \u2014 840 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/batch.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"188770e96d11faadf8b13b0094631b88515d85f6ca63a6fdb8bdbb6c1296cfe4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TemplateStore: TooManyMethods \u2014 50 methods, declared across 2 files: tplimpl/templatestore.go (49), tplimpl/templates.go (1). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimpl/templatestore.go"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0aac141ee56218357614be52908c6ed9b9df1ca9f52842d794a2b727fac768d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Path: TooManyMethods \u2014 49 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":"common/paths/pathparser.go"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"52142b49654b1053cee623e739e83d6c4720a0344e78df2120512dac140ff6ae"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/hugo_sites_build.go: FileTooLong \u2014 791 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":"hugolib/hugo_sites_build.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"193b75bbfcbcaa46b710f0e144bc0a4ea561ddfca08d932df4a0415f582ead8b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/integrationtest_builder.go: FileTooLong \u2014 790 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":"hugolib/integrationtest_builder.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"605556fbb13303ccb0e579734278efe8f51cf666d3cadb6e5db761df06c1e8df"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: IntegrationTestBuilder: TooManyMethods \u2014 47 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":"hugolib/integrationtest_builder.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"24278ae965c2fd18bfc41c5215885b8f3744fa55923bbccda6aa030699c52cb1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/server.go: FileTooLong \u2014 760 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":"commands/server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc54d9711eb4e81af4322d8c7a9c53c1ce4a5c5ce9d5e835380189c79bf15b0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: resourceAdapter: TooManyMethods \u2014 45 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":"resources/transform.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7346732ee9b1900fa1bd463ac3d48a33fb1aaa34187092a05ec8c2749f6695d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/content_map_page.go: FileTooLong \u2014 741 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":"hugolib/content_map_page.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ab683bc57719c34ad7ffaa452f6dc684ee1970df37815d6f9a3023b9de34bb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/hugobuilder.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":"commands/hugobuilder.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06022dc0875aeb9a2f5f09349b405b9dd67ec55cd4b2c05a3cc6f249e67bb7d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/page__content.go: FileTooLong \u2014 699 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":"hugolib/page__content.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"257237c403a8d84ac3df85b75acab06cfe281e3a41f606870157df81310c43fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: allconfig/allconfig.go: FileTooLong \u2014 678 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":"config/allconfig/allconfig.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb16251d126475565a477c94e6a6856b236d41ca8078e956724c6a547ae2ce1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/page__meta.go: FileTooLong \u2014 652 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":"hugolib/page__meta.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd0d4c0411d810527131c10fa0f039f1498c732bf3e494a069fdc1b412df4c5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: paths/pathparser.go: FileTooLong \u2014 622 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":"common/paths/pathparser.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae9fe6d77eedb2d589a2a534d6fb5bcf27c2a06123fc6897acc7fd368ec58f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sitesmatrix/vectorstores.go: FileTooLong \u2014 620 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":"hugolib/sitesmatrix/vectorstores.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fffc4e5a980a009ab87ccd93a7acb21c78a3cec20c652fb3492991b073ad66a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pagemeta/page_frontmatter.go: FileTooLong \u2014 619 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":"resources/page/pagemeta/page_frontmatter.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"12ff62d7755d1f7929a744b4b23d97d52ba5c8684f2a9d890149abfc080f0f8f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: pageMeta: TooManyMethods \u2014 37 methods, declared across 2 files: hugolib/page__meta.go (36), hugolib/page__content.go (1). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__meta.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcfa3c313c69c05c38f052a191a60654c6e209228ef71efba48b4962b2b1f686"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: genericResource: TooManyMethods \u2014 37 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":"resources/resource.go"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"15421f7d2c9651dccae34f3e489f5e19515f0d75a43fb7606260a55a21e10caf"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Namespace: TooManyMethods \u2014 37 methods, declared across 10 files: collections/collections.go (18), collections/where.go (8), collections/apply.go (2), collections/index.go (2), \u002B6 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":"tpl/collections/collections.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c156d3608a625759a19ed8a5e0c451fbc0e72da535397c7b122c3d9f2c04620"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modules/client.go: FileTooLong \u2014 597 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/client.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b42fff76e3311553246a97666505a305138cf7c58320959969f86ca5db2a4b9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Pages: TooManyMethods \u2014 35 methods, declared across 6 files: page/pages_sort.go (12), page/pagegroup.go (8), page/pages.go (6), page/pages_related.go (5), \u002B2 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/page/pages.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc6e1b32346d5e2cf92e0a2a861d5cd8b2c9f9bf8047a50bd347bbf157130ef5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: siteWrapper: TooManyMethods \u2014 35 methods. Most of these members implement page.Site (32 of 35 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":"resources/page/site.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"88f8c1f5cf00f4d65f28a58173b7fc7c56219bc099f3ea1a684603104aa48805"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: hugolib/page.go: FileTooLong \u2014 551 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":"hugolib/page.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"826c94990a47ff57463f24f5e91e1cbc4a149fc299828fc7585f91380df994b3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: testSite: TooManyMethods \u2014 33 methods. Most of these members implement page.Site (32 of 33 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":"resources/page/site.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8095bc9c49381b08e91147df2529dde20a5984561f3666bf8cdf8ace2481bda"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Namespace: TooManyMethods \u2014 33 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/math/math.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"631d10dbfff255515ecfeed966c94a4b15384d3e1214ba87612320a8ae7c6489"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NodeShiftTree: TooManyMethods \u2014 32 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":"hugolib/doctree/nodeshifttree.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1ff75baaadcb9b9217f90bfe2ec6ad0f94964697225f66003f7c4970782723"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: filesystems/basefs.go: FileTooLong \u2014 524 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/filesystems/basefs.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ccd5371d7b51aa266f0d118577505cd1b1b3b157842115fc5a66a2a99b33611"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: hugoBuilder: 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":"commands/hugobuilder.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8e67d792bce53ddd1dd1ffda5a6b588c9c25221679fc234671d14fcb853ea8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: logAdapter: 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":"common/loggers/logger.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"f914c25832d49df3b873c720ef86026bdf09bfd014454d9edf018d7a4f82e096"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Namespace: TooManyMethods \u2014 31 methods, declared across 3 files: strings/strings.go (27), strings/regexp.go (3), strings/truncate.go (1). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/strings/strings.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c3bb7b0ae7adee2f9724b9a0fe3d3b5c6ac017ed7e4005cbf4107ba640e393"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modules/collect.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":"modules/collect.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eeef33f67300d0c95bd5b2eb61b848affc104a6da5e969343cf6207ff265395"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: warpc/warpc.go: FileTooLong \u2014 511 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/warpc.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a7515ebb0ecda4927aba11bd72e6386c863594dde49db45572c203b842f41fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): hugolib/sitesmatrix/vectorstores.go:138-157 | hugolib/sitesmatrix/vectorstores.go:439-458 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/sitesmatrix/vectorstores.go:138\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/sitesmatrix/vectorstores.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"f413196eb5022c9ab8db49cbc071b2a0c0ca5e41be98841e28c7bd5e3b47a139"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): common/loggers/handlerdefault.go:77-94 | common/loggers/handlerterminal.go:58-75 \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 \u0060common/loggers/handlerdefault.go:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"common/loggers/handlerdefault.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3343dd970e0711b98751a12fa3733d067f5d5eca0ab70df442860cdc6f4ba6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): resources/resource_transformers/cssjs/postcss.go:204-221 | resources/resource_transformers/cssjs/tailwindcss.go:111-128 \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 \u0060resources/resource_transformers/cssjs/postcss.go:204\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/resource_transformers/cssjs/postcss.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07e5052cb1e06ae57d88b58fc94dfa6b0d2b8239ba867e85dba3546c3e53c5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): tpl/css/css.go:205-222 | tpl/js/js.go:56-73 \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 \u0060tpl/css/css.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":"tpl/css/css.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6bedf43b49a1e109916d3565ddb217dcca8a2ea1d8a0dc96e7b1328868cf9f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): create/skeletons/skeletons.go:76-91 | create/skeletons/skeletons.go:131-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. 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":"create/skeletons/skeletons.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"57b50b9c4600eb1f69b52d30fc90e46d632d9349b99da4b780e21a6346eab764"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): resources/resource_transformers/cssjs/postcss.go:231-246 | resources/resource_transformers/cssjs/tailwindcss.go:137-152 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060resources/resource_transformers/cssjs/postcss.go:231\u0060 it begins part-way through the construct above it, so those exact 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":"resources/resource_transformers/cssjs/postcss.go"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea55aa8671594e8855e62c29d4acc3ef449adf902bc9476b43d17eedfef8229"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): hugolib/page__meta.go:1047-1061 | resources/resource/resource_helpers.go:43-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 \u0060hugolib/page__meta.go:1047\u0060 it begins part-way through the construct above it, so those exact 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":"hugolib/page__meta.go"},"region":{"startLine":1047}}}],"partialFingerprints":{"codehealthFindingId/v1":"125bc00a21be6be3fe0d10472f86881bfa9025384d322dc424cb85041e5d65ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): tpl/collections/collections.go:203-217 | tpl/collections/collections.go:363-377 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/collections/collections.go:203\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/collections.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"721b57b085dacf8612c2c8ddff6e241225eb69d7ed493627f2ce3365bd712dc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): helpers/url.go:61-75 | helpers/url.go:130-144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060helpers/url.go:61\u0060 it does not close everything it opens, so those exact 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":"helpers/url.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf3f127ad49d20df2bf1383f51c25b6216b9877550a3e6e8e952653fc789cc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): hugolib/page__ref.go:77-90 | hugolib/page__ref.go:94-107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"hugolib/page__ref.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"af3342d3044454482c6158b674ae0d4f7aa7ba837fd0c0a3c87a8e46f1616d2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): resources/images/config.go:701-714 | resources/images/config.go:765-778 \u2014 both copies are in the same file, so extract the block 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":"resources/images/config.go"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"037519b5752908fc8520095839e3aa763baa3f812a674c137fc501d01da743d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): resources/resource_transformers/babel/babel.go:174-186 | resources/resource_transformers/cssjs/postcss.go:203-215 | resources/resource_transformers/cssjs/tailwindcss.go:110-122 \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. 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":"resources/resource_transformers/babel/babel.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"974d5d671615af131832e875ed0cbb68459d6fcbd74e8d7445229df393bc0ecf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cache/filecache/filecache_config.go:229-241 | cache/httpcache/httpcache.go:209-221 \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 \u0060cache/filecache/filecache_config.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. 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":"cache/filecache/filecache_config.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"385bf598caac1b933dd7c117bfa4fa73c458774f7a9b5acd00ea2ac9b841d5c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): hugolib/content_map_page_assembler.go:409-421 | hugolib/content_map_page_assembler.go:427-439 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/content_map_page_assembler.go:409\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"39326a58d610d085b75fdf4c794632701dc1a245809d2a2e493e0c8cd16f3537"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): markup/goldmark/render_hooks.go:231-243 | markup/goldmark/render_hooks.go:373-385 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060markup/goldmark/render_hooks.go:231\u0060 it does not close everything it opens, so those exact 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":"markup/goldmark/render_hooks.go"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"09f018aa5cb192049d500ce9a97cf3e8d2ed809b216c0b61537d8e1150cf1702"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): resources/resource_transformers/babel/babel.go:134-146 | resources/resource_transformers/cssjs/postcss.go:165-177 \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 \u0060resources/resource_transformers/babel/babel.go:134\u0060 it begins part-way through the construct above it, so those exact 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":"resources/resource_transformers/babel/babel.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"d75c261c5905ade962e7606903d907e26a6ca693552f876cdb81f137076e60e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): tpl/collections/sort.go:81-93 | tpl/collections/sort.go:114-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/collections/sort.go:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/sort.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"06ed065398307193dba4e009e10869db97e6751662265c0bc978febfb22e8c2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): transform/urlreplacers/absurlreplacer.go:109-121 | transform/urlreplacers/absurlreplacer.go:154-166 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060transform/urlreplacers/absurlreplacer.go:109\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"transform/urlreplacers/absurlreplacer.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"272098d9cbc2ae3fa9d1598bb0bfb03d22ddab55694e686552f40c2e3e375c29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): common/predicate/predicate.go:190-201 | common/predicate/predicate.go:225-236 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/predicate/predicate.go:190\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/predicate/predicate.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5fcef8f29edddf3724cd2c20ab9c13f1017a7210188617110b811bbf7ba3af5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): config/defaultConfigProvider.go:129-140 | config/defaultConfigProvider.go:211-222 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060config/defaultConfigProvider.go:129\u0060 it begins part-way through the construct above it, so those exact 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":"config/defaultConfigProvider.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f01167974e413244a14cbffc642158b971a2eac113e5e92f6bc808216275ae2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): hugolib/gitinfo.go:229-240 | hugolib/gitinfo.go:248-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 \u0060hugolib/gitinfo.go:229\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/gitinfo.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ee3b17e04f6026179ab08e656c260efd76b0779a64d9769f31cfefd4e67a08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): hugolib/page__content.go:251-262 | hugolib/page__content.go:1086-1097 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/page__content.go:251\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__content.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9e58d4b19409ba5bb92af4cceff63c55c887c9b118f608d3c713b5985f95d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): resources/image.go:96-107 | resources/image.go:138-149 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060resources/image.go:96\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/image.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ef0457ca8828dfd5cf60a4fc831ad4e2aca77e9e870dc6c6db60f04f5372a15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): resources/images/meta/meta.go:244-260 | resources/images/meta/meta.go:318-329 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060resources/images/meta/meta.go:244\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/meta/meta.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"21117a72cd8c6402bde19d069bbf49a2809ad40026a48004422cdb0be5a40c6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): tpl/compare/compare.go:311-322 | tpl/compare/compare.go:346-357 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/compare/compare.go:311\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/compare/compare.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"eed8aded59e1cc38d5874d0e2a815d967faa870a4b962614843712d1bec4f796"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): tpl/collections/collections.go:79-89 | tpl/collections/collections.go:211-221 | tpl/collections/collections.go:371-381 | tpl/collections/collections.go:501-511 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/collections/collections.go:79\u0060 it does not close everything it opens, so those exact 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":"tpl/collections/collections.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"efca51d015684a9499a602f419e84479b03dd3714d4f10562711b15168c376f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): cache/filecache/filecache.go:196-206 | cache/filecache/filecache.go:283-293 | cache/filecache/filecache.go:346-356 \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 \u0060cache/filecache/filecache.go:196\u0060 it does not close everything it opens, so those exact 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":"cache/filecache/filecache.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"886de59d516f7e6055e2ffc35121cd9d5f1150d36b6bf122f43c10389f18f8d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): hugolib/roles/roles.go:168-178 | langs/config.go:179-189 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. 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":"hugolib/roles/roles.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"217891d17b1ac93aba71fdbee71a3f47c8eeebdb8fd8aa12e83fc9292917856b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/warpc/avif.go:83-93 | internal/warpc/webp.go:225-235 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/warpc/avif.go:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8fa1a8ed609145df34100b3530bd817a2291c886794037c0b7a4c948542058d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/warpc/webp.go:280-290 | internal/warpc/webp.go:307-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/webp.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c018a2ee25b7b8d158a748532decc39a5896d00ad2fe1316216303c3f307c23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tpl/js/init.go:27-37 | tpl/resources/init.go:27-38 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/js/init.go:27\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/js/init.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9926452bce3621f0d8f6ce7cb3433f93a1500ff3c41653acdd78e4e5fae8b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): tpl/tplimpl/templates.go:154-164 | tpl/tplimpl/templates.go:167-178 \u2014 both copies are in the same file, so extract the block 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":"tpl/tplimpl/templates.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe5149e3c185b980881ddeaf70dd079be0d1db47d0b29c69d169e8ad1c2f0f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): common/hmaps/params.go:385-394 | common/hmaps/params.go:447-456 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060common/hmaps/params.go:385\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/hmaps/params.go"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b69aee3e76bbb900abf57216a36a52ddcc55aca0d5176ad2534d1d30b17c096"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): hugolib/content_map_page.go:294-303 | hugolib/content_map_page.go:321-330 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/content_map_page.go:294\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map_page.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea79fa6b562f1541a4b2c7934a22dbbf04eaf11a2cc22f21cc4d7d3646a3423b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): hugolib/doctree/simpletree.go:97-106 | hugolib/doctree/simpletree.go:196-206 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/doctree/simpletree.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 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":"hugolib/doctree/simpletree.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c3d8e8d3b0ef43bdf5cb866729f9f405a901142c2271f51d81519294db6714"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): hugolib/page__paginator.go:46-55 | hugolib/page__paginator.go:73-82 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/page__paginator.go:46\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__paginator.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8007be56aca991806c45e56c3ddd0a46e3a6ead30af1763b54c3c9f22f0c17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): markup/internal/attributes/attributes.go:188-197 | markup/internal/attributes/attributes.go:212-221 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"markup/internal/attributes/attributes.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"10df03214aa84c90940bfbce13a349bba44c2309affabdc250f1c2e7574e2f63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): resources/page/pagegroup.go:116-125 | resources/page/pagegroup.go:186-195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060resources/page/pagegroup.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. 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":"resources/page/pagegroup.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"cee7fc00a95e23d7eebb39377e411b66d5cd972464bc3ceead3209d381ca2fe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): tpl/collections/where.go:667-676 | tpl/collections/where.go:686-695 \u2014 both copies are in the same file, so extract the block 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":"tpl/collections/where.go"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"99bd135a2cbcbcb1fbc47aacfc09a826c1cf9aa6884fc8e0911aa967c0a7abb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 10): tpl/math/init.go:34-42 | tpl/os/init.go:26-34 | tpl/path/init.go:28-36 | tpl/strings/init.go:26-34 | tpl/transform/init.go:26-34 | tpl/urls/init.go:26-34 | tpl/collections/init.go:26-34 | tpl/debug/init.go:26-34 | tpl/fmt/init.go:26-34 | tpl/images/init.go:26-34 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 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 10 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/math/init.go:34\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/math/init.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c5d2afae3f2889c10045d095d2c4b9f67c07c8f8556144584cfd1eb20894ccb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 7): tpl/hash/hash.go:59-67 | tpl/reflect/init.go:27-35 | tpl/safe/init.go:26-34 | tpl/cast/init.go:26-34 | tpl/crypto/init.go:26-34 | tpl/encoding/init.go:26-34 | tpl/inflect/init.go:26-34 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/hash/hash.go:59\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/hash/hash.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f26a6eac8a3eb0a064fde7fe821cd39cebaa7d66ef523af093d2176ba6a7b33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): internal/warpc/avif.go:272-280 | internal/warpc/avif.go:306-314 | internal/warpc/avif.go:339-347 | internal/warpc/avif.go:357-365 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"1742395591410a80ff206da7f01391579116b2ed0b348ee89a842cb930a2701c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): commands/gen.go:131-139 | commands/gen.go:180-188 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060commands/gen.go:131\u0060 it begins part-way through the construct above it, so those exact 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":"commands/gen.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ae9db44b88e7123aa7b9d2c8ecdf072096aeedea0efda0f830fbfb340598fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): hugolib/content_map_page.go:820-828 | hugolib/content_map_page_assembler.go:1020-1028 \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 \u0060hugolib/content_map_page.go:820\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/content_map_page.go"},"region":{"startLine":820}}}],"partialFingerprints":{"codehealthFindingId/v1":"504742b696230b0fe6bfbf790bb7fd2f3366af85f9e655ffd295bb9e8b9e3874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/warpc/avif.go:284-292 | internal/warpc/avif.go:366-374 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/warpc/avif.go:284\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"23959d937ffeee07e3baa70cd4340da0b2959f251ded26160142116a7c76c515"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/warpc/avif.go:378-386 | internal/warpc/avif.go:390-398 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8467b110305d6c5db89413dfd71518d0636ad49229f7359463c000ff1530aff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): resources/images/image.go:199-208 | resources/images/image.go:214-222 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060resources/images/image.go:199\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/image.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"6708eb6ff2f0ddabcb4775d6dee1d7061a58669176440bfe160a7c7aa2fd2515"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): commands/mod.go:126-133 | commands/mod.go:146-153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060commands/mod.go:126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/mod.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"017a94ba395650415cbab0c7a6eadc434e15fa8b43d13d361eb538c8e53a12cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): commands/new.go:111-118 | commands/new.go:151-158 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060commands/new.go:111\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/new.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b9dca54076c9a295b8eaa828238c4a36fe89b416c3171ef74aa31ac0cab633"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): hugolib/doctree/simpletree.go:73-80 | hugolib/doctree/simpletree.go:181-188 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/doctree/simpletree.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. 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":"hugolib/doctree/simpletree.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef6435aba322347dd94017da90cecf365363f564cb882e3b84cf48f151a6854f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): hugolib/doctree/simpletree.go:111-118 | hugolib/doctree/simpletree.go:213-220 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060hugolib/doctree/simpletree.go:111\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/doctree/simpletree.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b859f6684fc3868f60f5f527ba650a1893d807b46e5b728e1b0bfe4e02b22c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/warpc/avif.go:370-377 | internal/warpc/avif.go:381-388 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c02d2a2df949cad6614056d21d786e27d4af8ad88012c8756cd12e6d7b6f38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): resources/images/image.go:258-267 | resources/images/image.go:276-283 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060resources/images/image.go:258\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/image.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04919597d7d6dd96fe99a948150d441c6b0fca96b28bbaa2bfd0ccb4631a52b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): tpl/transform/unmarshal.go:70-77 | tpl/transform/unmarshal.go:130-137 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/transform/unmarshal.go:70\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/transform/unmarshal.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"60dc12fe1ab234e1acc2e7beb58e360f536fa0cb54054313f08611add14a1456"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): resources/image.go:200-206 | resources/image.go:504-510 \u2014 both copies are in the same file, so extract the block 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":"resources/image.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"acbc8023b1af1f1805ef5b1ff851d7a64496aed7fae4e45a6af370f5ebf8e49c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tpl/collections/collections.go:302-308 | tpl/collections/collections.go:711-717 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/collections/collections.go:302\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/collections.go"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"36b3d424504430f5fb3f286511582bcc89fcd972a12e2e7f7ea0cb8024cf7e8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): tpl/openapi/openapi3/init.go:27-33 | tpl/templates/init.go:27-33 \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 \u0060tpl/openapi/openapi3/init.go:27\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/openapi/openapi3/init.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"07832d4eee1d9ccdff65c59401b3e573397f8a01da0d603dfa23b00a3cd2a6b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): commands/new.go:66-71 | commands/new.go:115-120 | commands/new.go:155-160 \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 \u0060commands/new.go:66\u0060 it begins part-way through the construct above it, so those exact 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":"commands/new.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"41cd014a5c8fd44a439327f835857a9a607a8bca925bf903b7250a35a697a4a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): hugolib/integrationtest_builder.go:761-766 | hugolib/integrationtest_builder.go:781-786 \u2014 both copies are in the same file, so extract the block 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":"hugolib/integrationtest_builder.go"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f18a908e9ac21ed1def3181a813147a322d1e32b092228fdb25ca8292d57190"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): modules/collect.go:709-714 | modules/collect.go:733-738 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/collect.go:709\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/collect.go"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12a4e4bbad1c3f942d2c2d5af10e4ba3cb52fb797649a94ffc42a95842a2826"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): commands/import.go:146-150 | commands/import.go:613-617 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060commands/import.go:146\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commands/import.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"c704280077ad11f7766ebfeeea982826f62f9245ca275540ac090791e85b014a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tpl/collections/where.go:658-662 | tpl/collections/merge.go:97-103 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/collections/where.go:658\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/collections/where.go"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee032980ed4c7b6fd4f6d6cac82e393de17ce1adcc83b2a2c103dadf4193b2c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): tpl/compare/compare.go:290-294 | tpl/compare/compare.go:325-329 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060tpl/compare/compare.go:290\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/compare/compare.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a1ae0642149f50a438646abadefed353c3ed730c6b6c12b4278dae236362738"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: hugolib/page__meta.go: hugolib/page__meta.go changed 6 times in last 90 days, max complexity 70. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page__meta.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b69ef1ce933941b4ac98d3ba1cb351abec5862ebe27ef7b13a5c5b6af7a20d1b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: resources/images/config.go: resources/images/config.go changed 10 times in last 90 days, max complexity 40. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"resources/images/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"57fdd120b86807fc83a9c3d810ad6f3e85b752e1afd97b9046216c235079bc62"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: hugolib/content_map_page_assembler.go: hugolib/content_map_page_assembler.go changed 2 times in last 90 days, max complexity 147. 2 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":"hugolib/content_map_page_assembler.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"efb1ecafe3a719192d6d6f5a845eb4ed4f5bca07b01320fcd089abe74198dacc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/js/esbuild/options.go: internal/js/esbuild/options.go changed 4 times in last 90 days, max complexity 44. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js/esbuild/options.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"154124b492069b68d9c587ec2eb52276d02fc9f8beabf20fc1bde8481dedb325"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: hugolib/hugo_sites_build.go: hugolib/hugo_sites_build.go changed 2 times in last 90 days, max complexity 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/hugo_sites_build.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec35243aa1f83113fbd1f1f3b6dcf1a5d3aa1b2dc9967ab7ba4ca31fbd12b6b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: hugolib/site.go: hugolib/site.go changed 4 times in last 90 days, max complexity 33. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/site.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f5850088460464df11a0cb2ae1dcdb27f4c0ee35f9b41cde45787eafced911d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: tpl/tplimpl/templatestore.go: tpl/tplimpl/templatestore.go changed 2 times in last 90 days, max complexity 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tpl/tplimpl/templatestore.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb033f35c42331f67c8e96cc99ecbec89bcee8fb378c2f3e4d7f7c668575173"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: hugolib/integrationtest_builder.go: hugolib/integrationtest_builder.go changed 4 times in last 90 days, max complexity 28. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/integrationtest_builder.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"271a96dd767313b7d6a2a391ffb517099d891358d384c066ed12b970647e45f1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: hugolib/page.go: hugolib/page.go changed 5 times in last 90 days, max complexity 17. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hugolib/page.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f444948f7abde63a58641cd16caa0ebf14b6518d8abe7e89e18a3fa8787c0729"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/warpc/avif.go: internal/warpc/avif.go changed 3 times in last 90 days, max complexity 28. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/warpc/avif.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ca4b272e8319a7ee9695480142b2341952cc5869fee4ba061c98aecbb89277"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 93 significant file(s) lose their only recent owner: hugolib/integrationtest_builder.go, tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/htmltemplate/escape.go, modules/client.go, hugolib/page.go, hugolib/sitesmatrix/vectorstores.go, hugolib/shortcode.go, hugolib/hugo_sites.go (\u002B85 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"34dfcdc21a9f0f5f364e0f8c0a61bd19fc19edc50401b73a635f2a7c005af780"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 8 significant file(s) lose their only recent owner: tpl/strings/strings.go, common/hmaps/params.go, markup/asciidocext/internal/converter.go, tpl/strings/init.go, create/skeletons/skeletons.go, transform/chain.go, commands/helpers.go, markup/pandoc/convert.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c1f3a0d58e1cead38dc4cb388df0491e6154c41726351a2a25232914cb58e193"}},{"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":"ae12fa03a3c1db534c3a2f877ab8ff671095df55a1ab5514a48f2515ead5b88b"}},{"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":"5f6f9ab0bf8341ab3f65954da94f2da4417fb88f1690a17e63f1cafaaac8980e"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"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":"1fb3e7f29b34bd3891f553e677b71f6bc17b4ada2493bd10d903ca4a8eb4f5b5"},"taxa":[{"id":"CWE-22","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5e7c4633b3263da0b49d19ecab1e17107fa8fd59524eaa098a7fc740e80ab07f"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ffb7a8df328b2c2a4e899378e9e4864bdc72a8533ddf1e6006f87c8f439ed758"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a1150700c5015ee962b93356ffdc52eaa3295b350c8dbfdaac4bce12c86b77d4"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f45b9f937ffee43d636dad09522b91994795666c7ab2e943517a534aa8196b49"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c6ecd5965fc94c6cc67ba282b566c2094a11a3eef7de8e688734c063a6b6c773"},"taxa":[{"id":"CWE-200","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a4924ed4776e393bcb2d7bfe46d3cc862d3c2b759efdece1528b5b7533602924"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b6ba8aeb47ba0d14421150569957a6231000b768929b6979e3e358c33c90f9a7"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"aa00f8e5ae452664a8642cb1548103edeba8327fadcd175346de6db9e7cb0525"},"taxa":[{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c3ff15d7dd83afa6fae29c28f0cd64b368adc60efbd4191e90e20f192b323ae1"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"695d223cd7085f61ba972e9edba6989a27cafbbf8b57bb2de169a7e678349ff8"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"453652678e783c79a4a4731ce6593f2aac9e41cc1ecc1e98fa4caed089a48419"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"346c70d819499b8f69a7214494c96b5d837ab6e849498a170ba1e58423482c7b"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"13c5cdd0d40136ff13f0406bc95b20ea8741f3080300f951e4c1f8060f805f03"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f4df86d3ba61136ff779a308ae56f0f49a481ef22e48ecfe7292699b4c1f57fc"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"230509b8efc9d76f391002b51bc8b507cea7f456ab4b9bc5c29e4b32dec820b7"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e8f802d291115900a08d2e39759e3c493f419bd11913337cb4d786c113ad9111"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9e83bce20183a7690886103480f9bf4cf49980c0caf841bc086aa60e9913928d"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5c4c24114980c1602f26d879ef8d8f7ef00573aaab3890e02375d40c0e0eaf47"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a46191eff66e781d7252879987aac2f29f3e15d177b96727728bc1480e24878e"},"taxa":[{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"84f901cf8a5dbba707d822151a3e0f09049c39f3d5e05f3f1a4b871cfdf12a01"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"81b7b122dd29fa300cc907bb6c67190012ccd02c5ea06ad02dcacb4f073ceaf0"}},{"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":"c622bab8f3dace0cacee804422dc55592a6dcb7fd3b196d5086cd478627fe00f"}},{"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":"cabfbbea2b7d29ab5c2675d5dcfb862ccf804032887d8cc3fbab2e811201b31b"}},{"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":"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":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"}},{"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":"c8e6740321a9758be2667eea6842293616ba35402441f8df0a0ca2a8f6a5fa68"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"50c379534161bb30611d421e82af3666b891a67b9a6a35df5a4fc4b4977e653b"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9e16d64303d24f858cba6fda92bbc2fe2bd050bcd48a33a4d3af0656bff55698"}},{"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":"6b4deab06cd1fc2fb6e57103d1f3ef991634da4c2b7c329a7a2420a12731f08c"}}],"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-22","guid":"b68d9ca7-bdde-d057-a6cc-9f8b1e739552","name":"CWE-22","shortDescription":{"text":"CWE-22"},"helpUri":"https://cwe.mitre.org/data/definitions/22.html"},{"id":"CWE-242","guid":"5c147e5c-be37-b051-9928-764ef5a8f3d3","name":"CWE-242","shortDescription":{"text":"CWE-242"},"helpUri":"https://cwe.mitre.org/data/definitions/242.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"CWE-319","shortDescription":{"text":"CWE-319"},"helpUri":"https://cwe.mitre.org/data/definitions/319.html"},{"id":"CWE-328","guid":"f0ffc869-97c3-dc5c-8825-be1159f1fc5f","name":"CWE-328","shortDescription":{"text":"CWE-328"},"helpUri":"https://cwe.mitre.org/data/definitions/328.html"},{"id":"CWE-338","guid":"e89b7604-c3f7-8b53-bc8c-4d4718c28617","name":"CWE-338","shortDescription":{"text":"CWE-338"},"helpUri":"https://cwe.mitre.org/data/definitions/338.html"},{"id":"CWE-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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":34,"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."]}]}