{"$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":"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":"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":"parser.visitExprInOut (cyclomatic 618): parser.visitExprInOut has cyclomatic complexity 618 (threshold 15). Of this number, 598 points are the body\u0027s own statements and 20 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":"internal/js_parser/js_parser.go"},"region":{"startLine":13504}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2dcb1cee66f4bb6a30ab600376384a8b2f189a7218e4fd5ef01a4ea1b1eceef"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printExpr (cyclomatic 377): printer.printExpr has cyclomatic complexity 377 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_printer/js_printer.go"},"region":{"startLine":2005}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cdfef6e457a7f1419610eedd3cd8e2889b530b587e96101a7742471d3677c63"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.visitAndAppendStmt (cyclomatic 281): parser.visitAndAppendStmt has cyclomatic complexity 281 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":10350}}}],"partialFingerprints":{"codehealthFindingId/v1":"a543573b3374dba43a135113b5a251a7c28b4eaf64ec47d7f8057c8e400ce19d"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseStmt (cyclomatic 257): parser.parseStmt has cyclomatic complexity 257 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":7061}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d61cc2a7487f03773480fcee9a28be0992b939afe8161f000f34e680399e500"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseOptionsImpl (cyclomatic 246): cli.parseOptionsImpl has cyclomatic complexity 246 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"59d400f3f0fc3a83401fccceea7b9f8feb0844645e49da5424cfba576fccc43e"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseSuffix (cyclomatic 162): parser.parseSuffix has cyclomatic complexity 162 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":4263}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a6d738050d0466a8c5a74fc10a7c7dd269264b75071ee11cab3dd09e0ea702c"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseProperty (cyclomatic 161): parser.parseProperty has cyclomatic complexity 161 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":2184}}}],"partialFingerprints":{"codehealthFindingId/v1":"f898d81184ab995830a6839827e770143b906737ea78b76f2af130d9d30763f2"}},{"ruleId":"D1","level":"warning","message":{"text":"binaryExprVisitor.visitRightAndFinish (cyclomatic 153): binaryExprVisitor.visitRightAndFinish has cyclomatic complexity 153 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":16019}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b2fd803ea1a40d2f37e99f0e4bb67ba9beeeaeb3f02629dd7b711a5f231f00"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printStmt (cyclomatic 150): printer.printStmt has cyclomatic complexity 150 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_printer/js_printer.go"},"region":{"startLine":4101}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc98a40fbd4055491d23a39c53cb2fc9787c5fcec06a801e0af4eee091b340da"}},{"ruleId":"D1","level":"warning","message":{"text":"Lexer.Next (cyclomatic 147): Lexer.Next has cyclomatic complexity 147 (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_lexer/js_lexer.go"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd179f506eae1997b9df3fd129c9caa6a483dd13b7b622d96c9236fcdd3b3e15"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.scanImportsAndExports (cyclomatic 141): linkerContext.scanImportsAndExports has cyclomatic complexity 141 (threshold 15). Of this number, 108 points are the body\u0027s own statements and 33 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"91211ff97948b02ea24395108de209069a2b81e811c88255d86b6a67e4b33b4d"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.mangleStmts (cyclomatic 127): parser.mangleStmts has cyclomatic complexity 127 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":9113}}}],"partialFingerprints":{"codehealthFindingId/v1":"47717f65fb79e3d85a715608180a21241100d7f683fc9d055cefabb95137c116"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseAtRule (cyclomatic 122): parser.parseAtRule has cyclomatic complexity 122 (threshold 15). Of this number, 119 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":1196}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d510a041633826c130ef8477fcd6d7ffed26beb75c47fce878250f15ed5f918"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parsePrefix (cyclomatic 116): parser.parsePrefix has cyclomatic complexity 116 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":3498}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7eec87c0d88a8d27d18fae12fdb00633bcc56ae6617e30dc168801def9fc412"}},{"ruleId":"D1","level":"warning","message":{"text":"bundler.parseFile (cyclomatic 109): bundler.parseFile has cyclomatic complexity 109 (threshold 15). Of this number, 108 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9781b9182a0b78acc9849b996cd8534ed7492d08e479a16e19c9f947571593"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.processDeclarations (cyclomatic 104): parser.processDeclarations has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/css_parser/css_decls.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb8e1a4b9a861bd55deb7896e43ffbb53f0bee78222e236df845f70e77dd2ade"}},{"ruleId":"D1","level":"warning","message":{"text":"Lexer.parseNumericLiteralOrDot (cyclomatic 96): Lexer.parseNumericLiteralOrDot has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8e429929950dcba590bb296d617f4ad38d30fc1956a15dda49a7879d8b8a485"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.skipTypeScriptTypeWithFlags (cyclomatic 94): parser.skipTypeScriptTypeWithFlags has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/ts_parser.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5ca554899ba3d22fb0ecbb33d590bc8e31de0bb5bc72e858ae3898f98d980d1"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printRule (cyclomatic 92): printer.printRule has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/css_printer/css_printer.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"923c603abc71df1c5cd244fcd894ed33a149b035e45675bd8aeb15d538b7c0aa"}},{"ruleId":"D1","level":"warning","message":{"text":"HelperContext.SimplifyUnusedExpr (cyclomatic 91): HelperContext.SimplifyUnusedExpr has cyclomatic complexity 91 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_ast/js_ast_helpers.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ba153e43f1f5a22327c3cbd53e019143deb81811b31f35d300c657040b5a2f"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.parseColor (cyclomatic 88): css_parser.parseColor has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/css_parser/css_decls_color.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab74e99d7ec2168b533e0c2d4cea66e75565c4e48b1d14302ede12aa9a2f4c17"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.scanForImportsAndExports (cyclomatic 87): parser.scanForImportsAndExports has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/js_parser.go"},"region":{"startLine":17281}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc33f9d872ad58683e354da1dcd030d6ac0f747c1a66767c937540076b05839"}},{"ruleId":"D1","level":"warning","message":{"text":"scanner.processScannedFiles (cyclomatic 82): scanner.processScannedFiles has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/bundler/bundler.go"},"region":{"startLine":2360}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b8f0f58fb5f5c3aa6fb7c6ed278db94a6df1c2606e5c648db362faa12ea09e"}},{"ruleId":"D1","level":"warning","message":{"text":"js_parser.ParseSourceMap (cyclomatic 81): js_parser.ParseSourceMap has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_parser/sourcemap_parser.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dbdee01450f823b01bc9bb9f73f725697906654ddac4a496b618f20f7e0f9d4"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.mangleTransforms (cyclomatic 79): parser.mangleTransforms has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/css_parser/css_decls_transform.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b3755ca454d7408be899527b60a2a5730b9bfe22e0518b5f81ebbcc6cb13cd"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.parseTSConfigFromSource (cyclomatic 71): resolverQuery.parseTSConfigFromSource has cyclomatic complexity 71 (threshold 15). Most of this is not in the body itself: 9 of the 71 points are its own statements and the rest belongs to one function literal inside it that branches (line 1257). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/resolver/resolver.go"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"272fc9a40ea084062b85f09927ecb8de83c80b350360e5fb579704d6ec51be56"}},{"ruleId":"D1","level":"warning","message":{"text":"apiHandler.ServeHTTP (cyclomatic 71): apiHandler.ServeHTTP has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"a44716e38ff97d3259d989c3eba720f2b62c56cda62bdedf0653a9c7804ea205"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.substituteSingleUseSymbolInExpr (cyclomatic 69): parser.substituteSingleUseSymbolInExpr has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":9692}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2e0222fff61d8cb48afd7f268ba9814ab2348e69ae8d534bddda2a4d248009"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.visitClass (cyclomatic 69): parser.visitClass has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12132}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d909f952a69688a57c103e8898978d87b9b0d1bb3d10806008d7dfd8b4110ee"}},{"ruleId":"D1","level":"warning","message":{"text":"lowerClassContext.processProperties (cyclomatic 69): lowerClassContext.processProperties has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":1471}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0d8f8a81047e35407dfb39f29313a982dd607d00fca6109b9dd3f06d21ad7b"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printProperty (cyclomatic 69): printer.printProperty has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"c72bb7dcc32326276ae764f9bccd692e388fe1d20c93fbef85a03c3f05d9e81f"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateChunkJS (cyclomatic 68): linkerContext.generateChunkJS has cyclomatic complexity 68 (threshold 15). Of this number, 64 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5563}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9650691f13ba17f4191cc7bf45db306c9c4f16bf7e74cfb4e1e12c5076ac7b"}},{"ruleId":"D1","level":"warning","message":{"text":"resolver.ParseTSConfigJSON (cyclomatic 68): resolver.ParseTSConfigJSON has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/resolver/tsconfig_json.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e6b204884c7d2afba96215d38590154cfea9c65a199d7410951e466177399ba"}},{"ruleId":"D1","level":"warning","message":{"text":"HelperContext.ExprCanBeRemovedIfUnused (cyclomatic 66): HelperContext.ExprCanBeRemovedIfUnused has cyclomatic complexity 66 (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_ast/js_ast_helpers.go"},"region":{"startLine":2432}}}],"partialFingerprints":{"codehealthFindingId/v1":"9440603946e52d7dd52498b04130858d9feb41fe3c0f1533e76f16aa76528cca"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.convertTokensHelper (cyclomatic 65): parser.convertTokensHelper has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":1814}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf3a95d6a86bf57987f5230b1c0c1770071ef435eb8a61c03a0c3a634ae398f"}},{"ruleId":"D1","level":"warning","message":{"text":"HelperContext.MangleIfExpr (cyclomatic 65): HelperContext.MangleIfExpr has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2788}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbbc2a8922878c49bb53fe731b26043d21c38e26afffaa18e373b10a76bd8810"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.finalizeImportsExportsResult (cyclomatic 65): resolverQuery.finalizeImportsExportsResult has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2605}}}],"partialFingerprints":{"codehealthFindingId/v1":"5068da325753ebb9e6cfbce9ec831f813266afb6a8e1cb38f4c31f9aa24cfe26"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printBinding (cyclomatic 63): printer.printBinding has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/js_printer/js_printer.go"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce2de950e32f871958f7af63432486d26e6722358b5c0c8e1bc0771c19b6fb7"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateChunkCSS (cyclomatic 62): linkerContext.generateChunkCSS has cyclomatic complexity 62 (threshold 15). Of this number, 55 points are the body\u0027s own statements and 7 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/linker/linker.go"},"region":{"startLine":6093}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d09a256b0faadb1b90da53f6f18fd5ce49d53a01df503ea8e5fe6e3faf2a98b"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.findImportedFilesInCSSOrder (cyclomatic 60): linkerContext.findImportedFilesInCSSOrder has cyclomatic complexity 60 (threshold 15). Of this number, 48 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":3406}}}],"partialFingerprints":{"codehealthFindingId/v1":"634623cde15633c9da68d9992c99bb39827d2cff98eafe2d9d6cd762e837de02"}},{"ruleId":"D1","level":"warning","message":{"text":"serviceType.convertPlugins (cyclomatic 59): serviceType.convertPlugins has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 5 of the 59 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 903, 860). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":848}}}],"partialFingerprints":{"codehealthFindingId/v1":"561a98a248183a0f0f36d0a44a86db465b36ed70f73750ff6a02751d04a2f9c9"}},{"ruleId":"D1","level":"warning","message":{"text":"scanner.addEntryPoints (cyclomatic 59): scanner.addEntryPoints has cyclomatic complexity 59 (threshold 15). Of this number, 47 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":1841}}}],"partialFingerprints":{"codehealthFindingId/v1":"906ff41295efd3c3edb5f65c9ac4d82cfd031986d03578c790b6911f618f7ad8"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.convertStmtsForChunk (cyclomatic 59): linkerContext.convertStmtsForChunk has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":4311}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa93c4727f34c087a610f9999e4b87cc46052047975e49b6798e9b99d535d24"}},{"ruleId":"D1","level":"warning","message":{"text":"lexer.next (cyclomatic 56): lexer.next has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a4a25ed1eb1bf044f37be936f97efd50954ca4b4864a5bd4f4292904ac0c6d"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.FoldBinaryOperator (cyclomatic 56): js_ast.FoldBinaryOperator has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1235}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c9dbe13ab662c0cd088716ce699c8ecf436bccbece1bebda055a1e60b13f31"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printUnquotedUTF16 (cyclomatic 56): printer.printUnquotedUTF16 has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82886880789b48bc433b92ff8bea6bc00a98de06a3e73ae905c038c66010932"}},{"ruleId":"D1","level":"warning","message":{"text":"Lexer.tryToDecodeEscapeSequences (cyclomatic 55): Lexer.tryToDecodeEscapeSequences has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":2192}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5a5511e13ffc9c752265b29475041a2149b507a84b0b8c9c7373244060e1dd8"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerAndMinifyColor (cyclomatic 54): parser.lowerAndMinifyColor has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_color.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18aa4c270b58341f6e5c3a3bf6d576144dcfbddf190ff18b774767b92c7f86c"}},{"ruleId":"D1","level":"warning","message":{"text":"lowerClassContext.finishAndGenerateCode (cyclomatic 54): lowerClassContext.finishAndGenerateCode has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":2054}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c127742aed73f04cc096d1fd674a3418aa5cc5614bf9f4eaf58bfee9e91ebaf"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.computeCrossChunkDependencies (cyclomatic 54): linkerContext.computeCrossChunkDependencies has cyclomatic complexity 54 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 26 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":908}}}],"partialFingerprints":{"codehealthFindingId/v1":"a892dff12faa6b160b953a46e6716bc6b74dd104d207106522109fd5295b3938"}},{"ruleId":"D1","level":"warning","message":{"text":"serviceType.handleIncomingPacket (cyclomatic 53): serviceType.handleIncomingPacket has cyclomatic complexity 53 (threshold 15). Of this number, 34 points are the body\u0027s own statements and 19 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"643c42f605e358ef9ff0164344a5da39f0850bd17deb292e8d8a9a211b8395aa"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.maybeRewritePropertyAccess (cyclomatic 53): parser.maybeRewritePropertyAccess has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12894}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ccc43e9042ae629987827d97643c2caf58d3bb2a417cfdc080c606e9ce0b2a6"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.tryToParseCalcTerm (cyclomatic 52): css_parser.tryToParseCalcTerm has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_reduce_calc.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb61dc0373b5105cc6a54bf87d9ec4c514e285c26fe703bb1c2778bf93e6a0d"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.esmPackageTargetResolve (cyclomatic 52): resolverQuery.esmPackageTargetResolve has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":1096}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fb42f627a683ee919a406254318f22b9557e43bfd93a3cb3ccca61eb29ef32"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.loadNodeModules (cyclomatic 50): resolverQuery.loadNodeModules has cyclomatic complexity 50 (threshold 15). Of this number, 41 points are the body\u0027s own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2358}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa532c9d9958b0c92a8f3fac65be337314e5db3d858c86865a8b59bd0ca2f368"}},{"ruleId":"D1","level":"warning","message":{"text":"internalContext.Serve (cyclomatic 50): internalContext.Serve has cyclomatic complexity 50 (threshold 15). Of this number, 45 points are the body\u0027s own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":730}}}],"partialFingerprints":{"codehealthFindingId/v1":"efc025adbc2f3de7925cb44b439c322fa6fa9e2c407f8ee488d9ff99b4456963"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerOptionalChain (cyclomatic 49): parser.lowerOptionalChain has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea05de4ed83e140feb46eb76c0a56bc5f96695aaa25b2f0c0b879a794c1cc07"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.parsePackageJSON (cyclomatic 49): resolverQuery.parsePackageJSON has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"08af9e71988382071da95d310d12e6d050b707297d58a5bac7fe00cf0c7d1640"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printTokens (cyclomatic 48): printer.printTokens 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":"internal/css_printer/css_printer.go"},"region":{"startLine":1162}}}],"partialFingerprints":{"codehealthFindingId/v1":"94e923b2444516e9f884dcf8dbd7263bfa3675899c8f82ec14b934c2d06c89d4"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateCodeForFileInChunkJS (cyclomatic 48): linkerContext.generateCodeForFileInChunkJS 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":"internal/linker/linker.go"},"region":{"startLine":4657}}}],"partialFingerprints":{"codehealthFindingId/v1":"2465187b7aa8bf137a4449f0ee95960451d41293ef375b3ec32a4021ce4a65a4"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseJSXElement (cyclomatic 47): parser.parseJSXElement has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5219}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c8b3a3de191e005fab8e02a67b69f22d733d5311016ce2720fff588108c981"}},{"ruleId":"D1","level":"warning","message":{"text":"resolver.compileYarnPnPData (cyclomatic 47): resolver.compileYarnPnPData has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/yarnpnp.go"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"305287277ab5f3dc36ead97f5a35a35113cdb3734a4fed96cfd9703c2e9cb99b"}},{"ruleId":"D1","level":"warning","message":{"text":"Resolver.Resolve (cyclomatic 47): Resolver.Resolve has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"31a176d9f5e4e06b095701a234bc25fda90fd5f574fff4ce2f390159cb69dafb"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.KnownPrimitiveType (cyclomatic 46): js_ast.KnownPrimitiveType has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e2207654f46bbd439627d14b7d018f539714df487729b9172ace9a413b3f1d6"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 44): main.main has cyclomatic complexity 44 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 23 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/main.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f2010437a54bb21063eb9c645fc6b8e7f2edac723aa322fb93a650f3137e5a2"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.handleIdentifier (cyclomatic 44): parser.handleIdentifier has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":17007}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d6ed44b32d62dc52c5e8cc07343353650211730fde4bc62ef60f067910f21e"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.runImpl (cyclomatic 44): cli.runImpl has cyclomatic complexity 44 (threshold 15). Of this number, 32 points are the body\u0027s own statements and 12 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":1184}}}],"partialFingerprints":{"codehealthFindingId/v1":"6924b707627cb5712d9490b9103c6f4642de343bcd8c7f8d9fe1840ef5f031fb"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.ValuesLookTheSame (cyclomatic 43): js_ast.ValuesLookTheSame has cyclomatic complexity 43 (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_ast/js_ast_helpers.go"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a3f4bb6c2b240ff8b38de869e3ca10ec93197d7093f61e173f8c4b2264e28f"}},{"ruleId":"D1","level":"warning","message":{"text":"js_parser.Parse (cyclomatic 43): js_parser.Parse has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":17772}}}],"partialFingerprints":{"codehealthFindingId/v1":"e836852091cd8b255e7e7fb53f2484c662428c3d9401e08cb514c81c0a03665f"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.minifySwitchStmt (cyclomatic 43): parser.minifySwitchStmt has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":11569}}}],"partialFingerprints":{"codehealthFindingId/v1":"f917ad432b08763a3a16e869374a31f77aa0bf5d4d1e01141ea5af4ab4622759"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.toAST (cyclomatic 43): parser.toAST has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":18563}}}],"partialFingerprints":{"codehealthFindingId/v1":"d376da230ad9ce889424231771cb996a43d91139bcf3b557a0764356e87b910c"}},{"ruleId":"D1","level":"warning","message":{"text":"api.validateBuildOptions (cyclomatic 43): api.validateBuildOptions has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc06970f75b6137a665093a0d86fea07568ddf062fc4f3a1f5bc87e781e87a9"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printRequireOrImportExpr (cyclomatic 42): printer.printRequireOrImportExpr has cyclomatic complexity 42 (threshold 15). Of this number, 41 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":1399}}}],"partialFingerprints":{"codehealthFindingId/v1":"049e63f64618c1abe10ee394443fa5c71378976d7b61b7123d40abe51fb031d9"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.dirInfoUncached (cyclomatic 42): resolverQuery.dirInfoUncached has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":1533}}}],"partialFingerprints":{"codehealthFindingId/v1":"453d4555804880752c2aca0638f8ddf1e19965aa5c4d389642a1ed208345fe6e"}},{"ruleId":"D1","level":"warning","message":{"text":"HelperContext.StmtsCanBeRemovedIfUnused (cyclomatic 41): HelperContext.StmtsCanBeRemovedIfUnused 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":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2200}}}],"partialFingerprints":{"codehealthFindingId/v1":"75396f5fa563cf5b8318989b03d56825399f27becf70e29704e97dce1e5c7ba6"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.renameSymbolsInChunk (cyclomatic 41): linkerContext.renameSymbolsInChunk has cyclomatic complexity 41 (threshold 15). Of this number, 36 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5315}}}],"partialFingerprints":{"codehealthFindingId/v1":"98a2a3a9574ae63c968fbbb3a8ec7a04d6be5776a627367ce0735caa0118db8e"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.computeClassLoweringInfo (cyclomatic 40): parser.computeClassLoweringInfo has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d70ed46c5e17ac857a11c2ed5d5ea5c7cbd1b6a54c3a0184523ffec7ed2a41d"}},{"ruleId":"D1","level":"warning","message":{"text":"api.analyzeMetafileImpl (cyclomatic 39): api.analyzeMetafileImpl has cyclomatic complexity 39 (threshold 15). Of this number, 33 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":2265}}}],"partialFingerprints":{"codehealthFindingId/v1":"c94f984257b6bf999ba6b6d24cde5308e1d7d36d46ed07d170a0b1026246199e"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.tryToParseColorStops (cyclomatic 38): css_parser.tryToParseColorStops has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"62b6d8fe65da894220551d736a0814a92e9629de8a8ce4c40bcdd9bf23bd5e4a"}},{"ruleId":"D1","level":"warning","message":{"text":"Resolver.ResolveGlob (cyclomatic 38): Resolver.ResolveGlob has cyclomatic complexity 38 (threshold 15). Of this number, 27 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"210f9c76aef748750a436fd6aab073b0c4c8042e936489d24d25ed8bef56b350"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.CheckEqualityIfNoSideEffects (cyclomatic 37): js_ast.CheckEqualityIfNoSideEffects has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"92f757269d9316f677b7499980b91dbc58a04eebd9250c11a148b15f838d76cc"}},{"ruleId":"D1","level":"warning","message":{"text":"Lexer.NextInsideJSXElement (cyclomatic 37): Lexer.NextInsideJSXElement has cyclomatic complexity 37 (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_lexer/js_lexer.go"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d36e199217743064c6eb250e8e747661e6f13a109cf57c9900566dde81f1d8"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.hoistSymbols (cyclomatic 37): parser.hoistSymbols has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":1540}}}],"partialFingerprints":{"codehealthFindingId/v1":"728e9ffaa0a3229ae352b3819a837b06033c8d97c3bb1713e132f8d9f74d7a0b"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.insertPrefixedDeclaration (cyclomatic 36): parser.insertPrefixedDeclaration has cyclomatic complexity 36 (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/css_parser/css_decls.go"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a936cb1cbf4822856f593903393e1f7ec7edec7dd0da193b39e90beacfe1cd9"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseFn (cyclomatic 36): parser.parseFn 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":"internal/js_parser/js_parser.go"},"region":{"startLine":6120}}}],"partialFingerprints":{"codehealthFindingId/v1":"56b115999693faf004ea0a8283d183ada4f9150d069aef2f5353fee88f191a5a"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.visitStmts (cyclomatic 36): parser.visitStmts 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":"internal/js_parser/js_parser.go"},"region":{"startLine":8917}}}],"partialFingerprints":{"codehealthFindingId/v1":"848b221d7a81e99280d11d1a889bec5bbf47e5c3a425084ebb1b0e0696752610"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseListOfRules (cyclomatic 35): parser.parseListOfRules has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"90e937efbf48d5ed9b5406eb1f8cbac80278d506f6cff7a2ab4b7a85d0bb690f"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printCompoundSelector (cyclomatic 35): printer.printCompoundSelector has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cc65ab090a768e47bacd334eb8328fcab3cd2bbf3be126b09b8c7a6ca016bb9"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseParenExpr (cyclomatic 35): parser.parseParenExpr has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":3152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec3998ce9d4f2790f0795fb34a30bbc1ac770aca280b43bf08de1ce4c0ac0cd4"}},{"ruleId":"D1","level":"warning","message":{"text":"lowerClassContext.analyzeProperty (cyclomatic 35): lowerClassContext.analyzeProperty has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"416615bce2864a7d2225bcc5ca80c2f8c950c989d2e361fc81e8d5246b6f38e5"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.checkBrowserMap (cyclomatic 35): resolverQuery.checkBrowserMap has cyclomatic complexity 35 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 15 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"8117a5e95031d7c7b64e0dc07a501b5624181c6d2a55e3e79118a4ecbb894834"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parsePseudoClassSelector (cyclomatic 34): parser.parsePseudoClassSelector has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"189d8dc41c391e231dfb7d85c5ce24af2fbf0ee70856c913f675535f00eee106"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printIdent (cyclomatic 34): printer.printIdent has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":1027}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ff3086683d90fd28043758d605e6f1b3d52dfcd6b78cef103290dc3bd7b783d"}},{"ruleId":"D1","level":"warning","message":{"text":"HelperContext.SimplifyBooleanExpr (cyclomatic 34): HelperContext.SimplifyBooleanExpr has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2096}}}],"partialFingerprints":{"codehealthFindingId/v1":"d72e3f3a6be1474388372fc8facf65b6cd35a737991a77b0b25aadadaa1df4b6"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerFunction (cyclomatic 34): parser.lowerFunction has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da1503c54bb37619dd9dad7bd7b49281bbdd56a7517c683eade54742b363d75"}},{"ruleId":"D1","level":"warning","message":{"text":"api.rebuildImpl (cyclomatic 34): api.rebuildImpl has cyclomatic complexity 34 (threshold 15). Of this number, 27 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":"pkg/api/api_impl.go"},"region":{"startLine":1467}}}],"partialFingerprints":{"codehealthFindingId/v1":"d283946e3d2589def04bb3df2a6236251eac7aa71713ef8725330aff45aa532f"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printMediaQuery (cyclomatic 33): printer.printMediaQuery has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"25bba1cbac048456027b3d1bee3ebc9c7e205523e26867c4dbe44b7b1b0468d8"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseExprOrLetOrUsingStmt (cyclomatic 33): parser.parseExprOrLetOrUsingStmt has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":4987}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bdf33a9939330887e1bce3357be6e405013a70c26b9cd037eee2c6dbde3302d"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.isUnsupportedRegularExpression (cyclomatic 33): parser.isUnsupportedRegularExpression has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":13367}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c04d94a4e12e88456b420b0d060f519d6248d2a02943c6cc3a3db22bf9f8564"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerObjectRestHelper (cyclomatic 33): parser.lowerObjectRestHelper has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1453, 1627, 1523, \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_parser/js_parser_lower.go"},"region":{"startLine":1432}}}],"partialFingerprints":{"codehealthFindingId/v1":"5506c5a29ebdf4993a9a61f1c1c2ab220c5046d5448ecd4dd0b378de532fdd36"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.computeChunks (cyclomatic 33): linkerContext.computeChunks has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":3870}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5315845dd8a00b48fae8ba2b397b1b1d79adef412eca7698cfbfaa6d7aac7ed"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseFnStmt (cyclomatic 32): parser.parseFnStmt has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6726}}}],"partialFingerprints":{"codehealthFindingId/v1":"d07352f2edb428ebc26a3c15de539a04313ac8a3aa7052475e06f38c15871a99"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.mangleIf (cyclomatic 32): parser.mangleIf has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":10203}}}],"partialFingerprints":{"codehealthFindingId/v1":"977464c3a5ede5056fdb721c22c40d9c3dcfb037a1e5dd288a491acabd50c9cd"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.handleGlobPattern (cyclomatic 32): parser.handleGlobPattern has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":16569}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5233d47536bbb20a2fbb5bde99335f5fc9c78e544758d74b3373f4fda0d4e2"}},{"ruleId":"D1","level":"warning","message":{"text":"binaryExprVisitor.checkAndPrepare (cyclomatic 32): binaryExprVisitor.checkAndPrepare has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":3374}}}],"partialFingerprints":{"codehealthFindingId/v1":"1784ceb1aaed163fc72297720a8d68ed0002d3c2bcf26bf82d8c34f9bb46c9af"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.resolveWithoutSymlinks (cyclomatic 32): resolverQuery.resolveWithoutSymlinks has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d0b2f30a0faa6be73f7ec5592f097aee87bb561548756554c3293fca1f33278"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerAndMinifyGradient (cyclomatic 31): parser.lowerAndMinifyGradient has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"374d6291cbcdedc763b135e7f745851c45f343a3577be916821180463c0eb21e"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.mangleRules (cyclomatic 31): parser.mangleRules has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"264e583550329050052cc825bb7ee07a926f0f7f1b1abff3ed39bf71a19bc40e"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseNthIndex (cyclomatic 31): parser.parseNthIndex has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c218b820db56d9fde967dd30840e3b43c0177326f059ab60cecd7e207eeaac1"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.canMergeSymbols (cyclomatic 31): parser.canMergeSymbols has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"918e3828551d7cd89942db43c622b4ec1528bdf4b773060950a5cb0df7abb7da"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseClass (cyclomatic 31): parser.parseClass has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6457}}}],"partialFingerprints":{"codehealthFindingId/v1":"b168027a1c80c2576faabd668f1dbbe5f6dfe728d1597d98697ff71db77f3ade"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printNonNegativeFloat (cyclomatic 31): printer.printNonNegativeFloat has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":3564}}}],"partialFingerprints":{"codehealthFindingId/v1":"37cb9a5324357bf4871314406b3743f841aa11e1bfe90b7c4de42184aa2a4e75"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateSourceMapForChunk (cyclomatic 31): linkerContext.generateSourceMapForChunk has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":6996}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aeedc9c3e0fb15a69f00fae792db1a255e509887d849982c4e29fcb57687c1f"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.parseGradient (cyclomatic 30): css_parser.parseGradient has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"092291fdf42ed70a89e0d3ab4343a39809201e80bcb8a1342c074478121110b1"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.removeColorInterpolation (cyclomatic 30): css_parser.removeColorInterpolation has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff972ea515bd01ed8bef5efa0173b37706c44278e51de18042a1f127d70b169"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseCompoundSelector (cyclomatic 30): parser.parseCompoundSelector has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5da998d6e69d3f5600847d294cfbc18709c345a0186dd0f363db9b25f5c026"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.ShouldFoldBinaryOperatorWhenMinifying (cyclomatic 30): js_ast.ShouldFoldBinaryOperatorWhenMinifying has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1140}}}],"partialFingerprints":{"codehealthFindingId/v1":"15213d9cff20b14e2ecd262c9608aa3d65bb54f9bed704b70042dee3af518840"}},{"ruleId":"D1","level":"warning","message":{"text":"Lexer.scanCommentText (cyclomatic 30): Lexer.scanCommentText has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":2584}}}],"partialFingerprints":{"codehealthFindingId/v1":"3478c7105e052bb81d73052d2c2e9f6d739a835a6a0ccbf6df966e5810748cb4"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseTypeScriptNamespaceStmt (cyclomatic 30): parser.parseTypeScriptNamespaceStmt has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":1623}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc42ce41004bb4db3eeb4323eaf16bc44bca09ffb659ac4ffe2fb6e3828d6408"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateEntryPointTailJS (cyclomatic 30): linkerContext.generateEntryPointTailJS has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":4992}}}],"partialFingerprints":{"codehealthFindingId/v1":"c75674c0105b612915bdab62abfbac4c0055167b93c7eebb3a2b2257100ab575"}},{"ruleId":"D1","level":"warning","message":{"text":"logger.detailStruct (cyclomatic 30): logger.detailStruct has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1642}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2e9c56401dbeff890e1c834a0855a10acdc22ce95658f8cd11419b5594aec4"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseBinding (cyclomatic 29): parser.parseBinding has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5967}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca366e7ad2e062424270e1a30621ebbecac9d29a232e49837b55a3307bf4b66"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.prepareForVisitPass (cyclomatic 29): parser.prepareForVisitPass has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":18276}}}],"partialFingerprints":{"codehealthFindingId/v1":"8884c0bfef62a1576d4f9d4cb470f2efa7b767db81f914eb5fce9744e0e61eb3"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.markSyntaxFeature (cyclomatic 29): parser.markSyntaxFeature has cyclomatic complexity 29 (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":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ee1bc5caf752df3fda7ad16354d1d7accb2f9ca6dfd149737bcfcebaebe5b1"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.insertStmtsAfterSuperCall (cyclomatic 29): parser.insertStmtsAfterSuperCall has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":2451}}}],"partialFingerprints":{"codehealthFindingId/v1":"749db6e0a097d0e2b3652c125227657c0306a7e4102dbd1c1182eac2d11cacc9"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.matchImportWithExport (cyclomatic 29): linkerContext.matchImportWithExport has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":2628}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2d6bc84ee87b223d8d4429f8b24f631650618a946f66e41aea35e8eb1c06ee"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.finalizeResolve (cyclomatic 29): resolverQuery.finalizeResolve has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":831}}}],"partialFingerprints":{"codehealthFindingId/v1":"acf46c5151b8b89573873921a296bbb875442b0b7e6a51b1ba389aab767cc1e8"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.loadAsMainField (cyclomatic 29): resolverQuery.loadAsMainField has cyclomatic complexity 29 (threshold 15). Of this number, 23 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":"internal/resolver/resolver.go"},"region":{"startLine":1972}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e7c00f0d146b20d3f5cb901bf73bc7147f5dbda4a3a7ae3139d7638143f3626"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.resolveToUnqualified (cyclomatic 29): resolverQuery.resolveToUnqualified has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/yarnpnp.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"14802694d09b0bb596324ac7c6cad5e3b5eb3d28f470babc616aa7868e9404cc"}},{"ruleId":"D1","level":"warning","message":{"text":"bundler.runOnLoadPlugins (cyclomatic 28): bundler.runOnLoadPlugins 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/bundler/bundler.go"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"557dc5381fa65dcb94d4c52eacfe535e0373583fd97ed74e377b9d9e8ea83e9d"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.skipTypeScriptTypeParameters (cyclomatic 28): parser.skipTypeScriptTypeParameters 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/js_parser/ts_parser.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"736194e3033c2112b2d51202e2d8c51bacc4b7953965a681e0959da6a533a5fa"}},{"ruleId":"D1","level":"warning","message":{"text":"Options.Equal (cyclomatic 28): Options.Equal has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"860b1f93e9e54915eec6b0e7d4ab08df665f4950a5fcb525cdab28351dd8002a"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.maybeAppendLegalComments (cyclomatic 28): linkerContext.maybeAppendLegalComments 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/linker/linker.go"},"region":{"startLine":6544}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbaeba9349e0c452da512e39cdc694ec3627ed8e534073e0d13f2bceea433839"}},{"ruleId":"D1","level":"warning","message":{"text":"resolver.parseImportsExportsMap (cyclomatic 28): resolver.parseImportsExportsMap has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 644). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/resolver/package_json.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc04ebf08c812d6eafb5301ab59545d4ac63fa6fa896619c5e2d7824ebd833e"}},{"ruleId":"D1","level":"warning","message":{"text":"serviceType.handleBuildRequest (cyclomatic 27): serviceType.handleBuildRequest has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 13 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b560bac9d189f63c5a2ec38251a6e94b8e137fd8768034cd190c096b71cc574"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerNestingInRuleWithContext (cyclomatic 27): parser.lowerNestingInRuleWithContext has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_nesting.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"a96fad32abb0b1e2b07e1e2a1a315a850e33ff538ee9fc2ad6883a7b16f0bc51"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseAttributeSelector (cyclomatic 27): parser.parseAttributeSelector has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ac369bb70f8e2e48f23a43024f0ba59b5f57bd42bee16b2def3be3ba3fb4ff0"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printQuotedWithQuote (cyclomatic 27): printer.printQuotedWithQuote has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc3565c9a877b734cda2a6343924142feea43b0c0e3404a30493b79a8b97593b"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.ToBooleanWithSideEffects (cyclomatic 27): js_ast.ToBooleanWithSideEffects has cyclomatic complexity 27 (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":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2014}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9e1245f63d3b87a6d87e59748eff08bd0fb5ee4eb0bb4e170f54914e459f947"}},{"ruleId":"D1","level":"warning","message":{"text":"jsonParser.parseExpr (cyclomatic 27): jsonParser.parseExpr has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/json_parser.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"9549fdbf0c7d2f74391c648ddf9addde545f3258e26fd9ebdf9c3a8d70ed74f0"}},{"ruleId":"D1","level":"warning","message":{"text":"logger.NewStderrLog (cyclomatic 27): logger.NewStderrLog has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 730, 700). 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/logger/logger.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"110b1a95eb519daef4242c1d078e6aa870e580c3bc72211a80ae459284951608"}},{"ruleId":"D1","level":"warning","message":{"text":"logger.PrintSummary (cyclomatic 27): logger.PrintSummary 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 999). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/logger/logger.go"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d8efd1b9edc03c478a64facbd1614f66050555d1e619640ee7caac696aba843"}},{"ruleId":"D1","level":"warning","message":{"text":"resolver.NewResolver (cyclomatic 27): resolver.NewResolver has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a9815c8dc7f0c36d34b6f670691a6797858cadea3e82e22b976808033e310a"}},{"ruleId":"D1","level":"warning","message":{"text":"lowerClassContext.lowerField (cyclomatic 26): lowerClassContext.lowerField has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cc50a64f4c593fa8cd5d8762661b35ce68706116e163cb1ab21dd87158c2650"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.matchTSConfigPaths (cyclomatic 26): resolverQuery.matchTSConfigPaths has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2134}}}],"partialFingerprints":{"codehealthFindingId/v1":"613b9260dd55c5f0ad3f456d3734e392b8431376e1a17ba2eb195883d9a0ae74"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.mangleFont (cyclomatic 25): parser.mangleFont has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_font.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e3982ab31e817c99c4d5dbbac7512c91714fb9124b2867a1b21aad1aef68de0"}},{"ruleId":"D1","level":"warning","message":{"text":"realFS.WatchData (cyclomatic 25): realFS.WatchData has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 481, 515, 523, \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/fs/fs_real.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"0af99bd79526bb10754d98b2ef72417ca2bddfa83cde8c487a99eec06dfee4c9"}},{"ruleId":"D1","level":"warning","message":{"text":"graph.CloneLinkerGraph (cyclomatic 25): graph.CloneLinkerGraph has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 10 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/graph/graph.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5ea840296c1a6734b83a4f6925deea81df2f35a68b23040205a6a83e44c8fd7"}},{"ruleId":"D1","level":"warning","message":{"text":"HelperContext.isSideEffectFreeUnboundIdentifierRef (cyclomatic 25): HelperContext.isSideEffectFreeUnboundIdentifierRef has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2637}}}],"partialFingerprints":{"codehealthFindingId/v1":"37957f6e774bf368400370e870fbcb61fb73829023238128d72e6ce588bea039"}},{"ruleId":"D1","level":"warning","message":{"text":"js_parser.shouldKeepStmtInDeadControlFlow (cyclomatic 25): js_parser.shouldKeepStmtInDeadControlFlow has cyclomatic complexity 25 (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_parser/js_parser.go"},"region":{"startLine":8777}}}],"partialFingerprints":{"codehealthFindingId/v1":"2253621731c1f4d951bdba843de5e75a512bd98546aecdb591aee1edaae833fa"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.instantiateDefineExpr (cyclomatic 25): parser.instantiateDefineExpr has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12633}}}],"partialFingerprints":{"codehealthFindingId/v1":"56423e4dd288a3d50c4735527e2819dae5f00111c904c4ff5cd0059f3265ea73"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.maybeMarkKnownGlobalConstructorAsPure (cyclomatic 25): parser.maybeMarkKnownGlobalConstructorAsPure has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":16878}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59073d9583428a87e92c3f8c0dd57c2118782dc17f4bf70ae830a58be8436e4"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerAndMangleBoxShadow (cyclomatic 24): parser.lowerAndMangleBoxShadow has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_box_shadow.go"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8b399933620278bf9c92b25b4a379b6020c848e258c198d1c3fcb83b031c0cc"}},{"ruleId":"D1","level":"warning","message":{"text":"helpers.internalQuote (cyclomatic 24): helpers.internalQuote has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/quote.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c1a972e2540fec82440656834908b894a0becc14bc478bc52db416feb80681"}},{"ruleId":"D1","level":"warning","message":{"text":"js_parser.duplicateCaseEquals (cyclomatic 24): js_parser.duplicateCaseEquals has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c844fed3c40d4c110dcd490ef3294089f88356628411d764ba7249b27621cf"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseAndDeclareDecls (cyclomatic 24): parser.parseAndDeclareDecls has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5569}}}],"partialFingerprints":{"codehealthFindingId/v1":"9345c63db37f31bdcb44df2e1d6437c9b5431f7127ea70de30e0e2b5300c7f70"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseExportClause (cyclomatic 24): parser.parseExportClause has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5824}}}],"partialFingerprints":{"codehealthFindingId/v1":"78736782465b81a355a85d3cf8edecc3f685ffc2f706319b1fbcf1f3caf887db"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.skipTypeScriptObjectType (cyclomatic 24): parser.skipTypeScriptObjectType has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"151fe3adab811d02d56c90f1bf71d703f8c51ce6a88d9e6e6253817cb3e591a3"}},{"ruleId":"D1","level":"warning","message":{"text":"css_lexer.decodeEscapesInToken (cyclomatic 23): css_lexer.decodeEscapesInToken has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f00890f6e4cda129ad3da4d4f7e0c48340f8ac4590685bf80cca8b372eeda4"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.removeImpliedPositions (cyclomatic 23): css_parser.removeImpliedPositions has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"48a07d3400250776e0a07cbf62300644e8893003873f869d20a739722a65b976"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.processListStyleShorthand (cyclomatic 23): parser.processListStyleShorthand has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_list_style.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c6575fc54274b4630c422498e7a83d291600255150121cd0c80fe78e601005"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseSelectorList (cyclomatic 23): parser.parseSelectorList has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f5f1b650f44381332426936fbe3eb6c5bcb38255c585838fce7e39d6b4dff03"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.FoldStringAddition (cyclomatic 23): js_ast.FoldStringAddition has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1779}}}],"partialFingerprints":{"codehealthFindingId/v1":"218af89facba22f8ad8f101f2b1df0dd8964e03a0fb4d9a2b2e987a0efa20b22"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseAsyncPrefixExpr (cyclomatic 23): parser.parseAsyncPrefixExpr has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":2991}}}],"partialFingerprints":{"codehealthFindingId/v1":"5810b71f811de8448c3e0bd2f02b62176cee993374bd2bc09c12de98b7a43799"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.lateConstantFoldUnaryOrBinaryOrIfExpr (cyclomatic 23): printer.lateConstantFoldUnaryOrBinaryOrIfExpr has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":1765}}}],"partialFingerprints":{"codehealthFindingId/v1":"fafa4233cf7e6f4da4c99f3c8e4f7e6ecbf82ba0c8d48bda13e245a07f066770"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateCodeForLazyExport (cyclomatic 23): linkerContext.generateCodeForLazyExport has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 7 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/linker/linker.go"},"region":{"startLine":2105}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7677db5dc671576025f127c8ca8d8353fb88c4b361bf9bca316344dcb71400c"}},{"ruleId":"D1","level":"warning","message":{"text":"api.validateFeatures (cyclomatic 23): api.validateFeatures has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e28e505e0a90e30aa2ee3dbe8c325afa6f4dd0a22951a10604515e01c3f70a"}},{"ruleId":"D1","level":"warning","message":{"text":"apiHandler.broadcastBuildResult (cyclomatic 23): apiHandler.broadcastBuildResult has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"71db18ca9a453fe4373070f42ea9ac2471910507d5e10a9c8b1da950d650a86e"}},{"ruleId":"D1","level":"warning","message":{"text":"scanner.maybeParseFile (cyclomatic 22): scanner.maybeParseFile has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":1539}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a854bc13dfd45bb74999f326a3cda4f2106fedd41d2c02efe42e9918c86a633"}},{"ruleId":"D1","level":"warning","message":{"text":"lexer.consumeNumeric (cyclomatic 22): lexer.consumeNumeric has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0460ed6f23bd4d9de23831675417aee2a4569f19a33245e842de492f25f869d"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printWithEscape (cyclomatic 22): printer.printWithEscape has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c0cd794b83b7a4a4ab8d5af0ff4f630fbea39293d6197bf83295ded7cf9f749"}},{"ruleId":"D1","level":"warning","message":{"text":"HelperContext.ClassCanBeRemovedIfUnused (cyclomatic 22): HelperContext.ClassCanBeRemovedIfUnused has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2335}}}],"partialFingerprints":{"codehealthFindingId/v1":"c585395f1c7b5b5e434b3079784131f4bc373cbe505bbdb73d03bf53d46e42dd"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseStmtsUpTo (cyclomatic 22): parser.parseStmtsUpTo has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":8464}}}],"partialFingerprints":{"codehealthFindingId/v1":"c15d4c571bdd8ff37c3691415aae1f56b6e8d4539620e7723799cdc93cd60bfc"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateChunksInParallel (cyclomatic 22): linkerContext.generateChunksInParallel has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 659). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/linker/linker.go"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62b2cfb9b3d3441025edc42e1ed9d849e4dead09cec2ea80bf875a86aee7eb6"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.findImportedPartsInJSOrder (cyclomatic 22): linkerContext.findImportedPartsInJSOrder has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 4163). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/linker/linker.go"},"region":{"startLine":4139}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c71bc8d5a6a4c2be3fd9bcdb77e7fd83e0d00f67e0b7752bdc95fc0ee923269"}},{"ruleId":"D1","level":"warning","message":{"text":"logger.GenerateStringInJSTable (cyclomatic 22): logger.GenerateStringInJSTable has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1904}}}],"partialFingerprints":{"codehealthFindingId/v1":"108fc6f37094622113f059642a81d4f71a7ef47e78997ce878118a857dd32b2d"}},{"ruleId":"D1","level":"warning","message":{"text":"api.validateDefines (cyclomatic 22): api.validateDefines has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"3610ede2ed7390dee3aef3b51a3d7dc15b452290c75bd160758d3ed334cf7f38"}},{"ruleId":"D1","level":"warning","message":{"text":"api.transformImpl (cyclomatic 22): api.transformImpl has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1687}}}],"partialFingerprints":{"codehealthFindingId/v1":"c93e3688f4f3c1ea01e6755503084d61db5c9f0bccdd4ad98606902de7780567"}},{"ruleId":"D1","level":"warning","message":{"text":"main.decodePacket (cyclomatic 21): main.decodePacket has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 113). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/stdio_protocol.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bd25f9e46db09e851f6b197699505b623ee8c3452b07345e4cb1f398410cb23"}},{"ruleId":"D1","level":"warning","message":{"text":"Bundle.Compile (cyclomatic 21): Bundle.Compile has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":3012}}}],"partialFingerprints":{"codehealthFindingId/v1":"78510aaafc26c797b729163d00a7bcb08516ede967b4d788a92a99ef190b10d5"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseDeclaration (cyclomatic 21): parser.parseDeclaration has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":2348}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a2cb517bcbd1f43ec01d5344b6acf6f2219e22e84d07d95d74b5c1e0291b46"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.MaybeSimplifyNot (cyclomatic 21): js_ast.MaybeSimplifyNot has cyclomatic complexity 21 (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":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cd4865ab68862b25fee9f90e8dbc19b518b4a5642f0b5f9a3242eb49e45ec4d"}},{"ruleId":"D1","level":"warning","message":{"text":"lowerClassContext.hoistComputedProperties (cyclomatic 21): lowerClassContext.hoistComputedProperties has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"286104efc97bce629bef92b7bd6e4c30a5115ecaa1c98504a780f61c4f58e388"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printDecorators (cyclomatic 21): printer.printDecorators has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6a07d2093bcaac4c0203e83c1fdee4e9f0935166360e710105690423bf34198"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateExtraDataForFileJS (cyclomatic 21): linkerContext.generateExtraDataForFileJS has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/debug.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0b4e780c0fe7442b1c31fb93a72def6d6b62524e5aea23f2e9b9e21a31cc128"}},{"ruleId":"D1","level":"warning","message":{"text":"bundler.RunOnResolvePlugins (cyclomatic 20): bundler.RunOnResolvePlugins has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"9877e20c64626d79c5a1f531d452a1ad901ae11c4136661ad2f9b91ad12a750d"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.mangleNumber (cyclomatic 20): css_parser.mangleNumber has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":2123}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4dc96f95cc4acf7dff1158e5bfaf77056512e8415c59ea2c6dedc68291f4a1"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseListOfDeclarations (cyclomatic 20): parser.parseListOfDeclarations has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a78c7f5bcd7fdb36854c870ea6909b503f35b780fccc1b291f2a9300383acae"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseSelectorRule (cyclomatic 20): parser.parseSelectorRule has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":2151}}}],"partialFingerprints":{"codehealthFindingId/v1":"da445f489ae45e1cfbb1fa82c6ba92022095fda65c6b2cce4cb598fccf96617f"}},{"ruleId":"D1","level":"warning","message":{"text":"calcProduct.partiallySimplify (cyclomatic 20): calcProduct.partiallySimplify has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_reduce_calc.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f4852fa65cf9d6ed1b7679ac9cf58e718fafefbd03add29aabcfa7c6ec358c"}},{"ruleId":"D1","level":"warning","message":{"text":"helpers.EncodeStringAsPercentEscapedDataURL (cyclomatic 20): helpers.EncodeStringAsPercentEscapedDataURL has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/dataurl.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e3e29141110600e13bb68f7fc209ca2e8aa3bcdfc498a18e1fff62d8a8c51b"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseImportClause (cyclomatic 20): parser.parseImportClause has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5703}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0682df29c9db533635c9e1760a4e83b56559d5a47d2101ad7fce6860485530"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseDecorator (cyclomatic 20): parser.parseDecorator has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6924}}}],"partialFingerprints":{"codehealthFindingId/v1":"23aac1c1605eaed432f05dd58dcd0f0d66694b7d696633789c837ab265bcc8c0"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseTypeScriptEnumStmt (cyclomatic 20): parser.parseTypeScriptEnumStmt has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":1360}}}],"partialFingerprints":{"codehealthFindingId/v1":"00018489627f465362161e3c7f0a4b22395f04a361a03ef6ba8918b0232abe52"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printNumber (cyclomatic 20): printer.printNumber has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"935546a1497a290b1d58aec5a44fa9df6e7946cd139b3da04910a483ae2538e8"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.generateGlobalNamePrefix (cyclomatic 20): linkerContext.generateGlobalNamePrefix has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5999}}}],"partialFingerprints":{"codehealthFindingId/v1":"0964df2cd9d12ad12957fd313598ca2eba525914633fa8273f7c68d9d1600a64"}},{"ruleId":"D1","level":"warning","message":{"text":"logger.PlatformIndependentPathDirBaseExt (cyclomatic 20): logger.PlatformIndependentPathDirBaseExt has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"959ddee980ac175aafdb1d39f463760d9ea6004045359ded2b111b6e7dfd384f"}},{"ruleId":"D1","level":"warning","message":{"text":"resolver.isValidTSConfigPathNoBaseURLPattern (cyclomatic 20): resolver.isValidTSConfigPathNoBaseURLPattern has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/tsconfig_json.go"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d130c4e15a0ea396e474ee580e5ed2e37be6f8e2618f13e51cb2a2b5262f38b"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.esmPackageTargetReverseResolve (cyclomatic 20): resolverQuery.esmPackageTargetReverseResolve has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"c241ebdb65d92cd4dbce136322f07c97b981f221b083550ba20892ea07a3521b"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.checkForBuiltInNodeModules (cyclomatic 20): resolverQuery.checkForBuiltInNodeModules has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2539}}}],"partialFingerprints":{"codehealthFindingId/v1":"62bd9e2fed7f016b6631b9fc70938fe95123867fc805cf832c676aa7475829f1"}},{"ruleId":"D1","level":"warning","message":{"text":"bundler.ResolveFailureErrorTextSuggestionNotes (cyclomatic 19): bundler.ResolveFailureErrorTextSuggestionNotes has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4def244259130c33a9031c65e0cc988334be90a6758ae330586a90f89d97e29"}},{"ruleId":"D1","level":"warning","message":{"text":"scanner.validateTLA (cyclomatic 19): scanner.validateTLA has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":2827}}}],"partialFingerprints":{"codehealthFindingId/v1":"a93a8835d6ac4cc7a0e6902fe743290ae6063693dc01c3aad0a62f7b06c7bf71"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.processAnimationShorthand (cyclomatic 19): parser.processAnimationShorthand has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_animation.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a8ff73ebd18c970f48ef5ab03ee1e137cf049713430f6f3afa0fedf9880f1e8"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parseMediaInParens (cyclomatic 19): parser.parseMediaInParens has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_media.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fe74c7d1d580368b9d9069666323acbfc18a3e0b4621c4fc404af1aefb3ac53"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.warnAboutDuplicateProperties (cyclomatic 19): parser.warnAboutDuplicateProperties has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c651cbd4a317e0bc019e223353673dad74c363e8889a6ccedd08b312c83e37"}},{"ruleId":"D1","level":"warning","message":{"text":"logger.msgString (cyclomatic 19): logger.msgString has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa1009dd66fb8239fbf1fcc795120c58b81fb445380c0ef65b5848d9112c7a5"}},{"ruleId":"D1","level":"warning","message":{"text":"Source.CommentTextWithoutIndent (cyclomatic 19): Source.CommentTextWithoutIndent has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"4946f1ac325adda83a2374a10ba12510828a30e6d81848f89fe720354db769f2"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.esmPackageExportsResolve (cyclomatic 19): resolverQuery.esmPackageExportsResolve has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"705da7a2ab2ded24b4b92c479dff3d9c89dfbe114441baf7e3e43f0f7d97f088"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.esmPackageImportsExportsResolve (cyclomatic 19): resolverQuery.esmPackageImportsExportsResolve has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e8f866c550b86ed0517de88476ad3f0f0900ede7d7d248e2f4da3bcf78a3ced"}},{"ruleId":"D1","level":"warning","message":{"text":"bundler.lowestCommonAncestorDirectory (cyclomatic 18): bundler.lowestCommonAncestorDirectory has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":2118}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d10bf5879bda4a4b3fd0287a73adda3e86456f7ad06d1dafdd0831f362ba77"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.captureValueWithPossibleSideEffects (cyclomatic 18): parser.captureValueWithPossibleSideEffects has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 4 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":"internal/js_parser/js_parser.go"},"region":{"startLine":11984}}}],"partialFingerprints":{"codehealthFindingId/v1":"584d0e31f1d92cfd5931336939c810ca8b4b4e474a62626911494da6872e1ca3"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.isDotOrIndexDefineMatch (cyclomatic 18): parser.isDotOrIndexDefineMatch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12574}}}],"partialFingerprints":{"codehealthFindingId/v1":"02614804842bb2853dafa9952c2a1e8f22deb39263c761949cc8297d9f41b80f"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printSpaceBeforeOperator (cyclomatic 18): printer.printSpaceBeforeOperator has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e2aa1c8b80528d771beb1b04d195606366e9868297006fbc0f45db01b65e38e"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.mangleLocalCSS (cyclomatic 18): linkerContext.mangleLocalCSS has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"93fbe3a3a3a2005b60eeba2334862aaa0757da7477a6767d0db63afe35d22bd6"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.markFileLiveForTreeShaking (cyclomatic 18): linkerContext.markFileLiveForTreeShaking has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":3215}}}],"partialFingerprints":{"codehealthFindingId/v1":"77616b6f454aa52c630fc307c04d9cf832ea885b2484b753e4a1b41435b9480f"}},{"ruleId":"D1","level":"warning","message":{"text":"resolverQuery.loadAsFile (cyclomatic 18): resolverQuery.loadAsFile has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"449c45e9d1717161609c6f9d02c8075143777a4e8b08228b500650ee887f9694"}},{"ruleId":"D1","level":"warning","message":{"text":"scanner.preprocessInjectedFiles (cyclomatic 17): scanner.preprocessInjectedFiles 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 one function literal inside it that branches (line 1755). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/bundler/bundler.go"},"region":{"startLine":1696}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31b4427ac26e1d333ad7b04123f659254f4b6c409646b2405a95097ee018fa2"}},{"ruleId":"D1","level":"warning","message":{"text":"Token.Equal (cyclomatic 17): Token.Equal has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_ast/css_ast.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"a27d3db3c07bc47aab0ea6a026f871de488e128548af4980ec42a9ce0dfdd494"}},{"ruleId":"D1","level":"warning","message":{"text":"css_parser.isSafeSelectors (cyclomatic 17): css_parser.isSafeSelectors has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"342ba5bce8271484221e00db5a40c147044c8d9df449d716f90cecb23d821b42"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.expectWithMatchingLoc (cyclomatic 17): parser.expectWithMatchingLoc has cyclomatic complexity 17 (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/css_parser/css_parser.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"18cccbaf798ddac28046aefb723581cff74a1f6b8c31259ed88ac888bd0e5a2b"}},{"ruleId":"D1","level":"warning","message":{"text":"fs.ParseYarnPnPVirtualPath (cyclomatic 17): fs.ParseYarnPnPVirtualPath has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/fs/fs_zip.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac62f1fee066c6e99bae055d0e0719d8fa4257a120324e459ab7c2a6b754cd23"}},{"ruleId":"D1","level":"warning","message":{"text":"mockFS.Rel (cyclomatic 17): mockFS.Rel has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/fs/fs_mock.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"72bf2c4e93abe4f3d8bc9868e4c676c036cfbb988c7acca48f77ca3f5502259e"}},{"ruleId":"D1","level":"warning","message":{"text":"Lexer.NextJSXElementChild (cyclomatic 17): Lexer.NextJSXElementChild has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"6960edc3d1a3d9066f0c60ea8a971c1c01b2f18c7b5bb5971c43cb6914ede058"}},{"ruleId":"D1","level":"warning","message":{"text":"js_parser.duplicateCaseHash (cyclomatic 17): js_parser.duplicateCaseHash 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":"internal/js_parser/js_parser.go"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cc4794fd5f1ad2c396cf2761fe277fee86b2a2d542c9d5441e584eb94ee29f6"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.globPatternFromExpr (cyclomatic 17): parser.globPatternFromExpr has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":16710}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df804be79a813ffd4469a41d7de56c28c58d2c2da28bbb5f0ce8c5a53131e8a"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.lowerSuperPropertyOrPrivateInAssign (cyclomatic 17): parser.lowerSuperPropertyOrPrivateInAssign has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecef4424a64434ff233449cff202d377461c83d446ca345efb39a40f795202c6"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.skipTypeScriptBinding (cyclomatic 17): parser.skipTypeScriptBinding has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f08d56f7ab1601aa9df7ad65d811e1f12b3438cda08476b8f4693f63c095b3"}},{"ruleId":"D1","level":"warning","message":{"text":"linker.Link (cyclomatic 17): linker.Link has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"a04b68e60b9c1c608729f6b9e6a428773b970cbe21d9940180560aab6df15b81"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.mangleProps (cyclomatic 17): linkerContext.mangleProps has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"62dbfd6130c831404d4473093413f0934f1aca6bfa451a50dafef9b918918fbe"}},{"ruleId":"D1","level":"warning","message":{"text":"scanner.scanAllDependencies (cyclomatic 16): scanner.scanAllDependencies 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/bundler/bundler.go"},"region":{"startLine":2175}}}],"partialFingerprints":{"codehealthFindingId/v1":"8803360b63991d520007e618aeff71c105eb1da7d11a6efbd562adbe6a5244e9"}},{"ruleId":"D1","level":"warning","message":{"text":"lexer.consumeURL (cyclomatic 16): lexer.consumeURL 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/css_lexer/css_lexer.go"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77f131cb26c37b26ceb5a3af8bd8392773402a3687156105290d849152799e3"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.handleComposesPragma (cyclomatic 16): parser.handleComposesPragma 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/css_parser/css_decls_composes.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"98b8054bf3c5ce4487912a3613653242818762f6248c7fc996b876c82eed3802"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.flattenLocalAndGlobalSelectors (cyclomatic 16): parser.flattenLocalAndGlobalSelectors 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/css_parser/css_parser_selector.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9d29f3242ffecaf04e67e7d9147b1f1c53bfd39c29af7ca45ac34d0ab4e8ed"}},{"ruleId":"D1","level":"warning","message":{"text":"helpers.DecodeWTF8Rune (cyclomatic 16): helpers.DecodeWTF8Rune has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/utf.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"06f38e8431b38479f18cbb35b08360d40eae467da4c3c4e59fae7916594484f4"}},{"ruleId":"D1","level":"warning","message":{"text":"js_ast.ToNullOrUndefinedWithSideEffects (cyclomatic 16): js_ast.ToNullOrUndefinedWithSideEffects has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1939}}}],"partialFingerprints":{"codehealthFindingId/v1":"039e96b16f7677fd0d15004836eaf0f0c1d863aed0cd4283b405c4ebfbfaa25c"}},{"ruleId":"D1","level":"warning","message":{"text":"js_parser.analyzeSwitchCasesForLiveness (cyclomatic 16): js_parser.analyzeSwitchCasesForLiveness 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/js_parser/js_parser.go"},"region":{"startLine":771}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7dcf2a533093b8174ae206af7184ea2da71d8b3e667785a2de014710957b43"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parsePropertyBinding (cyclomatic 16): parser.parsePropertyBinding 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/js_parser/js_parser.go"},"region":{"startLine":2740}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c63f97bc93885ebdb20f2b03a58a2f747afd2a6d821ac2c37b9ca7d419cc2b4"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.parsePath (cyclomatic 16): parser.parsePath 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/js_parser/js_parser.go"},"region":{"startLine":6616}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0a4eb8b355b96c292796fd6b5197b38cd0edc179e539a95609c2d07ced17c63"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.generateClosureForTypeScriptNamespaceOrEnum (cyclomatic 16): parser.generateClosureForTypeScriptNamespaceOrEnum 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/js_parser/ts_parser.go"},"region":{"startLine":1822}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa16fbf9fd6642f25e025ff42a39d3365786f1caf7dfac0375530c42f19079f5"}},{"ruleId":"D1","level":"warning","message":{"text":"lowerClassContext.insertInitializersIntoConstructor (cyclomatic 16): lowerClassContext.insertInitializersIntoConstructor 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/js_parser/js_parser_lower_class.go"},"region":{"startLine":1974}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4dbb1229cd9cf47975bb89e99477b0239a0998edc490af0a70c4261c8b4d52a"}},{"ruleId":"D1","level":"warning","message":{"text":"printer.printQuotedUTF16 (cyclomatic 16): printer.printQuotedUTF16 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/js_printer/js_printer.go"},"region":{"startLine":1353}}}],"partialFingerprints":{"codehealthFindingId/v1":"009dff6f1e2d0af74f9312db654013842488e27d7813d46148c4d75b1f41911f"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.markFileReachableForCodeSplitting (cyclomatic 16): linkerContext.markFileReachableForCodeSplitting 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/linker/linker.go"},"region":{"startLine":3162}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d3e5064d46d95efe6f700cac0d2c24bbfea8ce0fd7a34c8109f178b341737f"}},{"ruleId":"D1","level":"warning","message":{"text":"linkerContext.preventExportsFromBeingRenamed (cyclomatic 16): linkerContext.preventExportsFromBeingRenamed 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/linker/linker.go"},"region":{"startLine":6922}}}],"partialFingerprints":{"codehealthFindingId/v1":"5440447825bc1e4aa8637cabfb4aae546fa47bc95e33f7f7481088c9ba4672a0"}},{"ruleId":"D1","level":"warning","message":{"text":"pluginImpl.onResolve (cyclomatic 16): pluginImpl.onResolve 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 1938). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1927}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e2a11938dca9576e2202cb12804020369d99e2649e9c573a6c9f4b695c09fae"}},{"ruleId":"D1","level":"warning","message":{"text":"cli.parseServeOptionsImpl (cyclomatic 16): cli.parseServeOptionsImpl has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf391b4fcb9b3b1e7a5cb4f7d18979f3b04679794e6c4a74325e84e31fb992c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.visitExprInOut (cognitive 1654): parser.visitExprInOut has cognitive complexity 1654 (threshold 15). Drivers by points: if/else 1334, boolean chains 130, match/switch 117, loops 73 (nesting depth added 1094). Of this number, 1569 points are the body\u0027s own statements and 85 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_parser/js_parser.go"},"region":{"startLine":13504}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bff5f81401e2f870690f577db306fc2ce90991d3c219aac052544bf554b01d0"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printExpr (cognitive 745): printer.printExpr has cognitive complexity 745 (threshold 15). Drivers by points: if/else 610, boolean chains 83, loops 31, match/switch 21 (nesting depth added 403). To reduce it, split the body into named stages: move each independent step or branch into 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_printer/js_printer.go"},"region":{"startLine":2005}}}],"partialFingerprints":{"codehealthFindingId/v1":"99efed931ccf13bbcb74a6802ef1db17c19ad20c8a6a6fe8efa3a2be19c4f703"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.visitAndAppendStmt (cognitive 628): parser.visitAndAppendStmt has cognitive complexity 628 (threshold 15). Drivers by points: if/else 515, boolean chains 56, loops 48, match/switch 9 (nesting depth added 373). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":10350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b11b6f9f6a19f0073006d4819be12d874ac38d0559300168311d0c67b08d20a"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseStmt (cognitive 517): parser.parseStmt has cognitive complexity 517 (threshold 15). Drivers by points: if/else 392, boolean chains 63, match/switch 45, loops 15, jumps 2 (nesting depth added 307). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":7061}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f77a96daf17ca98f4b4094f92e4653d5856b7f3ecd59023088f096d17ffaa8"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.scanImportsAndExports (cognitive 424): linkerContext.scanImportsAndExports has cognitive complexity 424 (threshold 15). Drivers by points: if/else 315, loops 80, boolean chains 22, match/switch 6, jumps 1 (nesting depth added 289). Of this number, 293 points are the body\u0027s own statements and 131 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/linker/linker.go"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"c80b986f8cce38ac70e2e6343c1a534046a49896a810007d10f82ae2a94e043e"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseOptionsImpl (cognitive 406): cli.parseOptionsImpl has cognitive complexity 406 (threshold 15). Drivers by points: if/else 328, boolean chains 41, match/switch 33, loops 4 (nesting depth added 202). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"e67a956267c41818d6efb38baa3358aec01689dcb4a545a868efe012c5b0e975"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.mangleStmts (cognitive 380): parser.mangleStmts has cognitive complexity 380 (threshold 15). Drivers by points: if/else 313, boolean chains 23, loops 22, match/switch 15, jumps 7 (nesting depth added 258). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":9113}}}],"partialFingerprints":{"codehealthFindingId/v1":"137031a29fa5fc15f6a2f84e6643d0accedc1e258dd383626b00c0500058790d"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.parseFile (cognitive 325): bundler.parseFile has cognitive complexity 325 (threshold 15). Drivers by points: if/else 258, loops 39, match/switch 16, boolean chains 12 (nesting depth added 218). Of this number, 324 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f7b17f4cd29174348763639a20dd8a919b79e52a452873559d69e0bdd69a59"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.Next (cognitive 320): Lexer.Next has cognitive complexity 320 (threshold 15). Drivers by points: if/else 140, match/switch 109, loops 46, boolean chains 13, jumps 12 (nesting depth added 214). To reduce it, split the body into named stages: move each independent step or branch into 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_lexer/js_lexer.go"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a146684bc2fc6828ea34230df19edfb3f6de0960fac2a9cd7474133e7faf920"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseSuffix (cognitive 305): parser.parseSuffix has cognitive complexity 305 (threshold 15). Drivers by points: if/else 276, match/switch 13, boolean chains 12, loops 4 (nesting depth added 199). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":4263}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e79673373d7c213ae7bc00ea4f5b0c878b75bbcf896d1ff6af571d9924d2130"}},{"ruleId":"D2","level":"warning","message":{"text":"binaryExprVisitor.visitRightAndFinish (cognitive 302): binaryExprVisitor.visitRightAndFinish has cognitive complexity 302 (threshold 15). Drivers by points: if/else 276, boolean chains 17, match/switch 9 (nesting depth added 177). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":16019}}}],"partialFingerprints":{"codehealthFindingId/v1":"06eb53b46fd66557ce73d4684d87ca59d00a8e1f77ad9eaa4160d00d61b949eb"}},{"ruleId":"D2","level":"warning","message":{"text":"resolver.compileYarnPnPData (cognitive 285): resolver.compileYarnPnPData has cognitive complexity 285 (threshold 15). Drivers by points: if/else 242, loops 37, boolean chains 6 (nesting depth added 237). To reduce it, split the body into named stages: move each independent step or branch into 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/resolver/yarnpnp.go"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f356aed92d6ce7730444cc659923cf3112a69220bd6c097e866f6262a793425"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseAtRule (cognitive 280): parser.parseAtRule has cognitive complexity 280 (threshold 15). Drivers by points: if/else 207, match/switch 23, boolean chains 20, loops 19, jumps 11 (nesting depth added 169). Of this number, 279 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":1196}}}],"partialFingerprints":{"codehealthFindingId/v1":"b94e642396a3c3c24cd47d6b7d2b3c0211ee397db934062808f6f7b1ab541bd9"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseProperty (cognitive 262): parser.parseProperty has cognitive complexity 262 (threshold 15). Drivers by points: if/else 201, boolean chains 42, match/switch 19 (nesting depth added 138). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":2184}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff8ce618a4ea92542778168e3cff08488db287ea9df3d65d3243d0e9fda255a4"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printStmt (cognitive 259): printer.printStmt has cognitive complexity 259 (threshold 15). Drivers by points: if/else 220, boolean chains 17, loops 12, match/switch 10 (nesting depth added 133). To reduce it, split the body into named stages: move each independent step or branch into 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_printer/js_printer.go"},"region":{"startLine":4101}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f2827fc44262dbc662b2d12539b3e240af4837a035730bad8e39a08d448aaa2"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.parseColor (cognitive 257): css_parser.parseColor has cognitive complexity 257 (threshold 15). Drivers by points: if/else 220, match/switch 33, boolean chains 4 (nesting depth added 198). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_color.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"562cc9f77d8d2c5deec575e1878a4c29021455f3012ee48d9e6285696ea05828"}},{"ruleId":"D2","level":"warning","message":{"text":"scanner.processScannedFiles (cognitive 253): scanner.processScannedFiles has cognitive complexity 253 (threshold 15). Drivers by points: if/else 210, loops 23, boolean chains 11, match/switch 9 (nesting depth added 173). To reduce it, split the body into named stages: move each independent step or branch into 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/bundler/bundler.go"},"region":{"startLine":2360}}}],"partialFingerprints":{"codehealthFindingId/v1":"5129103e269dd54ea098568c7caeb5b267042e27ecaded3da5a9c5309c3bb56b"}},{"ruleId":"D2","level":"warning","message":{"text":"js_parser.ParseSourceMap (cognitive 229): js_parser.ParseSourceMap has cognitive complexity 229 (threshold 15). Drivers by points: if/else 170, loops 29, match/switch 21, boolean chains 9 (nesting depth added 150). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/sourcemap_parser.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d11ee3a7efddf39aea194bfec9ad247c8fad5cfe5a8a08ed9dd03bd679fbbde"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.scanForImportsAndExports (cognitive 216): parser.scanForImportsAndExports has cognitive complexity 216 (threshold 15). Drivers by points: if/else 150, loops 41, boolean chains 23, match/switch 2 (nesting depth added 142). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":17281}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cdb5d178aeccfef760cb92af0ffd70ac992f4544898af501e16e61e7b477277"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.parseTSConfigFromSource (cognitive 216): resolverQuery.parseTSConfigFromSource has cognitive complexity 216 (threshold 15). Drivers by points: if/else 187, loops 14, boolean chains 13, jumps 2 (nesting depth added 144). Most of this is not in the body itself: 15 of the 216 points are its own statements and the rest belongs to one function literal inside it that branches (line 1257). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/resolver/resolver.go"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9b71d2db15b1420825063d56069c5de086e553c60de731ed8b50286a7ec3852"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.mangleTransforms (cognitive 212): parser.mangleTransforms has cognitive complexity 212 (threshold 15). Drivers by points: if/else 195, loops 7, boolean chains 6, match/switch 4 (nesting depth added 156). To reduce it, split the body into named stages: move each independent step or branch into 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/css_parser/css_decls_transform.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"559538833781a55cfd727cd9755fa2fbae658b279293e21bd1f2e48bc183f46d"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.processDeclarations (cognitive 206): parser.processDeclarations has cognitive complexity 206 (threshold 15). Drivers by points: if/else 174, loops 27, boolean chains 3, match/switch 2 (nesting depth added 135). To reduce it, split the body into named stages: move each independent step or branch into 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/css_parser/css_decls.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a1c000711b19badc9b79f1db7f0597b8b8763c362801adfaeaf44586ded561c"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperContext.SimplifyUnusedExpr (cognitive 204): HelperContext.SimplifyUnusedExpr has cognitive complexity 204 (threshold 15). Drivers by points: if/else 154, loops 28, match/switch 13, boolean chains 9 (nesting depth added 132). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea618d4643ebfdb36aa7b2d10ca3770d638c26e6a8b661399cd0273af51314a8"}},{"ruleId":"D2","level":"warning","message":{"text":"resolver.ParseTSConfigJSON (cognitive 201): resolver.ParseTSConfigJSON has cognitive complexity 201 (threshold 15). Drivers by points: if/else 166, loops 17, match/switch 16, boolean chains 1, jumps 1 (nesting depth added 135). To reduce it, split the body into named stages: move each independent step or branch into 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/resolver/tsconfig_json.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0490e6c5c2aaa2f7379cb2991e60b1ca389017a29d9e9387f6d74859a8516c0"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parsePrefix (cognitive 197): parser.parsePrefix has cognitive complexity 197 (threshold 15). Drivers by points: if/else 163, match/switch 22, boolean chains 8, loops 4 (nesting depth added 116). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":3498}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a2f85d86306f50c02a49295a64733e607c7589e2879a8e915e61865e862fedd"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.parseNumericLiteralOrDot (cognitive 189): Lexer.parseNumericLiteralOrDot has cognitive complexity 189 (threshold 15). Drivers by points: if/else 134, boolean chains 29, loops 20, match/switch 5, jumps 1 (nesting depth added 102). To reduce it, split the body into named stages: move each independent step or branch into 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_lexer/js_lexer.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af365bc94c2742796a27ec173d4ea39e9275680140377cb55544c13559b042e"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printBinding (cognitive 185): printer.printBinding has cognitive complexity 185 (threshold 15). Drivers by points: if/else 156, boolean chains 16, loops 12, match/switch 1 (nesting depth added 124). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"b19ec95457bb3e7a0153c7fa0c83d26d479062799a2e0f1d3b336ad06fdc8119"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printRule (cognitive 184): printer.printRule has cognitive complexity 184 (threshold 15). Drivers by points: if/else 154, loops 13, boolean chains 11, match/switch 6 (nesting depth added 96). To reduce it, split the body into named stages: move each independent step or branch into 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/css_printer/css_printer.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0fbf35ea0ec298e462ca12ba6829e614b253c7c15791d6c3632d2d8c93e8fde"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.finalizeImportsExportsResult (cognitive 184): resolverQuery.finalizeImportsExportsResult has cognitive complexity 184 (threshold 15). Drivers by points: if/else 136, loops 30, match/switch 11, boolean chains 7 (nesting depth added 130). To reduce it, split the body into named stages: move each independent step or branch into 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/resolver/resolver.go"},"region":{"startLine":2605}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf5c135ecd020c5099e0a4beb2f12e15e6423ceaa506801b66898cfb94cb24ed"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.computeCrossChunkDependencies (cognitive 182): linkerContext.computeCrossChunkDependencies has cognitive complexity 182 (threshold 15). Drivers by points: if/else 121, loops 50, match/switch 8, boolean chains 3 (nesting depth added 128). Of this number, 65 points are the body\u0027s own statements and 117 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/linker/linker.go"},"region":{"startLine":908}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e6130608b6d924ce5c914cb7bbafd4fff932ae8615728f8cbefea74781c1599"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.skipTypeScriptTypeWithFlags (cognitive 173): parser.skipTypeScriptTypeWithFlags has cognitive complexity 173 (threshold 15). Drivers by points: if/else 129, boolean chains 22, loops 12, match/switch 7, jumps 3 (nesting depth added 102). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/ts_parser.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3055c0b7ac31a674f7e5fc04d507b22153ee7daeae2a20c19e4e823b7095ab33"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.processProperties (cognitive 166): lowerClassContext.processProperties has cognitive complexity 166 (threshold 15). Drivers by points: if/else 130, loops 20, boolean chains 9, match/switch 7 (nesting depth added 97). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser_lower_class.go"},"region":{"startLine":1471}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f8fa58e7a1f33c4ca11b1734443819ae0cea865a7881ff4747338ac6a28dcf0"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.convertStmtsForChunk (cognitive 157): linkerContext.convertStmtsForChunk has cognitive complexity 157 (threshold 15). Drivers by points: if/else 123, loops 21, boolean chains 7, match/switch 6 (nesting depth added 107). To reduce it, split the body into named stages: move each independent step or branch into 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/linker/linker.go"},"region":{"startLine":4311}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5b51843201d0d35125d65151264853dd299ed2f0ee74791a188bc01274854f0"}},{"ruleId":"D2","level":"warning","message":{"text":"api.analyzeMetafileImpl (cognitive 157): api.analyzeMetafileImpl has cognitive complexity 157 (threshold 15). Drivers by points: if/else 106, loops 49, boolean chains 2 (nesting depth added 119). Of this number, 134 points are the body\u0027s own statements and 23 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":2265}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f136527296914d346f7c1b3e5801dcfc0a57f0bb22c1f0e53a4c11a058bb236"}},{"ruleId":"D2","level":"warning","message":{"text":"apiHandler.ServeHTTP (cognitive 156): apiHandler.ServeHTTP has cognitive complexity 156 (threshold 15). Drivers by points: if/else 124, boolean chains 14, loops 13, match/switch 5 (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4845117fca237e998171c252a3fedbc1e136f0a67b06e0088db7e1d2b135a3d"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.visitClass (cognitive 151): parser.visitClass has cognitive complexity 151 (threshold 15). Drivers by points: if/else 122, boolean chains 13, match/switch 9, loops 7 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":12132}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dad1fb22acc143425dd3c826ee4bf5010a35f9a7f2b93d3354ed675c986b4e6"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateChunkJS (cognitive 142): linkerContext.generateChunkJS has cognitive complexity 142 (threshold 15). Drivers by points: if/else 104, loops 33, boolean chains 5 (nesting depth added 69). Of this number, 132 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":"internal/linker/linker.go"},"region":{"startLine":5563}}}],"partialFingerprints":{"codehealthFindingId/v1":"805b88c0f1548aa0044a0de6053dd3f59df4aa5317eb7892f89095ae23f81ef1"}},{"ruleId":"D2","level":"warning","message":{"text":"serviceType.handleIncomingPacket (cognitive 139): serviceType.handleIncomingPacket has cognitive complexity 139 (threshold 15). Drivers by points: if/else 127, loops 10, boolean chains 1, match/switch 1 (nesting depth added 94). Of this number, 55 points are the body\u0027s own statements and 84 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"44ce62edc901763d1ee89fefe339ad95b4f62cb57214a8bd1986a6895a76f2e9"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.findImportedFilesInCSSOrder (cognitive 137): linkerContext.findImportedFilesInCSSOrder has cognitive complexity 137 (threshold 15). Drivers by points: if/else 93, loops 28, boolean chains 11, jumps 3, match/switch 2 (nesting depth added 77). Of this number, 112 points are the body\u0027s own statements and 25 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":3406}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe63ea24ee2ea0884e36ddfe40b5ea626f633d37e1b858dde6857cc0d1141d3"}},{"ruleId":"D2","level":"warning","message":{"text":"scanner.addEntryPoints (cognitive 136): scanner.addEntryPoints has cognitive complexity 136 (threshold 15). Drivers by points: if/else 108, loops 18, boolean chains 10 (nesting depth added 74). Of this number, 95 points are the body\u0027s own statements and 41 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/bundler/bundler.go"},"region":{"startLine":1841}}}],"partialFingerprints":{"codehealthFindingId/v1":"994d4dcf1dc632daa5a5536629532564a5395b80aa6972c91ea64cb14ce0d48d"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateChunkCSS (cognitive 136): linkerContext.generateChunkCSS has cognitive complexity 136 (threshold 15). Drivers by points: if/else 95, loops 29, boolean chains 6, match/switch 6 (nesting depth added 75). Of this number, 119 points are the body\u0027s own statements and 17 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/linker/linker.go"},"region":{"startLine":6093}}}],"partialFingerprints":{"codehealthFindingId/v1":"754ce9a4509e6a0906c4a2936776a1c44309bfd6b36be8388a22c03e2f922d04"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.tryToDecodeEscapeSequences (cognitive 134): Lexer.tryToDecodeEscapeSequences has cognitive complexity 134 (threshold 15). Drivers by points: if/else 78, match/switch 36, loops 15, boolean chains 4, jumps 1 (nesting depth added 98). To reduce it, split the body into named stages: move each independent step or branch into 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_lexer/js_lexer.go"},"region":{"startLine":2192}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd988fca7954c58a55814a2595e1d2295c91b02f59824212d463dea0a83f2f7"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printProperty (cognitive 133): printer.printProperty has cognitive complexity 133 (threshold 15). Drivers by points: if/else 107, boolean chains 14, match/switch 12 (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into 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_printer/js_printer.go"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"5324211581e02762cb8eccc55102bedeefc9eb9c41414d256f33b88c8d6e978a"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.renameSymbolsInChunk (cognitive 132): linkerContext.renameSymbolsInChunk has cognitive complexity 132 (threshold 15). Drivers by points: if/else 70, loops 55, match/switch 6, boolean chains 1 (nesting depth added 93). Of this number, 115 points are the body\u0027s own statements and 17 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5315}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fdc69aa7e22f6b70636caaf5be76419dad679ae7b431cb0cc6dacfe4f5c1ca9"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.convertTokensHelper (cognitive 131): parser.convertTokensHelper has cognitive complexity 131 (threshold 15). Drivers by points: if/else 106, boolean chains 10, loops 9, match/switch 5, jumps 1 (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":1814}}}],"partialFingerprints":{"codehealthFindingId/v1":"63e6a485bd47e7e2258606aedaeb9f5098ba278b2aa0e166d18959974d38af05"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.substituteSingleUseSymbolInExpr (cognitive 121): parser.substituteSingleUseSymbolInExpr has cognitive complexity 121 (threshold 15). Drivers by points: if/else 100, boolean chains 9, loops 9, match/switch 3 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":9692}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5ac8a4265a0f30d5030817ac3c4111ef5321953ff6a0ed2be4cf775981eed2"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.maybeRewritePropertyAccess (cognitive 120): parser.maybeRewritePropertyAccess has cognitive complexity 120 (threshold 15). Drivers by points: if/else 101, boolean chains 10, match/switch 6, loops 3 (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":12894}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a1fb353f249a5578ab563d2c9638a0c9419c4231c06e1693467a3fa34a562cd"}},{"ruleId":"D2","level":"warning","message":{"text":"serviceType.convertPlugins (cognitive 117): serviceType.convertPlugins has cognitive complexity 117 (threshold 15). Drivers by points: if/else 99, loops 18 (nesting depth added 56). Most of this is not in the body itself: 9 of the 117 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 903, 860). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":848}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9351cdc7f08d22f448ff0e1b0622412b24fc584fff97530c4d1856242061ea"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateCodeForFileInChunkJS (cognitive 117): linkerContext.generateCodeForFileInChunkJS has cognitive complexity 117 (threshold 15). Drivers by points: if/else 90, loops 15, boolean chains 6, match/switch 6 (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into 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/linker/linker.go"},"region":{"startLine":4657}}}],"partialFingerprints":{"codehealthFindingId/v1":"a55aad476f80efd01babc2f0b2ad4a64df83d82d28cb36580141b21d1866213f"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.esmPackageTargetResolve (cognitive 107): resolverQuery.esmPackageTargetResolve has cognitive complexity 107 (threshold 15). Drivers by points: if/else 89, loops 10, boolean chains 7, match/switch 1 (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":"internal/resolver/package_json.go"},"region":{"startLine":1096}}}],"partialFingerprints":{"codehealthFindingId/v1":"639a9842b1f12fe5739bb3bf372001fe33583d33e8a6a1904c7845f81e64946a"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.finalizeResolve (cognitive 106): resolverQuery.finalizeResolve has cognitive complexity 106 (threshold 15). Drivers by points: if/else 97, loops 8, boolean chains 1 (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into 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/resolver/resolver.go"},"region":{"startLine":831}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b99e0c39ffbfaf6c08e76efefade3847258f2e132c08eb72ed5996d08f6e05"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseJSXElement (cognitive 104): parser.parseJSXElement has cognitive complexity 104 (threshold 15). Drivers by points: if/else 88, loops 6, match/switch 5, boolean chains 4, jumps 1 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5219}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcffb3f3f856a2b1b0db99c222cf6b1e6b70f4a40b69c7f6512a6a0ceb66f531"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.tryToParseColorStops (cognitive 102): css_parser.tryToParseColorStops has cognitive complexity 102 (threshold 15). Drivers by points: if/else 80, loops 20, boolean chains 2 (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cc5d07d9518463870497215642a7f78104da902077929fe909e792d79c500f6"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.computeClassLoweringInfo (cognitive 102): parser.computeClassLoweringInfo has cognitive complexity 102 (threshold 15). Drivers by points: if/else 83, loops 13, boolean chains 6 (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":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"239e49e8bfeb89a9756c47c1ca7046bdd17f06c7f6beada0543eceb7ece084af"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.parsePackageJSON (cognitive 102): resolverQuery.parsePackageJSON has cognitive complexity 102 (threshold 15). Drivers by points: if/else 83, loops 8, boolean chains 6, match/switch 5 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"3023c4f8cd3af720d8465891efd4cff845505094554cb0b05e99d9d200d8ac0e"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerOptionalChain (cognitive 100): parser.lowerOptionalChain has cognitive complexity 100 (threshold 15). Drivers by points: if/else 79, match/switch 9, boolean chains 7, jumps 3, loops 2 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbf01329333e69ec8d479338c36b81050f98aced631d0d1c11a3e2836a85f42"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.runImpl (cognitive 99): cli.runImpl has cognitive complexity 99 (threshold 15). Drivers by points: if/else 93, boolean chains 4, loops 1, match/switch 1 (nesting depth added 55). Of this number, 65 points are the body\u0027s own statements and 34 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":1184}}}],"partialFingerprints":{"codehealthFindingId/v1":"879fcee70e58731d3326b089835824674c252d8800d1929dc9e5d285721193d7"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperContext.MangleIfExpr (cognitive 98): HelperContext.MangleIfExpr has cognitive complexity 98 (threshold 15). Drivers by points: if/else 72, boolean chains 20, loops 4, match/switch 2 (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":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2788}}}],"partialFingerprints":{"codehealthFindingId/v1":"e881ca9c97afadcb77914882245798463b2534b9e1c2db873b640233a88e4612"}},{"ruleId":"D2","level":"warning","message":{"text":"js_parser.Parse (cognitive 97): js_parser.Parse has cognitive complexity 97 (threshold 15). Drivers by points: if/else 66, loops 21, match/switch 5, boolean chains 4, jumps 1 (nesting depth added 53). Of this number, 95 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":17772}}}],"partialFingerprints":{"codehealthFindingId/v1":"157c27cc306b7dfe235b62f6204d30c490a9e75de470c028e682dd73365e33d8"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.loadNodeModules (cognitive 96): resolverQuery.loadNodeModules has cognitive complexity 96 (threshold 15). Drivers by points: if/else 83, boolean chains 7, loops 3, match/switch 3 (nesting depth added 50). Of this number, 76 points are the body\u0027s own statements and 20 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2358}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a77971ce1e226c10af0df917aef0cacfe46b97c7cd47d499fe02b9e42df684b"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerAndMinifyColor (cognitive 95): parser.lowerAndMinifyColor has cognitive complexity 95 (threshold 15). Drivers by points: if/else 78, match/switch 10, boolean chains 7 (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into 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/css_parser/css_decls_color.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aeac59f15b6bb6fa1c569aa4c126641c4f68a0544c42b35754f235c17bd3521"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperContext.StmtsCanBeRemovedIfUnused (cognitive 95): HelperContext.StmtsCanBeRemovedIfUnused has cognitive complexity 95 (threshold 15). Drivers by points: if/else 63, match/switch 16, loops 10, boolean chains 6 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2200}}}],"partialFingerprints":{"codehealthFindingId/v1":"c00face0c1e68954ff530a0514fdf0d526ffd910041609e41d163cca0843a9f1"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.hoistSymbols (cognitive 95): parser.hoistSymbols has cognitive complexity 95 (threshold 15). Drivers by points: if/else 72, boolean chains 11, loops 10, jumps 2 (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":"internal/js_parser/js_parser.go"},"region":{"startLine":1540}}}],"partialFingerprints":{"codehealthFindingId/v1":"7561aa0fb1ee83a76b6e4c04e0cfb3b02f33dbb704d2c92fc3bc01cfe547eaeb"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.minifySwitchStmt (cognitive 94): parser.minifySwitchStmt has cognitive complexity 94 (threshold 15). Drivers by points: if/else 75, loops 12, boolean chains 7 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":11569}}}],"partialFingerprints":{"codehealthFindingId/v1":"351baa0f83f5a9e5854a7fb0e961be3164557df6259de822062e89f26fd1a4f8"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.tryToParseCalcTerm (cognitive 92): css_parser.tryToParseCalcTerm has cognitive complexity 92 (threshold 15). Drivers by points: if/else 58, boolean chains 19, loops 15 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_reduce_calc.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"719632c4b72f876a8e05465cd1bfbf8276d9960874b974b777ce8bc705c5e30a"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printUnquotedUTF16 (cognitive 86): printer.printUnquotedUTF16 has cognitive complexity 86 (threshold 15). Drivers by points: if/else 65, boolean chains 11, loops 5, match/switch 5 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf540153a49292e3284fd433ba0ee830de2bbc77640a2e89ef016b5aad848fe"}},{"ruleId":"D2","level":"warning","message":{"text":"Resolver.Resolve (cognitive 86): Resolver.Resolve has cognitive complexity 86 (threshold 15). Drivers by points: if/else 76, boolean chains 6, loops 4 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b1a699eef4dfb9cdc418b6043d10910b79fb7e9607d906fec34127bb760a918"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperContext.ExprCanBeRemovedIfUnused (cognitive 85): HelperContext.ExprCanBeRemovedIfUnused has cognitive complexity 85 (threshold 15). Drivers by points: if/else 47, boolean chains 17, loops 13, match/switch 8 (nesting depth added 43). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2432}}}],"partialFingerprints":{"codehealthFindingId/v1":"018c266a8b35d2c7a80d4bdab770649db977c6880ad008550572a1ba876feecd"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.maybeMarkKnownGlobalConstructorAsPure (cognitive 84): parser.maybeMarkKnownGlobalConstructorAsPure has cognitive complexity 84 (threshold 15). Drivers by points: if/else 55, match/switch 23, loops 6 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into 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_parser/js_parser.go"},"region":{"startLine":16878}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c0cc473c200bd3d7f7a416704806c8329ebae1bd7686201cadb50bbc74f67ae"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.mangleIf (cognitive 82): parser.mangleIf has cognitive complexity 82 (threshold 15). Drivers by points: if/else 76, boolean chains 6 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":10203}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4ede48382189daf2d4045e45cadff3d2bfef8021235edd3693c4ea8f81dc33"}},{"ruleId":"D2","level":"warning","message":{"text":"internalContext.Serve (cognitive 82): internalContext.Serve has cognitive complexity 82 (threshold 15). Drivers by points: if/else 67, boolean chains 8, loops 7 (nesting depth added 28). Of this number, 74 points are the body\u0027s own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":730}}}],"partialFingerprints":{"codehealthFindingId/v1":"a128be9a6446d9f555bdb812711a5066b17bb508fc3faee0f95d693c08f06572"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateEntryPointTailJS (cognitive 81): linkerContext.generateEntryPointTailJS has cognitive complexity 81 (threshold 15). Drivers by points: if/else 69, loops 10, boolean chains 1, match/switch 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":4992}}}],"partialFingerprints":{"codehealthFindingId/v1":"271e3cb544cc991717470f810789e5a7746240c767fbb1007e8ef826f32690a9"}},{"ruleId":"D2","level":"warning","message":{"text":"api.rebuildImpl (cognitive 78): api.rebuildImpl has cognitive complexity 78 (threshold 15). Drivers by points: if/else 58, loops 18, boolean chains 2 (nesting depth added 42). Of this number, 52 points are the body\u0027s own statements and 26 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1467}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd14e8228c7817a7865dcea12df40236eb1599ef4643a9f7cd9e8db2f97eaec"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parsePseudoClassSelector (cognitive 76): parser.parsePseudoClassSelector has cognitive complexity 76 (threshold 15). Drivers by points: if/else 66, match/switch 6, boolean chains 4 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d492d9d4b6ba68529d377622b6d3d7b29d1273582d00f1cc82c0534bb8fe006"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 74): main.main has cognitive complexity 74 (threshold 15). Drivers by points: if/else 57, loops 9, boolean chains 6, match/switch 2 (nesting depth added 35). Of this number, 16 points are the body\u0027s own statements and 58 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/main.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"126569a609b6a085949a093d0fac5ad5fb6e3ea095041b428ac4a6858f610f40"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printRequireOrImportExpr (cognitive 74): printer.printRequireOrImportExpr has cognitive complexity 74 (threshold 15). Drivers by points: if/else 64, boolean chains 7, match/switch 3 (nesting depth added 34). Of this number, 70 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":"internal/js_printer/js_printer.go"},"region":{"startLine":1399}}}],"partialFingerprints":{"codehealthFindingId/v1":"17b5be2d9842b74788fdb7b64facf0a8d959c9824443978734c7bd15cccb866c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.handleGlobPattern (cognitive 73): parser.handleGlobPattern has cognitive complexity 73 (threshold 15). Drivers by points: if/else 54, loops 12, boolean chains 5, jumps 2 (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":"internal/js_parser/js_parser.go"},"region":{"startLine":16569}}}],"partialFingerprints":{"codehealthFindingId/v1":"8812005fe7674702a28257d2e15ac28048b24143d6d9386d3e73907005405be7"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.computeChunks (cognitive 73): linkerContext.computeChunks has cognitive complexity 73 (threshold 15). Drivers by points: if/else 52, loops 16, match/switch 4, boolean chains 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":3870}}}],"partialFingerprints":{"codehealthFindingId/v1":"910e6e2a8b27e9ed6d0c9049cf74abee966589a96b7946fc06d562696f16b862"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.isUnsupportedRegularExpression (cognitive 72): parser.isUnsupportedRegularExpression has cognitive complexity 72 (threshold 15). Drivers by points: if/else 50, match/switch 9, loops 6, jumps 4, boolean chains 3 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":13367}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e54004680c2b96635cdae328f03152d4838a1eefaa2fa55ced4484a35af3268"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseListOfRules (cognitive 71): parser.parseListOfRules has cognitive complexity 71 (threshold 15). Drivers by points: if/else 56, match/switch 6, boolean chains 4, loops 3, jumps 2 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfaad9c8bae424bad5797a52ee5b454ef9fbc5fc0bdb7e3bfa145997749dfd18"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.visitStmts (cognitive 71): parser.visitStmts has cognitive complexity 71 (threshold 15). Drivers by points: if/else 57, loops 9, boolean chains 3, match/switch 2 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":8917}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7c68e22375f9884187ab393685a30bae2d6cba896b4e903276bf48318eb251c"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.maybeAppendLegalComments (cognitive 71): linkerContext.maybeAppendLegalComments has cognitive complexity 71 (threshold 15). Drivers by points: if/else 34, loops 34, match/switch 2, boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":6544}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c69f7c5d72fc58d5b9ba2bcc4ff3e0486a56a3b30a4aa646d3eec8c912db4e"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.dirInfoUncached (cognitive 71): resolverQuery.dirInfoUncached has cognitive complexity 71 (threshold 15). Drivers by points: if/else 61, boolean chains 10 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":1533}}}],"partialFingerprints":{"codehealthFindingId/v1":"86f5c85628b7c4439897fe223bbb5deb96c6775c3d43645720b75c40e2c54261"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.mangleRules (cognitive 70): parser.mangleRules has cognitive complexity 70 (threshold 15). Drivers by points: if/else 44, loops 17, boolean chains 5, jumps 2, match/switch 2 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf1f597cc52605dc29815cfe34265e4627cb808f705fe867f95124b93874d112"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printTokens (cognitive 70): printer.printTokens has cognitive complexity 70 (threshold 15). Drivers by points: if/else 51, boolean chains 11, match/switch 5, loops 3 (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":"internal/css_printer/css_printer.go"},"region":{"startLine":1162}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b89a611b02f3051d1482810985570093a9c9e865a06566b7792539297ce7d1e"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.NextInsideJSXElement (cognitive 70): Lexer.NextInsideJSXElement has cognitive complexity 70 (threshold 15). Drivers by points: if/else 26, loops 20, match/switch 19, jumps 4, boolean chains 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"483964c9227e3afe566e3bc87fbd329b186b2d23db983167af37c546cd4f0c81"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.insertStmtsAfterSuperCall (cognitive 70): parser.insertStmtsAfterSuperCall has cognitive complexity 70 (threshold 15). Drivers by points: if/else 60, boolean chains 5, match/switch 3, loops 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":2451}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4ccc30f8536a22b44c0d62fed337562155891cf1ceaf379bcded2db84ecd97e"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printCompoundSelector (cognitive 69): printer.printCompoundSelector has cognitive complexity 69 (threshold 15). Drivers by points: if/else 53, boolean chains 7, loops 7, match/switch 2 (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":"internal/css_printer/css_printer.go"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"c330bf8ac94e8f579b639b11e6703ae0318b1bab535de1361d66a3408d3ecb56"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.FoldBinaryOperator (cognitive 69): js_ast.FoldBinaryOperator has cognitive complexity 69 (threshold 15). Drivers by points: if/else 68, match/switch 1 (nesting depth added 34). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1235}}}],"partialFingerprints":{"codehealthFindingId/v1":"36d0fbb75ba51fed4b3bd5f6e66ec98c6de8ec46664d35c69411a1a5ac4eb7ba"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.handleIdentifier (cognitive 68): parser.handleIdentifier has cognitive complexity 68 (threshold 15). Drivers by points: if/else 46, boolean chains 14, match/switch 8 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":17007}}}],"partialFingerprints":{"codehealthFindingId/v1":"196120804a0fee44a2e5ea6f29c8f01abe1387fa2df158824ad331c90d46f260"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.finishAndGenerateCode (cognitive 68): lowerClassContext.finishAndGenerateCode has cognitive complexity 68 (threshold 15). Drivers by points: if/else 53, boolean chains 9, loops 4, match/switch 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":2054}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a9be5c727bb6b5e615b7b9ecb91ce0265856c82e63feaddd0a637307efdf99"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.resolveWithoutSymlinks (cognitive 68): resolverQuery.resolveWithoutSymlinks has cognitive complexity 68 (threshold 15). Drivers by points: if/else 64, boolean chains 4 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":954}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a8fdf3f65148e32b8e027a7e1af7b14bbdf469dc8753f7df5be7efa8eaf26cc"}},{"ruleId":"D2","level":"warning","message":{"text":"lexer.next (cognitive 67): lexer.next has cognitive complexity 67 (threshold 15). Drivers by points: if/else 48, loops 9, boolean chains 5, match/switch 5 (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":"internal/css_lexer/css_lexer.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd48198eda1594addb470cbe464aeead87f13d58ea5114e5203e46c03d58cb6c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseCompoundSelector (cognitive 67): parser.parseCompoundSelector has cognitive complexity 67 (threshold 15). Drivers by points: if/else 44, match/switch 11, loops 5, boolean chains 4, jumps 3 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"82178db0d24101c950281912c2ead5408cacee2e57a074dd5a83174a56ac36ae"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseFn (cognitive 67): parser.parseFn has cognitive complexity 67 (threshold 15). Drivers by points: if/else 54, boolean chains 8, loops 5 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6120}}}],"partialFingerprints":{"codehealthFindingId/v1":"3145ba97b0198786a2e40c5d1236f304cd7e08fb6409524d617753f1bce4d46e"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.toAST (cognitive 67): parser.toAST has cognitive complexity 67 (threshold 15). Drivers by points: if/else 33, loops 19, boolean chains 13, match/switch 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":18563}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c4add92d9727cd8c0df908eaf3eac4d149079e6df210e413be5177de5f0f287"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateSourceMapForChunk (cognitive 67): linkerContext.generateSourceMapForChunk has cognitive complexity 67 (threshold 15). Drivers by points: if/else 56, loops 10, boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":6996}}}],"partialFingerprints":{"codehealthFindingId/v1":"a81175003979648129a1bb121cb0967b7cb2a4b083df55aa8e73c4801ec29cd7"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.runOnLoadPlugins (cognitive 66): bundler.runOnLoadPlugins has cognitive complexity 66 (threshold 15). Drivers by points: if/else 49, loops 9, match/switch 5, boolean chains 3 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4081637743b458a482d2d2a1de1e9bb7ae6fde0f4a674efa8fe33281f87d9d"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperContext.isSideEffectFreeUnboundIdentifierRef (cognitive 66): HelperContext.isSideEffectFreeUnboundIdentifierRef has cognitive complexity 66 (threshold 15). Drivers by points: if/else 55, boolean chains 8, match/switch 3 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2637}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e25ad4a90f830f036c5246002b5925b0f10ba70efb30fb4ae9d01ce2cfee70d"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.matchImportWithExport (cognitive 66): linkerContext.matchImportWithExport has cognitive complexity 66 (threshold 15). Drivers by points: if/else 51, loops 10, boolean chains 2, match/switch 2, jumps 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":2628}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d0a9662391b59466ba22ba096a6c2b4990bf5cd91c54caf1795e4db0d944c41"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.loadAsMainField (cognitive 66): resolverQuery.loadAsMainField has cognitive complexity 66 (threshold 15). Drivers by points: if/else 61, loops 3, boolean chains 2 (nesting depth added 35). Of this number, 58 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":1972}}}],"partialFingerprints":{"codehealthFindingId/v1":"552200ce0641dc0dc83204a64e846cae423f09d6851b2ba2afe38576e71f9f8b"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerFunction (cognitive 65): parser.lowerFunction has cognitive complexity 65 (threshold 15). Drivers by points: if/else 42, boolean chains 12, loops 11 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"cacc5d1bf8b3ed560f9cd7f7a9697b8d965dd975a655fd00ddb4c265bc3d2aa5"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateCodeForLazyExport (cognitive 65): linkerContext.generateCodeForLazyExport has cognitive complexity 65 (threshold 15). Drivers by points: if/else 47, loops 15, boolean chains 3 (nesting depth added 44). Of this number, 26 points are the body\u0027s own statements and 39 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/linker/linker.go"},"region":{"startLine":2105}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8486e846cfe5fcb1ea22439fcb6ee2d07483786260df581763195c1f1bfebf"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.PrintSummary (cognitive 65): logger.PrintSummary has cognitive complexity 65 (threshold 15). Drivers by points: if/else 59, loops 4, boolean chains 2 (nesting depth added 39). Most of this is not in the body itself: 0 of the 65 points are its own statements and the rest belongs to one function literal inside it that branches (line 999). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/logger/logger.go"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"aedfb1e2923cc9f8e68f974665f53a9533f087e6eb3547f8003d3fe1ff3f2134"}},{"ruleId":"D2","level":"warning","message":{"text":"Resolver.ResolveGlob (cognitive 64): Resolver.ResolveGlob has cognitive complexity 64 (threshold 15). Drivers by points: if/else 52, boolean chains 5, match/switch 4, loops 3 (nesting depth added 29). Of this number, 36 points are the body\u0027s own statements and 28 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"648e7afd4d9aadafd43afa2973d21db75762c45da9de16b61d670fa5e5678802"}},{"ruleId":"D2","level":"warning","message":{"text":"scanner.validateTLA (cognitive 63): scanner.validateTLA has cognitive complexity 63 (threshold 15). Drivers by points: if/else 49, loops 9, boolean chains 5 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":2827}}}],"partialFingerprints":{"codehealthFindingId/v1":"6060f3b6bc6765dfa5c98a8cf72dd5103068013cb433164b65a7fbc0678d906b"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseListOfDeclarations (cognitive 63): parser.parseListOfDeclarations has cognitive complexity 63 (threshold 15). Drivers by points: if/else 50, loops 7, boolean chains 4, match/switch 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"758e4a66ed8e625dd30c6c028725f628f53bea99350db1328cc3939ff0933a94"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseBinding (cognitive 63): parser.parseBinding has cognitive complexity 63 (threshold 15). Drivers by points: if/else 52, boolean chains 6, loops 4, match/switch 1 (nesting depth added 36). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5967}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cc98ded1d4c368ff2ff4ab591990d4e88d382789890b3ee9c2b1af4bf2ae40e"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerNestingInRuleWithContext (cognitive 62): parser.lowerNestingInRuleWithContext has cognitive complexity 62 (threshold 15). Drivers by points: if/else 33, loops 25, boolean chains 3, match/switch 1 (nesting depth added 38). Of this number, 58 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_nesting.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e61bd9efd288f874a1c15460bf972d472231416cc392cf2ed749a064c1dde34"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseParenExpr (cognitive 61): parser.parseParenExpr has cognitive complexity 61 (threshold 15). Drivers by points: if/else 45, loops 10, boolean chains 6 (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/js_parser/js_parser.go"},"region":{"startLine":3152}}}],"partialFingerprints":{"codehealthFindingId/v1":"058ccb238386ed9a21f9e96a9795b9ada24bc3c397eb3abe0bc4289a8ac319c7"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseAndDeclareDecls (cognitive 61): parser.parseAndDeclareDecls has cognitive complexity 61 (threshold 15). Drivers by points: if/else 49, boolean chains 7, match/switch 4, loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5569}}}],"partialFingerprints":{"codehealthFindingId/v1":"65991c21abdcb3639aae42f6002383c3b2962d9ea468762a5520286a0e4fb4b1"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.checkBrowserMap (cognitive 61): resolverQuery.checkBrowserMap has cognitive complexity 61 (threshold 15). Drivers by points: if/else 48, loops 7, boolean chains 4, match/switch 2 (nesting depth added 26). Of this number, 36 points are the body\u0027s own statements and 25 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"709f297cd47f9897998bfe14d11a6208899102c49b35ba73af6168c5ac8d4c26"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.lowerField (cognitive 59): lowerClassContext.lowerField has cognitive complexity 59 (threshold 15). Drivers by points: if/else 54, boolean chains 5 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a69892b8f0704b7345b54931bfc045cd940e76ff1f48bea7f1417841bdb637"}},{"ruleId":"D2","level":"warning","message":{"text":"realFS.WatchData (cognitive 58): realFS.WatchData has cognitive complexity 58 (threshold 15). Drivers by points: if/else 40, loops 13, boolean chains 3, match/switch 2 (nesting depth added 36). Most of this is not in the body itself: 10 of the 58 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 481, 515, 523, \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/fs/fs_real.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d719ddf0fefe77432e860add0fd643e964bd7bb5e35d7061262ef3ca99abba3"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseSelectorRule (cognitive 57): parser.parseSelectorRule has cognitive complexity 57 (threshold 15). Drivers by points: if/else 43, loops 12, boolean chains 2 (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":"internal/css_parser/css_parser.go"},"region":{"startLine":2151}}}],"partialFingerprints":{"codehealthFindingId/v1":"476f257c9fa6b7b731076c3e138f7225209ca9b7a3ba6952933e210f7fe4e967"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerAndMinifyGradient (cognitive 56): parser.lowerAndMinifyGradient has cognitive complexity 56 (threshold 15). Drivers by points: if/else 40, boolean chains 8, loops 8 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c03b42cec7fee35cc7411026f79a8f9feeaf74a2dc5bcc93c6a6c354dde8aa7"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printMediaQuery (cognitive 56): printer.printMediaQuery has cognitive complexity 56 (threshold 15). Drivers by points: if/else 46, match/switch 7, loops 2, 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/css_printer/css_printer.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3286afb880a3735a9329962917e3edf5c326a3502a4670a23a198b88cf8b3c"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printNonNegativeFloat (cognitive 56): printer.printNonNegativeFloat has cognitive complexity 56 (threshold 15). Drivers by points: if/else 37, loops 12, boolean chains 5, match/switch 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":3564}}}],"partialFingerprints":{"codehealthFindingId/v1":"29944152fa555c0844415431c17e524392cfc313d806f62ccec2f3fd5eba5b55"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.matchTSConfigPaths (cognitive 56): resolverQuery.matchTSConfigPaths has cognitive complexity 56 (threshold 15). Drivers by points: if/else 46, loops 7, boolean chains 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2134}}}],"partialFingerprints":{"codehealthFindingId/v1":"b727cbbafb6276211b937f5ebd3889666ab199ca4f690dfd00d5dd4e2311c00e"}},{"ruleId":"D2","level":"warning","message":{"text":"scanner.scanAllDependencies (cognitive 55): scanner.scanAllDependencies has cognitive complexity 55 (threshold 15). Drivers by points: if/else 49, loops 4, boolean chains 2 (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":"internal/bundler/bundler.go"},"region":{"startLine":2175}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc64abbcb603815e98d9f2d64a6188911f473c2da5c4d48cd56ee80847320c3c"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.CheckEqualityIfNoSideEffects (cognitive 54): js_ast.CheckEqualityIfNoSideEffects has cognitive complexity 54 (threshold 15). Drivers by points: if/else 37, match/switch 13, boolean chains 4 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"01261615ef9f47ba97ff768734d151787ce69e5c618d2dba4aee7d45d7e88872"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseTypeScriptNamespaceStmt (cognitive 54): parser.parseTypeScriptNamespaceStmt has cognitive complexity 54 (threshold 15). Drivers by points: if/else 46, boolean chains 4, loops 2, match/switch 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":1623}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebacf0534b6c8a3ec8503bfdb6a8092f883c1595f006d7c65b87044cad7817d"}},{"ruleId":"D2","level":"warning","message":{"text":"graph.CloneLinkerGraph (cognitive 53): graph.CloneLinkerGraph has cognitive complexity 53 (threshold 15). Drivers by points: loops 28, if/else 20, boolean chains 3, match/switch 2 (nesting depth added 30). Of this number, 25 points are the body\u0027s own statements and 28 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/graph/graph.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"510034ab444f63934cb95fcebb6b6c9c70a0b1243182bcea537887bf4bcc97e4"}},{"ruleId":"D2","level":"warning","message":{"text":"jsonParser.parseExpr (cognitive 53): jsonParser.parseExpr has cognitive complexity 53 (threshold 15). Drivers by points: if/else 47, loops 4, boolean chains 1, match/switch 1 (nesting depth added 34). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/json_parser.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"35d30edab2c7f5c8fd683bb27e4ac3d669df3cdce29dece889e2b1dc15bac318"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseStmtsUpTo (cognitive 52): parser.parseStmtsUpTo has cognitive complexity 52 (threshold 15). Drivers by points: if/else 45, loops 4, boolean chains 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":8464}}}],"partialFingerprints":{"codehealthFindingId/v1":"a392342556dd26f7f0f43c08fc76e690b158491145f528730b556738f674fb69"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.hoistComputedProperties (cognitive 52): lowerClassContext.hoistComputedProperties has cognitive complexity 52 (threshold 15). Drivers by points: if/else 43, loops 4, boolean chains 3, match/switch 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"40f8a690f28af7940a12e87bbb72bf4ddd297744b20edff41f4459abe2184987"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateExtraDataForFileJS (cognitive 52): linkerContext.generateExtraDataForFileJS has cognitive complexity 52 (threshold 15). Drivers by points: if/else 43, loops 9 (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/linker/debug.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"428e1f4181dfea0c47e777743323063aeef24a17846d705a699c6ab6cb8fe161"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperContext.SimplifyBooleanExpr (cognitive 51): HelperContext.SimplifyBooleanExpr has cognitive complexity 51 (threshold 15). Drivers by points: if/else 37, boolean chains 11, match/switch 3 (nesting depth added 22). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2096}}}],"partialFingerprints":{"codehealthFindingId/v1":"44ad32904aaa8c103aaa122769c1cab3d73b06a7232b247f3dac040469ae8da1"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.scanCommentText (cognitive 51): Lexer.scanCommentText has cognitive complexity 51 (threshold 15). Drivers by points: if/else 44, boolean chains 4, match/switch 2, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":2584}}}],"partialFingerprints":{"codehealthFindingId/v1":"37b2eb175a68ca1112073afa11fd664630677e0d60a82fb3f47a0239a8f38e69"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.lowerMethod (cognitive 51): lowerClassContext.lowerMethod has cognitive complexity 51 (threshold 15). Drivers by points: if/else 44, loops 4, boolean chains 3 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"104ba6a04ae17c134b823855a4b95489f1b5128c15c61f7f2d22c1565ff69408"}},{"ruleId":"D2","level":"warning","message":{"text":"api.validateBuildOptions (cognitive 51): api.validateBuildOptions has cognitive complexity 51 (threshold 15). Drivers by points: if/else 34, boolean chains 10, loops 5, 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":"pkg/api/api_impl.go"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fea57c3024284a5c4f338f1a6f18b71b63daa83d67481ea32cacaf8c088490d"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseExprOrLetOrUsingStmt (cognitive 50): parser.parseExprOrLetOrUsingStmt has cognitive complexity 50 (threshold 15). Drivers by points: if/else 41, boolean chains 7, match/switch 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":4987}}}],"partialFingerprints":{"codehealthFindingId/v1":"262bc875915206dec839b685f058e1d14dcdb04f2476323d08a771884c6012ac"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.skipTypeScriptTypeParameters (cognitive 50): parser.skipTypeScriptTypeParameters has cognitive complexity 50 (threshold 15). Drivers by points: if/else 39, boolean chains 8, loops 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"437259f4651d15e1652a1b5961f73f6b037aa0562dbf52be6cae4494c797c94c"}},{"ruleId":"D2","level":"warning","message":{"text":"resolver.parseImportsExportsMap (cognitive 50): resolver.parseImportsExportsMap has cognitive complexity 50 (threshold 15). Drivers by points: if/else 34, loops 7, match/switch 5, boolean chains 4 (nesting depth added 28). Most of this is not in the body itself: 1 of the 50 points is its own statement and the rest belongs to one function literal inside it that branches (line 644). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/resolver/package_json.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"d650ad3e63363a2f727e2049a4b95a56f0a5ed206c978e628ab9b4723059787b"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseNthIndex (cognitive 49): parser.parseNthIndex has cognitive complexity 49 (threshold 15). Drivers by points: if/else 46, boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e849f85b7a11103918325cb1880fcc61dba413c3a63fdfe978fbf6bf3d69684"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.RunOnResolvePlugins (cognitive 48): bundler.RunOnResolvePlugins has cognitive complexity 48 (threshold 15). Drivers by points: if/else 36, loops 9, 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":"internal/bundler/bundler.go"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"e13fe37d291ddf43dd5703bfc77a167becf4e9a26608c8db74ab8af6158ada58"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.flattenLocalAndGlobalSelectors (cognitive 48): parser.flattenLocalAndGlobalSelectors has cognitive complexity 48 (threshold 15). Drivers by points: if/else 36, loops 5, match/switch 4, boolean chains 3 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d806a527d9f9d86dfcf17fc11b9b7499a779a110740930079f33a61a7b54f9"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseClass (cognitive 47): parser.parseClass has cognitive complexity 47 (threshold 15). Drivers by points: if/else 32, boolean chains 12, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6457}}}],"partialFingerprints":{"codehealthFindingId/v1":"775c030cd19bd140388d3696734168b16650be8195281c3ad9c6ea55950f14d2"}},{"ruleId":"D2","level":"warning","message":{"text":"apiHandler.broadcastBuildResult (cognitive 47): apiHandler.broadcastBuildResult has cognitive complexity 47 (threshold 15). Drivers by points: if/else 33, loops 12, boolean chains 2 (nesting depth added 26). Of this number, 43 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c886a2bf0ac2bd7bb18d3f8c82444363d89376a0aaf42a109a614eaa8788d5c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseSelectorList (cognitive 46): parser.parseSelectorList has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28, loops 11, boolean chains 4, match/switch 2, jumps 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":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"5081a6e292126d3785febd184f6afc322b27bc9d4494a613646709c0747e9b6f"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseExportClause (cognitive 46): parser.parseExportClause has cognitive complexity 46 (threshold 15). Drivers by points: if/else 39, boolean chains 6, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5824}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4aafedfaf8f9f58c4569b5eb2a02af9ea396ea2f0e2763d63c0a781d24c1de"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerObjectRestHelper (cognitive 46): parser.lowerObjectRestHelper has cognitive complexity 46 (threshold 15). Drivers by points: if/else 30, loops 9, boolean chains 4, match/switch 3 (nesting depth added 17). Most of this is not in the body itself: 4 of the 46 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1627, 1453, 1523, \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_parser/js_parser_lower.go"},"region":{"startLine":1432}}}],"partialFingerprints":{"codehealthFindingId/v1":"b121f3bf561674b46e33761e66450c43ec43bf2870b7deaa33fec1a1f2c821cf"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.isSafeSelectors (cognitive 45): css_parser.isSafeSelectors has cognitive complexity 45 (threshold 15). Drivers by points: if/else 27, match/switch 10, loops 6, 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":"internal/css_parser/css_parser.go"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e4d993396c12f99563ec5da962c96e98a2a41b0629f50fb5ff172329467127c"}},{"ruleId":"D2","level":"warning","message":{"text":"resolver.NewResolver (cognitive 45): resolver.NewResolver has cognitive complexity 45 (threshold 15). Drivers by points: if/else 31, loops 10, boolean chains 3, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2fe6b1004aa56587f3567e0c28e6de22a9cfda7bdcc30985a4246af3d8bfeac"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.processAnimationShorthand (cognitive 44): parser.processAnimationShorthand has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24, match/switch 18, boolean chains 1, loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_animation.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1c6a11759d7179260b47a2e59de0139d97784c992292a3833ca9e658e02e70"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.handleComposesPragma (cognitive 44): parser.handleComposesPragma has cognitive complexity 44 (threshold 15). Drivers by points: if/else 25, loops 15, boolean chains 2, match/switch 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_composes.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa22cd2340edfbaa7aea4045e99b25b04aec1013951d32ba23cba2ff23703858"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.internalQuote (cognitive 44): helpers.internalQuote has cognitive complexity 44 (threshold 15). Drivers by points: if/else 34, loops 5, match/switch 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":"internal/helpers/quote.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"19bd29e320afba4eb817fe91f477738b3e0d6b762546c3242549048fd19fa4f6"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.KnownPrimitiveType (cognitive 44): js_ast.KnownPrimitiveType has cognitive complexity 44 (threshold 15). Drivers by points: if/else 34, boolean chains 5, match/switch 5 (nesting depth added 25). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d4a67f66f7e4b8a6c277d19c968f9ba3aba0970b58dff834b52fdf1453f2b9e"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseImportClause (cognitive 44): parser.parseImportClause has cognitive complexity 44 (threshold 15). Drivers by points: if/else 42, boolean chains 1, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":5703}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ffac19d451438010956aa81bf71bb1dcd006843e568e2cf2653cc2399343fa3"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.GenerateStringInJSTable (cognitive 44): logger.GenerateStringInJSTable has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24, loops 8, match/switch 8, boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1904}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd30f628f0ef7f8bd2e1b9192aaceb19265550b61b4cf0c287528cbe41f1a2c"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.parseGradient (cognitive 43): css_parser.parseGradient has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28, boolean chains 8, loops 6, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"c759a0d5102782dfbb76dd5b972886d64f608983b952ea0448ca2c54177030f0"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.removeImpliedPositions (cognitive 43): css_parser.removeImpliedPositions has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22, loops 13, boolean chains 7, jumps 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"da776d759d6100a6fcd760aee0133f4826180b5b021a71f2c6bd3fc423463ede"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseMediaInParens (cognitive 43): parser.parseMediaInParens has cognitive complexity 43 (threshold 15). Drivers by points: if/else 38, boolean chains 4, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_media.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e053955d34d20c729ebcb11fdf93b752b88c0d9675848c36103cc791a933d8e"}},{"ruleId":"D2","level":"warning","message":{"text":"calcProduct.partiallySimplify (cognitive 43): calcProduct.partiallySimplify has cognitive complexity 43 (threshold 15). Drivers by points: if/else 34, loops 6, boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_reduce_calc.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bd05c7839f2feb0699c687f5731aa6832ae058e81f01ec518cd532ff2c62d18"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printIdent (cognitive 43): printer.printIdent has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28, boolean chains 10, loops 3, jumps 1, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":1027}}}],"partialFingerprints":{"codehealthFindingId/v1":"f111ffdf6f79835035c9c210d14fcc6c88076d3adbf5d360b808e28d4f127a58"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.FoldStringAddition (cognitive 43): js_ast.FoldStringAddition has cognitive complexity 43 (threshold 15). Drivers by points: if/else 32, match/switch 8, 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":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1779}}}],"partialFingerprints":{"codehealthFindingId/v1":"29f22f01e68e11213e19015818ecdeab6998796fdab49c395d86c471d35528b4"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.NextJSXElementChild (cognitive 43): Lexer.NextJSXElementChild has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27, loops 8, match/switch 6, boolean chains 1, jumps 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":"internal/js_lexer/js_lexer.go"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"b15e4b5c4baafeefd971841a20c7b220eeaa823a7282dfb590260e98abd13973"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.prepareForVisitPass (cognitive 43): parser.prepareForVisitPass has cognitive complexity 43 (threshold 15). Drivers by points: if/else 36, boolean chains 7 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":18276}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e08309ec955036e3e22826c86fbdd9f99dbee2cec8eeb958ff755120308a245"}},{"ruleId":"D2","level":"warning","message":{"text":"binaryExprVisitor.checkAndPrepare (cognitive 43): binaryExprVisitor.checkAndPrepare has cognitive complexity 43 (threshold 15). Drivers by points: if/else 32, boolean chains 10, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":3374}}}],"partialFingerprints":{"codehealthFindingId/v1":"3126fba43a2f4fcad2e943b1b38a8962ff3d1507fb4ed752f34fef5eae335775"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.mangleLocalCSS (cognitive 43): linkerContext.mangleLocalCSS has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24, loops 16, boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82cc3e2dab9dcd51b422a78837a98d85ae8b01eff1162e01b58c2c48ff18ab5"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.findImportedPartsInJSOrder (cognitive 43): linkerContext.findImportedPartsInJSOrder has cognitive complexity 43 (threshold 15). Drivers by points: if/else 31, loops 7, boolean chains 5 (nesting depth added 23). Most of this is not in the body itself: 2 of the 43 points are its own statements and the rest belongs to one function literal inside it that branches (line 4163). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/linker/linker.go"},"region":{"startLine":4139}}}],"partialFingerprints":{"codehealthFindingId/v1":"e317439cb18863211f1bb5ec81f2cb0d3351c45ee8e114adc03750caaa4d3ab7"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.resolveToUnqualified (cognitive 43): resolverQuery.resolveToUnqualified has cognitive complexity 43 (threshold 15). Drivers by points: if/else 41, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/yarnpnp.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb4a38b642a11d66eb3976aa6e146f578b17bedc9d8f782c63585c6019eadfe"}},{"ruleId":"D2","level":"warning","message":{"text":"Bundle.Compile (cognitive 42): Bundle.Compile has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24, loops 12, match/switch 5, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":3012}}}],"partialFingerprints":{"codehealthFindingId/v1":"e142719bfa7049dd5c2baa8604c227663fc6bddf28d5853fcba5476d55f41a08"}},{"ruleId":"D2","level":"warning","message":{"text":"css_lexer.decodeEscapesInToken (cognitive 42): css_lexer.decodeEscapesInToken has cognitive complexity 42 (threshold 15). Drivers by points: if/else 33, boolean chains 5, 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":"internal/css_lexer/css_lexer.go"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"656a0dcdccff3ce900d403d80c6fa421ce3d33b176c7ef51df50a3e0cfa9deb8"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperContext.ClassCanBeRemovedIfUnused (cognitive 42): HelperContext.ClassCanBeRemovedIfUnused has cognitive complexity 42 (threshold 15). Drivers by points: if/else 32, boolean chains 5, loops 5 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2335}}}],"partialFingerprints":{"codehealthFindingId/v1":"41114872341c79327dbfe5e23de3dacc2cc70ad22644d0af5b95bf5b9feb41c9"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.lateConstantFoldUnaryOrBinaryOrIfExpr (cognitive 42): printer.lateConstantFoldUnaryOrBinaryOrIfExpr has cognitive complexity 42 (threshold 15). Drivers by points: if/else 35, match/switch 5, boolean chains 2 (nesting depth added 24). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":1765}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bb5c6c24ef755f51bad7b5888076505da037fc87fb0cc6ff58bac87356d12d4"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.detailStruct (cognitive 42): logger.detailStruct has cognitive complexity 42 (threshold 15). Drivers by points: if/else 39, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1642}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a36357c23d2e42e3aef390ec659ee96d686192bb61c3142c685bbe29b5e99e"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.IsBinaryNullAndUndefined (cognitive 41): js_ast.IsBinaryNullAndUndefined has cognitive complexity 41 (threshold 15). Drivers by points: if/else 38, 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":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb31778b71f5c2cf957ab6582b81b826f16819b11498f56fde59fa431648680"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.skipTypeScriptObjectType (cognitive 41): parser.skipTypeScriptObjectType has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29, boolean chains 5, match/switch 4, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c347e1f1fbcb42c27d29339e88a458f8c4fb30f9cc72e0e8ff62123592aa7eb"}},{"ruleId":"D2","level":"warning","message":{"text":"duplicateCaseChecker.check (cognitive 41): duplicateCaseChecker.check has cognitive complexity 41 (threshold 15). Drivers by points: if/else 38, loops 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7daf1000953e0ef9440a59ca6ae5f06bdd1157081bdeb97b6e0ea11d52c6330"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.esmPackageImportsExportsResolve (cognitive 41): resolverQuery.esmPackageImportsExportsResolve has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36, boolean chains 4, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"3425aa076d60742c0ed60e4c1e40127c67863060440ee84ea276c5bb3a102d2b"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseAttributeSelector (cognitive 40): parser.parseAttributeSelector has cognitive complexity 40 (threshold 15). Drivers by points: if/else 34, boolean chains 3, match/switch 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1b06861e124cbd436912e53740177f9688598a9c509395d98e500a027db2ec"}},{"ruleId":"D2","level":"warning","message":{"text":"fs.ParseYarnPnPVirtualPath (cognitive 40): fs.ParseYarnPnPVirtualPath has cognitive complexity 40 (threshold 15). Drivers by points: if/else 29, loops 6, boolean chains 5 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/fs/fs_zip.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f0c73fdb2569a2f51b44e9a7cd82140456ae4b2f504b67be4d28a66e619f04"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printDecorators (cognitive 40): printer.printDecorators has cognitive complexity 40 (threshold 15). Drivers by points: if/else 28, match/switch 5, jumps 3, loops 3, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"7795261e7bdda168d574679d5a54f99e465721f1ed0fecd47de6719136a26581"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.removeColorInterpolation (cognitive 39): css_parser.removeColorInterpolation has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24, match/switch 11, boolean chains 3, loops 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":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b339746bdd47106cb391d0ba2d4a3d7cd11e131c7156ea87b7d5325dda57eef"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.parseRangeMediaFeature (cognitive 39): css_parser.parseRangeMediaFeature has cognitive complexity 39 (threshold 15). Drivers by points: if/else 35, boolean chains 4 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_media.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"164e4ce20247e00c59cc75fe0548f37210eb008aacea56b36ec7c6ba5302ad0f"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.processListStyleShorthand (cognitive 39): parser.processListStyleShorthand has cognitive complexity 39 (threshold 15). Drivers by points: if/else 27, match/switch 6, boolean chains 5, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_list_style.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"19516c75a42e2b569aee98e1f6985bc134147e0dccefe23ee6e4523135c6bdc1"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.warnAboutDuplicateProperties (cognitive 39): parser.warnAboutDuplicateProperties has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26, boolean chains 6, match/switch 6, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":1048}}}],"partialFingerprints":{"codehealthFindingId/v1":"94cbb68a0313b918a63df6ee90f5ab7a0cf1e6fe3f264e9d1ce32d9384ba3439"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.esmPackageTargetReverseResolve (cognitive 39): resolverQuery.esmPackageTargetReverseResolve has cognitive complexity 39 (threshold 15). Drivers by points: if/else 30, loops 4, match/switch 3, boolean chains 2 (nesting depth added 24). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c2bfce5a82aadd41fbdf2b0a3aa2bbb3b1ec6d84e82b2996b03296efb662e93"}},{"ruleId":"D2","level":"warning","message":{"text":"api.validateDefines (cognitive 39): api.validateDefines has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28, loops 4, match/switch 4, boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"39c50e9ec70acbd18bf5f217ec499120d4f959d1d0b59d1cb4ecbb577497ac37"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.insertPrefixedDeclaration (cognitive 38): parser.insertPrefixedDeclaration has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19, match/switch 9, boolean chains 5, loops 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":"internal/css_parser/css_decls.go"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"76a4c725b8c9b27f6030bfa7639e8e8e23fd2a1c39d05436790ecc1cd7a645a1"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseAsyncPrefixExpr (cognitive 38): parser.parseAsyncPrefixExpr has cognitive complexity 38 (threshold 15). Drivers by points: if/else 29, boolean chains 7, match/switch 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":2991}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ebd876c875e79441f0ac9902f9e9811894aed0f694c0131cfd0be18f599bd2"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseDecorator (cognitive 38): parser.parseDecorator has cognitive complexity 38 (threshold 15). Drivers by points: if/else 28, boolean chains 4, jumps 3, match/switch 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6924}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd95600d8176623c34f08bb70eaefb9c67da2495a730ca65f9b8625447f01ea"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseTypeScriptEnumStmt (cognitive 38): parser.parseTypeScriptEnumStmt has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":1360}}}],"partialFingerprints":{"codehealthFindingId/v1":"46e6d0689fb06d3486385fd2052ee3a8671ed48d4fb664880497761ca9e443f2"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateGlobalNamePrefix (cognitive 38): linkerContext.generateGlobalNamePrefix has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, loops 3, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5999}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b26073e7362aa8be1085b13903f8defc12a7f84080f0e94e1ef0fc94cdc7121"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printNumber (cognitive 37): printer.printNumber has cognitive complexity 37 (threshold 15). Drivers by points: if/else 31, boolean chains 6 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"54db44637506fa74edd1e7b68763d5884720dcaaaca1a9b3c1492c8e3a0c0373"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.generateChunksInParallel (cognitive 37): linkerContext.generateChunksInParallel has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15, loops 11, match/switch 10, boolean chains 1 (nesting depth added 19). Most of this is not in the body itself: 9 of the 37 points are its own statements and the rest belongs to one function literal inside it that branches (line 659). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/linker/linker.go"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"868ed39cfae3a40a2ba5fcf47f27b6e675311b4d2955e031dbfa7f046e7934fd"}},{"ruleId":"D2","level":"warning","message":{"text":"Bundle.computeDataForSourceMapsInParallel (cognitive 36): Bundle.computeDataForSourceMapsInParallel has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, loops 6, match/switch 3, boolean chains 2 (nesting depth added 23). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 3236). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/bundler/bundler.go"},"region":{"startLine":3216}}}],"partialFingerprints":{"codehealthFindingId/v1":"83326634e0b994625c90a9a5cae6256a13362a51d27b6e775b78222d7f9f222b"}},{"ruleId":"D2","level":"warning","message":{"text":"Token.Equal (cognitive 36): Token.Equal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_ast/css_ast.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5266a8a90524d5e9a88eacabf3a3486548a1dd4652842c975e6af94e5428b0c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.instantiateDefineExpr (cognitive 36): parser.instantiateDefineExpr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 27, loops 6, boolean chains 2, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12633}}}],"partialFingerprints":{"codehealthFindingId/v1":"17b4fd5f7940751939dba283d4b2cd8dea0e519222e050dcb3a79fad4ec289c7"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerAndMangleBoxShadow (cognitive 35): parser.lowerAndMangleBoxShadow has cognitive complexity 35 (threshold 15). Drivers by points: if/else 25, boolean chains 6, loops 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_box_shadow.go"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc0c42c2f6c1a31e3aaa0945f78fb32327963954e9294636b20efe4feff208a"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.mangleFamilyNameOrGenericName (cognitive 35): parser.mangleFamilyNameOrGenericName has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23, loops 9, boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_font_family.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c87237bb0222f726e1f0a19a4fcd2fc28501d12ac9f299cb79b972efe8c07fe"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.scanIdentifierWithEscapes (cognitive 35): Lexer.scanIdentifierWithEscapes has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16, match/switch 10, loops 9 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":1641}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee2fa10f99e0f8b3120ad3b900fe0d8a48efa84cc0de2b1826e498d92252624c"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.mangleProps (cognitive 35): linkerContext.mangleProps has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22, loops 13 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"4adab65eb0d1e2480e5f6c71d50f8c553607f95802329ca6bc79138057b5666c"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.ValuesLookTheSame (cognitive 34): js_ast.ValuesLookTheSame has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21, boolean chains 9, loops 3, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1593}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cecb6850ff4cc07209ea9bcd88db69bddca6e41a02ab105ae28308313890263"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseFnStmt (cognitive 34): parser.parseFnStmt has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25, boolean chains 8, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6726}}}],"partialFingerprints":{"codehealthFindingId/v1":"e05b0319d22859f07cef034bc2700cb3811353aa1629a98a6c4d01fb7dc55889"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.markFileLiveForTreeShaking (cognitive 34): linkerContext.markFileLiveForTreeShaking has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23, loops 7, boolean chains 3, 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":"internal/linker/linker.go"},"region":{"startLine":3215}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f5ebbadb03d851e5dacb3a552ed33fb95589996bdc32008ced064a073756fdb"}},{"ruleId":"D2","level":"warning","message":{"text":"serviceType.handleBuildRequest (cognitive 33): serviceType.handleBuildRequest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, boolean chains 4, loops 1 (nesting depth added 9). Of this number, 16 points are the body\u0027s own statements and 17 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2368f07822e9f775f8b154791a50a790803c784d6f204350f12d37a50d5a6f0"}},{"ruleId":"D2","level":"warning","message":{"text":"lexer.consumeNumeric (cognitive 33): lexer.consumeNumeric has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17, boolean chains 9, loops 7 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"045aeae7db8e85d251387c45bb909ee00e8a23148ec59322242d1280f741c577"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printQuotedWithQuote (cognitive 33): printer.printQuotedWithQuote has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, boolean chains 5, 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":"internal/css_printer/css_printer.go"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"11420c4108660d2aae126b2361681a816bfaff5c87c36b57b2daaac9c9532a70"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.skipTypeScriptBinding (cognitive 32): parser.skipTypeScriptBinding has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, loops 6, match/switch 4, boolean chains 1 (nesting depth added 19). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e64810e8cbd99fdc13e883bc6c9c30e74c05f4b07e04a4211ae34452fd8684f"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.breakOutputIntoPieces (cognitive 31): linkerContext.breakOutputIntoPieces has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19, match/switch 6, loops 5, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":6739}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c6eb66fca989f810437bd6afde7c1139b0b2c7fe4c67fabc09397956c227cd5"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.substituteAmpersandsInCompoundSelector (cognitive 30): parser.substituteAmpersandsInCompoundSelector has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, loops 9, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_nesting.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"efee9c58a888b00f62ab460caddc7720b7dbfeb0fe5d11076ace7ce4e074b346"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parsePath (cognitive 30): parser.parsePath has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, boolean chains 3, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6616}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e9b05ca8ab25678024618e2aa0a26ef261d900881def74bc203c8e2d8d05f78"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.warnAboutEqualityCheck (cognitive 30): parser.warnAboutEqualityCheck has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, boolean chains 2, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12822}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ecf3b000b3b4888197ce8061c12356bfb3de5c8d84f9a28569762d8009b7cf0"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.warnAboutImportNamespaceCall (cognitive 30): parser.warnAboutImportNamespaceCall has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, boolean chains 3, match/switch 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":16808}}}],"partialFingerprints":{"codehealthFindingId/v1":"096a21e176620a09f9b8ac9e4f68133dc7bc5bab4a6036b693b5858cf577c722"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.validateComposesFromProperties (cognitive 30): linkerContext.validateComposesFromProperties has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 7, boolean chains 1 (nesting depth added 18). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to one function literal inside it that branches (line 2036). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/linker/linker.go"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"f473b03089ecf68d5a0b843deac9a97dbca4a09fa36a90dba6e109042b16080f"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.NewStderrLog (cognitive 30): logger.NewStderrLog has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, boolean chains 4, match/switch 3, loops 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 730, 700). 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/logger/logger.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c34eaadb7a6d3fd4d2b8b1ff9410a2a6697bc5471c85c446607e6e0b5483a22"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.esmPackageExportsResolve (cognitive 30): resolverQuery.esmPackageExportsResolve has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, boolean chains 5 (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/resolver/package_json.go"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3d27d8866bb251b42f5daf247405e16fab46c73c9f3a49f69f402f5ed3cf2e"}},{"ruleId":"D2","level":"warning","message":{"text":"lexer.consumeURL (cognitive 29): lexer.consumeURL has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16, loops 5, jumps 4, match/switch 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc8a5f63b82aca5277f11a93dfd92ece079c907f9259490aea88af8643c88aa"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseDeclaration (cognitive 29): parser.parseDeclaration has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, boolean chains 5, match/switch 2, jumps 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":2348}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6f0a3ec74d384105ff3dccef50859a860f99ecd1156a237f2f37d3f3a2d089e"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.MangleObjectSpread (cognitive 29): js_ast.MangleObjectSpread has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, loops 5, boolean chains 3, match/switch 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2737}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe13f78492a4411051b93d3bd4e6ffe7293da7ab469d54f21d29b36b41cf3a6"}},{"ruleId":"D2","level":"warning","message":{"text":"MinifyRenamer.AssignNamesByFrequency (cognitive 29): MinifyRenamer.AssignNamesByFrequency has cognitive complexity 29 (threshold 15). Drivers by points: loops 18, if/else 7, match/switch 3, boolean chains 1 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/renamer/renamer.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"77570d6f27fb9407f5f90d5c5fda3544115856390d35fcdc9417e4f431903bf1"}},{"ruleId":"D2","level":"warning","message":{"text":"apiHandler.serveEventStream (cognitive 29): apiHandler.serveEventStream has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16, match/switch 7, loops 6 (nesting depth added 20). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 421). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7f2cee464191d8ae1fbb5e6371f3d3110e668b123a4ce486c4ea371ae73bc45"}},{"ruleId":"D2","level":"warning","message":{"text":"scanner.preprocessInjectedFiles (cognitive 28): scanner.preprocessInjectedFiles has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 3, loops 3 (nesting depth added 11). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 1755). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or 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/bundler/bundler.go"},"region":{"startLine":1696}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6dbb198226f7589f046d1dea270808210a988cc758fa71053b1af2cdfc731c"}},{"ruleId":"D2","level":"warning","message":{"text":"lexer.consumeToEndOfMultiLineComment (cognitive 28): lexer.consumeToEndOfMultiLineComment has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17, loops 6, match/switch 3, boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff62ca9d011b0ff8ddf944d452b5dea0b468b419d70b2c6b89000a024431617"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.mangleFont (cognitive 28): parser.mangleFont has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, match/switch 5, boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_font.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"a53245b49bbc76aad155fe19c24c2f6329ca13cc6bb465b1b62ed4bf0bc6544c"}},{"ruleId":"D2","level":"warning","message":{"text":"Lexer.ScanRegExp (cognitive 28): Lexer.ScanRegExp has cognitive complexity 28 (threshold 15). Drivers by points: loops 13, if/else 7, match/switch 7, boolean chains 1 (nesting depth added 17). Of this number, 26 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":2034}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ee3101926f6f8418febb086e31e821704c4083176e3a56cc9a527293a8f738c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.canMergeSymbols (cognitive 28): parser.canMergeSymbols has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 11, match/switch 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4213765753f21dccffbfaedac670e2079b97a0803065a33d4554642137dd642"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.visitBinding (cognitive 28): parser.visitBinding has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, loops 4, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":10040}}}],"partialFingerprints":{"codehealthFindingId/v1":"015c4fd1e15711aaca5420957a53afb1b35381c3fcf3711d1ecb79446aed8f4a"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.globPatternFromExpr (cognitive 28): parser.globPatternFromExpr has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 4, match/switch 3 (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":"internal/js_parser/js_parser.go"},"region":{"startLine":16710}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d75bc6e4c5d3ab7a2bb402efeaaa3bae78323b9621a4ca0260f3d8a15d309e"}},{"ruleId":"D2","level":"warning","message":{"text":"Source.CommentTextWithoutIndent (cognitive 28): Source.CommentTextWithoutIndent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14, loops 6, match/switch 4, boolean chains 3, jumps 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"342026260862f832ce9715db930fb28cf177526e7f281c9935567ee96a03cf30"}},{"ruleId":"D2","level":"warning","message":{"text":"LineColumnTracker.scanTo (cognitive 28): LineColumnTracker.scanTo has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16, match/switch 6, loops 4, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f6fcc664f44876f9be42c89d03643b7437a5fdac808aff1aac873195a60daa"}},{"ruleId":"D2","level":"warning","message":{"text":"api.validateExternals (cognitive 28): api.validateExternals has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"44496402ddd234e0e418c91822b5c0a696fde64abbb19a5c29f92457746c68fe"}},{"ruleId":"D2","level":"warning","message":{"text":"main.decodePacket (cognitive 27): main.decodePacket has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 4, match/switch 1 (nesting depth added 13). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 113). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/stdio_protocol.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"b068c94054e6544e54702df038556417837450cb7f6875aa686e8133dabaea70"}},{"ruleId":"D2","level":"warning","message":{"text":"calcSum.convertToToken (cognitive 27): calcSum.convertToToken has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_reduce_calc.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eff0cc5cbbfe259ea42c7e77755c1ebf72cb52d3c4b0c118f0b5fe81805c397"}},{"ruleId":"D2","level":"warning","message":{"text":"js_lexer.RangeOfIdentifier (cognitive 27): js_lexer.RangeOfIdentifier has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, loops 7, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"951c66e021850b27d0a6d47056f3610f7035915f34e3f6bb53c96032638d003b"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerSuperPropertyOrPrivateInAssign (cognitive 27): parser.lowerSuperPropertyOrPrivateInAssign has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, loops 4, match/switch 4, boolean chains 1 (nesting depth added 15). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"f31a8c4c4158e67349ef4a971dc9413d6ba7f062837690561c6e285219544422"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerUsingDeclarationContext.scanStmts (cognitive 27): lowerUsingDeclarationContext.scanStmts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f29a25c3e5f792592aaa576d54f51d9730bd70902a2f8fe9927c7d66821e811"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.markFileReachableForCodeSplitting (cognitive 27): linkerContext.markFileReachableForCodeSplitting has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15, loops 9, boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":3162}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2039b005b5f4884734902d4475ea70076c1c7ebf2cd9ebe04c4894d5caf9a39"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.checkForBuiltInNodeModules (cognitive 27): resolverQuery.checkForBuiltInNodeModules has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, boolean chains 9 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2539}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5da1bbc233058c6db20522e74419f428b4a1e744298e909b13e7139073d42f3"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.ResolveFailureErrorTextSuggestionNotes (cognitive 26): bundler.ResolveFailureErrorTextSuggestionNotes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, boolean chains 3, match/switch 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"30c5af6c97b70ed7190d1c1a3ae7027d9d254359657d0c509abbbf0ac3c7ed6f"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.lowestCommonAncestorDirectory (cognitive 26): bundler.lowestCommonAncestorDirectory has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 6, loops 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":2118}}}],"partialFingerprints":{"codehealthFindingId/v1":"a90301f689ba89ac9acd9aeb53dd57779e44fd0d3c417ebb1307c5d8675af31f"}},{"ruleId":"D2","level":"warning","message":{"text":"scanner.maybeParseFile (cognitive 26): scanner.maybeParseFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, 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/bundler/bundler.go"},"region":{"startLine":1539}}}],"partialFingerprints":{"codehealthFindingId/v1":"26834586ce6c96c3564b3bd86e12923efb977f27a1a4675712cd68ac2a29865a"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseMediaCondition (cognitive 26): parser.parseMediaCondition has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, boolean chains 4, 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":"internal/css_parser/css_parser_media.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"201d6ab4177176c1889340ab675d1cada4fd0998c769a525a560acd670b65291"}},{"ruleId":"D2","level":"warning","message":{"text":"js_parser.analyzeSwitchCasesForLiveness (cognitive 26): js_parser.analyzeSwitchCasesForLiveness has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 5, 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":"internal/js_parser/js_parser.go"},"region":{"startLine":771}}}],"partialFingerprints":{"codehealthFindingId/v1":"3068b1bcf1c2b362568f7390442ebf094d06051cf653fe2ace34d9985c681406"}},{"ruleId":"D2","level":"warning","message":{"text":"js_parser.mangleFor (cognitive 26): js_parser.mangleFor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":10141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f88a3879a44329a3f4b44af5ba26ae0005088c7b0203e90da991934391884fd0"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseDecorators (cognitive 26): parser.parseDecorators has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6858}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde255fbff5c3c6f2560cc785d801f5926d83aa1673527ff6c16d943e0559183"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.generateClosureForTypeScriptNamespaceOrEnum (cognitive 26): parser.generateClosureForTypeScriptNamespaceOrEnum has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":1822}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f18ad68faf44387342c4fb5c8fcd5f40f2c0bf3ae7155f456327d0b3a00d199"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.preventExportsFromBeingRenamed (cognitive 26): linkerContext.preventExportsFromBeingRenamed has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, loops 5, match/switch 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":6922}}}],"partialFingerprints":{"codehealthFindingId/v1":"8898820e0ec9abfcb9411511535a0443f68197d8ec1b91f3333b093d058544fb"}},{"ruleId":"D2","level":"warning","message":{"text":"css_lexer.RangeOfIdentifier (cognitive 25): css_lexer.RangeOfIdentifier has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 5, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"442474a143018c3ca6fc526b29f7e475b1f8176a77304990950e0566f2983226"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.ToBooleanWithSideEffects (cognitive 25): js_ast.ToBooleanWithSideEffects has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, match/switch 5, boolean chains 3 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2014}}}],"partialFingerprints":{"codehealthFindingId/v1":"df9f6aee7e0b758442ad7a5f482d7fe24342d296cdbd81c2065946568b17d1da"}},{"ruleId":"D2","level":"warning","message":{"text":"js_lexer.decodeJSXEntities (cognitive 25): js_lexer.decodeJSXEntities has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":2095}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a36c3bed712798c2154b03e9f593ddcbbff5dcbff4ef07231df311c4c249cc2"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.findSymbol (cognitive 25): parser.findSymbol has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":8639}}}],"partialFingerprints":{"codehealthFindingId/v1":"1283d73cc4e25a789d382496f109f552bd964c3e5dd5ced5da946ace58442ed9"}},{"ruleId":"D2","level":"warning","message":{"text":"Options.Equal (cognitive 25): Options.Equal has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12, boolean chains 10, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b84a44f7448f34c0c056261aeff6db6a08a1fbd4a8806ce3fdd2027a86090a6"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.addExportsForExportStar (cognitive 25): linkerContext.addExportsForExportStar has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, loops 7, 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/linker/linker.go"},"region":{"startLine":2965}}}],"partialFingerprints":{"codehealthFindingId/v1":"7079eb43e05fd61d7298962ba0c15dbc1a6163572aa6e810f8b928d9ec0cf937"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.PlatformIndependentPathDirBaseExt (cognitive 25): logger.PlatformIndependentPathDirBaseExt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, boolean chains 8, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"22da444aaf9ae228a634191da010528aa94a9f716dbb8663ffd382988a0a9337"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.msgString (cognitive 25): logger.msgString has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, loops 6, boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8237bd58a255880ee80c59aa7a91d75b8ce1a70b4637907143151801d741621"}},{"ruleId":"D2","level":"warning","message":{"text":"sourcemap.GenerateLineOffsetTables (cognitive 25): sourcemap.GenerateLineOffsetTables has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, loops 6, boolean chains 2, match/switch 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/sourcemap/sourcemap.go"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"777fca2a638a1c1295eca57e8fb3511fd8b16cc8d7b5b7c8f03384c7ae79dc81"}},{"ruleId":"D2","level":"warning","message":{"text":"api.transformImpl (cognitive 25): api.transformImpl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, boolean chains 2, loops 2, match/switch 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1687}}}],"partialFingerprints":{"codehealthFindingId/v1":"4227d9494cf140b54a9a7ffd890b4c5cd9708f2c2d650fd22a1e1bbd2552ba7a"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.printMangleCache (cognitive 25): cli.printMangleCache has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, loops 10 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/mangle_cache.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"5712de599e941deb801f8359b0ce335eaa4da46ae709d3298132a38d4f48ce7a"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.PathRelativeToOutbase (cognitive 24): bundler.PathRelativeToOutbase has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":3401}}}],"partialFingerprints":{"codehealthFindingId/v1":"07d355e848598fb87cf35fc2417bcec6061be977fdfa86ad1c3cd62690a13b88"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.MaybeSimplifyEqualityComparison (cognitive 24): js_ast.MaybeSimplifyEqualityComparison has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"d205e73a1c3ddf704604182a8be4f00fc5f57ae154c60d313f82655f443b3832"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.simplifyUnusedExpr (cognitive 24): printer.simplifyUnusedExpr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 3, match/switch 3, boolean chains 2 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":1673}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0b3557405e182cc18f00b07e6348fdaa4043e9b31b6a5384ef729bb496ad51"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.wrapWordsInString (cognitive 24): logger.wrapWordsInString has cognitive complexity 24 (threshold 15). Drivers by points: loops 12, if/else 7, boolean chains 4, jumps 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/logger/logger.go"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c6afcc95b7a331cbb32ff6c04a75202edfd4e3179f6bd4a387b1ed4c72937c3"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.loadAsFile (cognitive 24): resolverQuery.loadAsFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, loops 4, boolean chains 2 (nesting depth added 7). Of this number, 19 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/resolver/resolver.go"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1bd8f13d20db2869ed563e1d86e7320cdc4e1264bda7a882480d614aa7811f"}},{"ruleId":"D2","level":"warning","message":{"text":"config.ProcessDefines (cognitive 23): config.ProcessDefines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/config/globals.go"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a78593bc5c8d75115b01a50cd1b0455ff5da7d3b344951a97774143619c1e2"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printImportAssertOrWithClause (cognitive 23): printer.printImportAssertOrWithClause has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":4028}}}],"partialFingerprints":{"codehealthFindingId/v1":"3876eb0fa06acdfe27fd5573f0e0776f7323d3cd02ba9002b0a06cd914828e77"}},{"ruleId":"D2","level":"warning","message":{"text":"linker.Link (cognitive 23): linker.Link has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 6, loops 3, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"76620378e279a7fccd89ec9cca99de6c399d3deed7dfcf57b7ab7e803497a65f"}},{"ruleId":"D2","level":"warning","message":{"text":"linkerContext.createExportsForFile (cognitive 23): linkerContext.createExportsForFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 5, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":2260}}}],"partialFingerprints":{"codehealthFindingId/v1":"973135a8cea44f52246e60b3e4f36350aef48ed188db357c8dc9cc85ec93daf1"}},{"ruleId":"D2","level":"warning","message":{"text":"SourceMapPieces.Finalize (cognitive 23): SourceMapPieces.Finalize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/sourcemap/sourcemap.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"735f130e870ca93c57b9c4a5d64555f255c30cc8ad174220b36e5bae16772dcd"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.tryToParseValue (cognitive 22): css_parser.tryToParseValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, match/switch 4, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_gradient.go"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9323c396fa796415d52e56e0382f3e5c22a5759b904b4e69740f90670df8bb2"}},{"ruleId":"D2","level":"warning","message":{"text":"borderRadiusTracker.mangleCorners (cognitive 22): borderRadiusTracker.mangleCorners has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 6, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_border_radius.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"a753a2a03d6f68a6dd2b31230e83e7449a6249500c0721446a61a7e082d07a7c"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.tryToGenerateColor (cognitive 22): parser.tryToGenerateColor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_color.go"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d2c65792cd9453305eab78bf46184394e5226280df46c66b7d441b29ce9b152"}},{"ruleId":"D2","level":"warning","message":{"text":"fs.tryToReadZipArchive (cognitive 22): fs.tryToReadZipArchive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/fs/fs_zip.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6519761ca0a940b915a7f5fe2197ecc6f9990b084034d863112344415af3915"}},{"ruleId":"D2","level":"warning","message":{"text":"mockFS.Rel (cognitive 22): mockFS.Rel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/fs/fs_mock.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0b0111c73b686cbb2aaa58a10ffebb82943c9d4a35cd982c5ca39ce80876cdb"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.TryToInsertOptionalChain (cognitive 22): js_ast.TryToInsertOptionalChain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1661}}}],"partialFingerprints":{"codehealthFindingId/v1":"30cb1a6a88e44f6fe2489ded1a12b7485defc5c22c717811a9c2a696c2fe2aa7"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.convertExprToBinding (cognitive 22): parser.convertExprToBinding has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, loops 4, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":3398}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc89f4218a84a02a52f511331911fe883bc05710133b7d6f2774f3d4b003685"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.maybeInlineIIFE (cognitive 22): parser.maybeInlineIIFE has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, match/switch 3, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":11882}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e555331e03943d001226813eb46e3b3e0a628e5379aab84d37d0180ecf2279"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.isDotOrIndexDefineMatch (cognitive 22): parser.isDotOrIndexDefineMatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, boolean chains 4, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12574}}}],"partialFingerprints":{"codehealthFindingId/v1":"447f8d2fc5af970a500bcd4d2bb215fb4521f15d9e1ff487aeda401919e900f7"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerTemplateLiteral (cognitive 22): parser.lowerTemplateLiteral has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":1745}}}],"partialFingerprints":{"codehealthFindingId/v1":"4649150698372748e806425375eb7abfe4d0c4894fc428d25b138e67e2f1db77"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.analyzeProperty (cognitive 22): lowerClassContext.analyzeProperty has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 11 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c12a173ec27d03cfe87dc2dae86b51c9fe43d595b1da188fe89ff6797a8d35c"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printExprCommentsAtLoc (cognitive 22): printer.printExprCommentsAtLoc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 6, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":1917}}}],"partialFingerprints":{"codehealthFindingId/v1":"6adc7c636b92625b4bb60966faad9e7dc54e41f1411c82a6c3dc1f9bdc643664"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printIf (cognitive 22): printer.printIf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (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":"internal/js_printer/js_printer.go"},"region":{"startLine":3825}}}],"partialFingerprints":{"codehealthFindingId/v1":"318a212b61888f853a10d8b11e17052f2684b777c8581abf99eb4d52c395fab8"}},{"ruleId":"D2","level":"warning","message":{"text":"linker.wrapRulesWithConditions (cognitive 22): linker.wrapRulesWithConditions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 6, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":6473}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c40896b966ff1d46fe518aa66e12d363eb9ddd3c729f1d6cb9b5852f567baf"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printWithEscape (cognitive 21): printer.printWithEscape has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 9, 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":"internal/css_printer/css_printer.go"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebb4cad6aafa74ad2fbdc7a3b4d6c2a955f1035053f18b5998a7359c6d62d7e"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.ShouldFoldBinaryOperatorWhenMinifying (cognitive 21): js_ast.ShouldFoldBinaryOperatorWhenMinifying has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 4, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1140}}}],"partialFingerprints":{"codehealthFindingId/v1":"e42716201044822f8ce4da6b6dfd34c7b454906067217a1b0ec41afccfe829d8"}},{"ruleId":"D2","level":"warning","message":{"text":"js_lexer.fixWhitespaceAndDecodeJSXEntities (cognitive 21): js_lexer.fixWhitespaceAndDecodeJSXEntities has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, 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":"internal/js_lexer/js_lexer.go"},"region":{"startLine":2135}}}],"partialFingerprints":{"codehealthFindingId/v1":"46377a0d0c5ec5bfde4a2ca10a56ef711ba3328868650c861710679e8757fcc3"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerClass (cognitive 21): parser.lowerClass has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"f68bd849df214fc81e9e4dc1de030b456f001c82631e9e530195fd8cf6fd8162"}},{"ruleId":"D2","level":"warning","message":{"text":"resolver.isValidTSConfigPathNoBaseURLPattern (cognitive 21): resolver.isValidTSConfigPathNoBaseURLPattern has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 10 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/tsconfig_json.go"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1346eda61c1ccd05ee0165c7fa6f686752f996158546ce2536aba8e567e3925"}},{"ruleId":"D2","level":"warning","message":{"text":"cli.parseServeOptionsImpl (cognitive 21): cli.parseServeOptionsImpl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba03079b5c91b2d7d26fd543fe67476013155671102755656f3ac2f0a1fef51"}},{"ruleId":"D2","level":"warning","message":{"text":"borderRadiusTracker.mangleCorner (cognitive 20): borderRadiusTracker.mangleCorner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_border_radius.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"8963e2932c0997a1bbdfed412fc0211e67b7d69dd4ed4b582efd29abf8c16b05"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.maybeSimplifyMediaNot (cognitive 20): parser.maybeSimplifyMediaNot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 3, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_media.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3f9605551850bdaf49e090de59842645160ed328ff7d30cc4b7d06b1735458"}},{"ruleId":"D2","level":"warning","message":{"text":"resolver.globstarToEscapedRegexp (cognitive 20): resolver.globstarToEscapedRegexp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, boolean chains 4, loops 4, match/switch 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0a916245e23c88da7931e06d618c767dc70247b85e4f7422c26c804ce4b4fa"}},{"ruleId":"D2","level":"warning","message":{"text":"api.validateFeatures (cognitive 20): api.validateFeatures has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 2, boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e64754f1b3b7b6ccbef952063fca473ef2c728c06f4e0a12ca3314b877c8c2"}},{"ruleId":"D2","level":"warning","message":{"text":"apiHandler.matchQueryPathToResult (cognitive 20): apiHandler.matchQueryPathToResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, 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":"pkg/api/serve_other.go"},"region":{"startLine":599}}}],"partialFingerprints":{"codehealthFindingId/v1":"e40f041dcde3e06e072048d551259f6871185953da9f587b57a7a7d524912bac"}},{"ruleId":"D2","level":"warning","message":{"text":"Bundle.generateMetadataJSON (cognitive 19): Bundle.generateMetadataJSON has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":3279}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc5828ca9133fc82c0586a2bc0e2be89d92a90183aeaa57bd35d13b7fdbeb18a"}},{"ruleId":"D2","level":"warning","message":{"text":"lexer.wouldStartNumber (cognitive 19): lexer.wouldStartNumber has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04ea831b133326441443b30f062ebfbdde10eac2a5c64f352f502440a8365ab"}},{"ruleId":"D2","level":"warning","message":{"text":"lexer.consumeIdentLike (cognitive 19): lexer.consumeIdentLike has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 5, loops 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_lexer/css_lexer.go"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b469ba348848c97a1a3e4438841807ec6b29f17f392e5d6f75b488298f9556"}},{"ruleId":"D2","level":"warning","message":{"text":"DeadRuleRemover.RemoveDeadRulesInPlace (cognitive 19): DeadRuleRemover.RemoveDeadRulesInPlace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 4, jumps 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":742}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbe6d45b658675455a022910736fcfcb1f23f040b7264d6df49f8ea4e005f7f"}},{"ruleId":"D2","level":"warning","message":{"text":"fs.MockFS (cognitive 19): fs.MockFS has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/fs/fs_mock.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f29f988514e8893fb572a53d5cd6add722107cca69d658f729171980ce775d"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.PrettyPrintedStack (cognitive 19): helpers.PrettyPrintedStack has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/stack.go"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"46e07821cfe6894dac46efed5f925517f899731f8142d3a8cd95658705d05ca2"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parsePropertyBinding (cognitive 19): parser.parsePropertyBinding has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 4, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":2740}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d7569bf848cac59882b21d2dad023a0c7e2bcc63bc9f370cc7a18aa0a8ff59f"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.generateClosureForTypeScriptEnum (cognitive 19): parser.generateClosureForTypeScriptEnum has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, loops 7, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":1954}}}],"partialFingerprints":{"codehealthFindingId/v1":"da3aefece50b1aa29f3479a747ef3f599b77900def74515bb71ce107f797eb25"}},{"ruleId":"D2","level":"warning","message":{"text":"ChunkBuilder.updateGeneratedLineAndColumn (cognitive 19): ChunkBuilder.updateGeneratedLineAndColumn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 2, match/switch 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/sourcemap/sourcemap.go"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"09bca22978756901ad7854ef469c228aa3926f0dbb7c62c528723acf774aa722"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.logPluginMessages (cognitive 18): bundler.logPluginMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"d81c1d0bd1f7205b57cb59590bf7d8711583b844b4608d8a2b934fd880ecc840"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.mangleNumber (cognitive 18): css_parser.mangleNumber has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 5, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":2123}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc454b8c5072e831cb64756fdad7b50728dbbd735a77850b3686aaae1bd8a584"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseURLOrString (cognitive 18): parser.parseURLOrString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, loops 7, boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d89d44aff803f28f189a03a8b2647f28cb681e5cd0ddf8393f706b9368742f"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.scanForEndOfRule (cognitive 18): parser.scanForEndOfRule has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, 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":"internal/css_parser/css_parser.go"},"region":{"startLine":2308}}}],"partialFingerprints":{"codehealthFindingId/v1":"9654c07ddadf7922f290e788f783ed3eb2e29e7b88009b4a5886a2dd0d2bf1bd"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.DecodeWTF8Rune (cognitive 18): helpers.DecodeWTF8Rune has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/utf.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54c68bb6bebdb6c3167791c5315b03fabcf6af961ebd81a34ad55f29a521444"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.ConvertBindingToExpr (cognitive 18): js_ast.ConvertBindingToExpr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"094af71e27713fb58ca80444ec98e881e5bc299568b0bbb08dc2d0aae96c115d"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.simplifyUnusedStringAdditionChain (cognitive 18): js_ast.simplifyUnusedStringAdditionChain has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa1252238de144443f5922ff3de687c3b413c14fbbcd0e26ea989e2f984c38f"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.IsIdentifierUTF16 (cognitive 18): js_ast.IsIdentifierUTF16 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ident.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"5254bf571e9474ac139e81da116353d3c6baba9392174b5b1e20b41e4bbb7559"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.IsIdentifierES5AndESNextUTF16 (cognitive 18): js_ast.IsIdentifierES5AndESNextUTF16 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ident.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"e940e0299ae38d09a75b3f476e4498ca5cf83e6645a0c66f128bb370c64e4fd7"}},{"ruleId":"D2","level":"warning","message":{"text":"js_parser.duplicateCaseEquals (cognitive 18): js_parser.duplicateCaseEquals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 7, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c92807b51f510470fbd75f38ce2a30332d9ff1b05893919e56313247f3b9b67"}},{"ruleId":"D2","level":"warning","message":{"text":"js_parser.isValidJSON (cognitive 18): js_parser.isValidJSON has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/json_parser.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd2f3c964800b9f17652436a49490aa55154b09bcb8db6e20b2f8a42bb23dac"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.warnAboutTypeofAndString (cognitive 18): parser.warnAboutTypeofAndString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, match/switch 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12787}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3284b23518b5ee1613ea275fd95790388a0754254d7fb122dc6aba614ac34ae"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerObjectSpread (cognitive 18): parser.lowerObjectSpread has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, 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":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":990}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eddabc8c9c52156e0fbebdcc86d74806922636cfe73083267e922b89d508ab1"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.insertInitializersIntoConstructor (cognitive 18): lowerClassContext.insertInitializersIntoConstructor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, 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/js_parser/js_parser_lower_class.go"},"region":{"startLine":1974}}}],"partialFingerprints":{"codehealthFindingId/v1":"be48e63421a4ac10a3468f9855cfe1bb49d8ac9177c94da276c0c4d9451bb6fa"}},{"ruleId":"D2","level":"warning","message":{"text":"linker.mergeAdjacentLocalStmts (cognitive 18): linker.mergeAdjacentLocalStmts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":4585}}}],"partialFingerprints":{"codehealthFindingId/v1":"efc0fb4c5a99f17ab3b5f2241f1dffd3143eb4238eff6c93e75ca235758d4302"}},{"ruleId":"D2","level":"warning","message":{"text":"Source.RangeOfString (cognitive 18): Source.RangeOfString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, 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/logger/logger.go"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d70719ccf8702b02c6a50dfc096c5e4937f20e84b63a4b9bbd720fa4f53131c"}},{"ruleId":"D2","level":"warning","message":{"text":"numberScope.findUnusedName (cognitive 18): numberScope.findUnusedName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/renamer/renamer.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"e94ef45a6fec07bf5ccb265a9f4563d353cf9faf3195728a26967ef13f63bcfe"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runService (cognitive 17): main.runService has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 6, boolean chains 1 (nesting depth added 7). Of this number, 12 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":"cmd/esbuild/service.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40d33cb608978c38a4bfef254ae8a889889fab5cdca940c14bd3312f45bb774"}},{"ruleId":"D2","level":"warning","message":{"text":"RAtKeyframes.Equal (cognitive 17): RAtKeyframes.Equal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 5, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_ast/css_ast.go"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"4939f89727a4e833ca95f152167d4ae51f82da402534c0a76a5d26af3e0c5cf6"}},{"ruleId":"D2","level":"warning","message":{"text":"ComplexSelector.ContainsNestingCombinator (cognitive 17): ComplexSelector.ContainsNestingCombinator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 7 (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/css_ast/css_ast.go"},"region":{"startLine":1172}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c36bf50266f80b50f4c879a9d94641276a19a9f56fb22403e3951087c0bd417"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerNestingInRule (cognitive 17): parser.lowerNestingInRule has cognitive complexity 17 (threshold 15). Drivers by points: loops 11, if/else 5, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_nesting.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"731f361e9429e739906cd2db154a6ba63b82db4485409d0737ea97c43e3cbf72"}},{"ruleId":"D2","level":"warning","message":{"text":"calcSum.partiallySimplify (cognitive 17): calcSum.partiallySimplify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 5, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_reduce_calc.go"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"fadb71b6e404b532bad9f63e053cd7d2b1172762a243e722845f308a1c988db4"}},{"ruleId":"D2","level":"warning","message":{"text":"css_printer.functionMultiLineCommaPeriod (cognitive 17): css_printer.functionMultiLineCommaPeriod has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"b12d47995587b7c0114c25847576496af33ed3bb5d716c4e620b72cb884eeabc"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.logAssignToDefine (cognitive 17): parser.logAssignToDefine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":2015}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a6c555399d70f096e0763b367a8a703922cda688f63caba7a8a9dbe8d926657"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.parseClassStmt (cognitive 17): parser.parseClassStmt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":6363}}}],"partialFingerprints":{"codehealthFindingId/v1":"133c7ae69458088b500f80007447aac2d9c765a8dcd6da799f0fb51724b805bd"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.appendPart (cognitive 17): parser.appendPart has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":17631}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c9ac2a5bdb3857840a1fdc0fcf136a3b4d9c0cbafd1e8b1feba7a0a9790d808"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.lowerObjectRestInDecls (cognitive 17): parser.lowerObjectRestInDecls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":1297}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea08294c428ed0125f57e6d35a089e282cc5ab001a54437ddd7df818edb283b4"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerUsingDeclarationContext.finalize (cognitive 17): lowerUsingDeclarationContext.finalize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 2, match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower.go"},"region":{"startLine":1944}}}],"partialFingerprints":{"codehealthFindingId/v1":"51988491e2d06a2a97d0d988859061d9931202f4239705670f8af165e874544f"}},{"ruleId":"D2","level":"warning","message":{"text":"js_printer.QuoteIdentifier (cognitive 17): js_printer.QuoteIdentifier has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5ae7c8c0ea01e29e48d16ea7667edf7345c5acd12126ddaeba8f79c622260b"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printFnArgs (cognitive 17): printer.printFnArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"38d70f79b89a6d3aa0acbf07c88e11c3e6f4f49793cdb390a11f5c9cff0f67ef"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printQuotedUTF16 (cognitive 17): printer.printQuotedUTF16 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, match/switch 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":1353}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c24af45013f565880d232052e978755bdd97848bf02673a6a0ff9737d115f59"}},{"ruleId":"D2","level":"warning","message":{"text":"pluginImpl.onResolve (cognitive 17): pluginImpl.onResolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 1938). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1927}}}],"partialFingerprints":{"codehealthFindingId/v1":"6869ef7d362811a3fbb68f0634547b1dd2e8820564504133406677ded7d8cb5e"}},{"ruleId":"D2","level":"warning","message":{"text":"watcher.tryToFindDirtyPath (cognitive 17): watcher.tryToFindDirtyPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, 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":"pkg/api/watcher.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"773603f67ad4310f4997950ef6b011faf6b49089071f8d74b8a185de951c23d4"}},{"ruleId":"D2","level":"warning","message":{"text":"serviceType.handleTransformRequest (cognitive 16): serviceType.handleTransformRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"cmd/esbuild/service.go"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"981540ef4271996349293929a08c0002d6704137af0ee489501a36f94356ca56"}},{"ruleId":"D2","level":"warning","message":{"text":"bundler.extractSourceMapFromComment (cognitive 16): bundler.extractSourceMapFromComment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":902}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d54e41da73928e8707ec411b00bb004b3bc6d66996c23378c402a73ea60638e"}},{"ruleId":"D2","level":"warning","message":{"text":"scanner.generateResultForGlobResolve (cognitive 16): scanner.generateResultForGlobResolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":2251}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ec6235c11c3f1b1c931aa968b48c793aa9554fbc5d0eb8e12a7a97853f6443a"}},{"ruleId":"D2","level":"warning","message":{"text":"RAtLayer.Equal (cognitive 16): RAtLayer.Equal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 5, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_ast/css_ast.go"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e14da1fd80105171c64c103c9d1712922d21257a2432cd2316eac2355f6d4d9"}},{"ruleId":"D2","level":"warning","message":{"text":"ComplexSelector.Equal (cognitive 16): ComplexSelector.Equal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_ast/css_ast.go"},"region":{"startLine":1236}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d8df2f31b0cf643788b41bd5830ad3e845e08cf61558ad36eef95e5246f439f"}},{"ruleId":"D2","level":"warning","message":{"text":"css_parser.containsLocalOrGlobalSelector (cognitive 16): css_parser.containsLocalOrGlobalSelector has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, loops 3, match/switch 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser_selector.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7a72c38705a02de7c7bc21eec778caa8afb148c01ea6722ea10cb2ecc67884"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.EncodeStringAsPercentEscapedDataURL (cognitive 16): helpers.EncodeStringAsPercentEscapedDataURL has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/dataurl.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"73fd5683a6a63f05966f302738af82e4008f7f2c6089d4437a931a07afe8bfa6"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.UTF16ToStringWithValidation (cognitive 16): helpers.UTF16ToStringWithValidation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/utf.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6799d0985afef3998519416e6ef34c4f206e50a776b91368554a6f87d32bfa3"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.UTF16EqualsString (cognitive 16): helpers.UTF16EqualsString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/utf.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"3615b89edc063989be5e17fa502e45604218da77485bf92f1a0eed294684c16b"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.foldAdditionPreProcess (cognitive 16): js_ast.foldAdditionPreProcess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, match/switch 4, loops 2 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"76fe85f62bba649da4cd7671eb0340179a941e74a8f99c631c9023038ae32290"}},{"ruleId":"D2","level":"warning","message":{"text":"js_ast.InlineSpreadsOfArrayLiterals (cognitive 16): js_ast.InlineSpreadsOfArrayLiterals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":2716}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac6fe7f19c6eff64c55e6526a668cd71e00670ed65ee2b8f112f6bcac53c7e05"}},{"ruleId":"D2","level":"warning","message":{"text":"js_parser.shouldKeepStmtInDeadControlFlow (cognitive 16): js_parser.shouldKeepStmtInDeadControlFlow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4, loops 2, match/switch 1 (nesting depth added 3). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":8777}}}],"partialFingerprints":{"codehealthFindingId/v1":"c790174d1618a49e7b33331951726c76342d6104da4322ad6fd329155555d1cc"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.visitStmtsAndPrependTempRefs (cognitive 16): parser.visitStmtsAndPrependTempRefs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 3, match/switch 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":8841}}}],"partialFingerprints":{"codehealthFindingId/v1":"417aa2099fc6ba66f09aa034c7684ee687ad2b6f9171060ae188433d56093205"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.checkForUnusedTSImportEquals (cognitive 16): parser.checkForUnusedTSImportEquals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 2, match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":17219}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1bce28499fdb697b98793e749a396a3b307016db955d049ff083f2c1b490a2e"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.getOrCreateExportedNamespaceMembers (cognitive 16): parser.getOrCreateExportedNamespaceMembers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":1598}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7ec75e7c4dfd5aad116ec5e7e1d5ad006f64354df6aab9fd6103e511d3b0a1"}},{"ruleId":"D2","level":"warning","message":{"text":"lowerClassContext.lowerPrivateMethod (cognitive 16): lowerClassContext.lowerPrivateMethod has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser_lower_class.go"},"region":{"startLine":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"fddca0d8a489446d1bb443e60cbe67f65d8a5d18ef5e80ac48022c184a0ed122"}},{"ruleId":"D2","level":"warning","message":{"text":"printer.printIdentifierUTF16 (cognitive 16): printer.printIdentifierUTF16 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"950a7a8d1951e95b660900630e0b50696fbf338ebe1f2d147e206669f0dca5ed"}},{"ruleId":"D2","level":"warning","message":{"text":"linker.isConditionalImportRedundant (cognitive 16): linker.isConditionalImportRedundant has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":3814}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2abb7ff815c3cfd75cb228deed1483a2ee372da43da74f9662d60325314a4d"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.esmHandlePostConditions (cognitive 16): resolverQuery.esmHandlePostConditions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/package_json.go"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"03db2cf49729bad0d07157e72e3f6bb92ed0ba686b773f75eafb0e56d70dd16d"}},{"ruleId":"D2","level":"warning","message":{"text":"resolverQuery.findLocator (cognitive 16): resolverQuery.findLocator has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/yarnpnp.go"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"2211d3d7efbdb325485d2b69e8fc8b19e8ad7e479abde70c29ab7cecab75c936"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_parser/js_parser.go: FileTooLong \u2014 10524 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_parser/js_parser.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c82fdc0882056972cd93c98d1c8d5c1e97b76a2ec6696f0636b4a3ccf5eaa446"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: parser: TooManyMethods \u2014 232 methods, declared across 4 files: js_parser/js_parser.go (151), js_parser/js_parser_lower.go (31), js_parser/ts_parser.go (31), js_parser/js_parser_lower_class.go (19). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5ff2b178df4f04f4545754b643ed3d0733092825b2da1c0d62cb3aa9ca1209"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: linker/linker.go: FileTooLong \u2014 3827 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/linker/linker.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c718ab82bf7bb4378b12c214b374aa124be2b6ff5f2ae9372ceec448f83c1e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_printer/js_printer.go: FileTooLong \u2014 3352 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_printer/js_printer.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe832ccd93ca5f7cd48ca582ac95a0cf846c12b9ed5a737ae2bdb0abca0ef5a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bundler/bundler.go: FileTooLong \u2014 2158 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/bundler/bundler.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b14308168faf009c73fba7dc3975709db5b4900d76c1294fed16aff07dd44e6b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_lexer/js_lexer.go: FileTooLong \u2014 1719 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_lexer/js_lexer.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9e9ec2a990d6c57a487b7b8301421f723a3ad2e6a8fe00135762b8df5e6ce14"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: api/api_impl.go: FileTooLong \u2014 1663 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"114eb1132b4c5cf608a2188e2ff9cc4699b51b07b01d55d8d75bb03defd9aa71"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_ast/js_ast_helpers.go: FileTooLong \u2014 1605 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_ast/js_ast_helpers.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d857b8acf3c05bb065eafcb01ebccde79fed07941f29c3f27c4178c9c8ac2e2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: resolver/resolver.go: FileTooLong \u2014 1576 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/resolver/resolver.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7eb85fb68503973272f58dd38ba8e8f948c3b1aef61d43b8888af85719ff63"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: css_parser/css_parser.go: FileTooLong \u2014 1483 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/css_parser/css_parser.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0547144ffccdd37305ad1c3b11b4baae47660b33e04c2eeb108eb198049ec346"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_parser/js_parser_lower_class.go: FileTooLong \u2014 1390 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_parser/js_parser_lower_class.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41763720658fa039089925da9adf2e6e982efa61f36c2856bb83b0817a693336"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: parser: TooManyMethods \u2014 78 methods, declared across 17 files: css_parser/css_parser.go (29), css_parser/css_parser_selector.go (10), css_parser/css_nesting.go (7), css_parser/css_parser_media.go (7), \u002B13 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_parser.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"d449e1fc9576a3474a2558565936d03b9a0c5eaad373707e25f73cef3a97e414"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_parser/js_parser_lower.go: FileTooLong \u2014 1205 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_parser/js_parser_lower.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db229818e3edf193e382d01ff585f3ed630b88eb722c685a16fe3098bf8ac570"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_parser/ts_parser.go: FileTooLong \u2014 1118 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_parser/ts_parser.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c82ce7801b54ebf17ccd02ab9d1e63cf3827955964a831189acc2fb560b2e216"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/cli_impl.go: FileTooLong \u2014 1113 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: parseOptionsImpl (85-1010). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"35c3c8f5f56d3082d4e092d83273175d52e8560ea50fa311090586954340f48c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: printer: TooManyMethods \u2014 63 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"f134ce0942a489bac1d646cc19782509d177f4805cdc9c3e912b289496da5ae1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: css_ast/css_ast.go: FileTooLong \u2014 929 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/css_ast/css_ast.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea0816ae685fa188a2ba8287552fb411b027d0e45e4b0110a19529d0a060a6be"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: js_ast/js_ast.go: FileTooLong \u2014 928 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_ast/js_ast.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bdc5919fb9bd1bb3392818eb55de9a688153c83a906e8fdd1cca74e600958e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: esbuild/service.go: FileTooLong \u2014 909 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a4b81d6fc6fc33f6eda7569814e78a193d6443d06f44a3203fe8dcbdc90ad9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: linkerContext: TooManyMethods \u2014 52 methods, declared across 2 files: linker/linker.go (51), linker/debug.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":"internal/linker/linker.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b057cba2c4a0fd03a57f8fdb4321fc3dd827de7f163c5212f1ffdb9d45dfb304"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: css_printer/css_printer.go: FileTooLong \u2014 848 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/css_printer/css_printer.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cca4975c2887da01cee4554d1b395994bca706c78560a8ca3acab03cdd72deaf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: resolver/package_json.go: FileTooLong \u2014 835 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/resolver/package_json.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9890511f9de69bebb8dbe5529667b18898b80a04f8fc1650c6e428651bd1504f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: css_lexer/css_lexer.go: FileTooLong \u2014 714 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/css_lexer/css_lexer.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0230963f98934c1d5df113b9106ae9fb7ef754ede4ac3df8425303885bf03fec"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: css_parser/css_decls_gradient.go: FileTooLong \u2014 671 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/css_parser/css_decls_gradient.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c633763e31609cbd1cf0805e793f97400a0066886678d5e8db5097935984cf1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: css_parser/css_decls_color.go: FileTooLong \u2014 667 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/css_parser/css_decls_color.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d1df9857ebef82213b948b85ae9c336c138ba9aa86afbe9ca4f4938d07c5f90"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: api/serve_other.go: FileTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8c69c3ddc761168e5d90963f75fd8bcc378b4338c88d6110155ad6b3a210aa"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: resolverQuery: TooManyMethods \u2014 38 methods, declared across 3 files: resolver/resolver.go (22), resolver/package_json.go (10), resolver/yarnpnp.go (6). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"c85ffbde8de5067837c0a33b7f25306ae1d564b40dadb4d1570e5323e964afd5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: css_parser/css_parser_selector.go: FileTooLong \u2014 605 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/css_parser/css_parser_selector.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"306c2dda3d2f4ad5c93a0975316c340b7896f42ca6101d52982a34320d8a4951"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Lexer: 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":"internal/js_lexer/js_lexer.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb98d65e104ba34458a8f95459810aee7ef1b175772b989757540123d17f024d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/config.go: FileTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/config/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f55f5c9b7f232b4454852d318af718c59d65dc567702cb1ab21eb7ba1fa99b1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): internal/js_ast/js_ast_helpers.go:1498-1520 | internal/js_ast/js_ast_helpers.go:1531-1553 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_ast/js_ast_helpers.go:1498\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_ast/js_ast_helpers.go"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb63549915563e544b3c99231d3fc3e05920eb953d3283ce5c657dd2e6a0f46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): internal/js_parser/js_parser.go:5802-5820 | internal/js_parser/js_parser.go:5932-5950 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:5802\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":5802}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70be19a12a3b79eb2d025e15f733309d1c9141a70d1e5e319e8eb9addc8c5c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/js_parser/js_parser.go:6040-6057 | internal/js_parser/js_parser.go:6090-6107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:6040\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":6040}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd17acfc3379c0c48943fc8f6e991257762846e2d533d84b8e91987fc11ca22c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/js_lexer/js_lexer.go:883-899 | internal/js_lexer/js_lexer.go:1300-1316 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_lexer/js_lexer.go:883\u0060 it does not close everything it opens, so those exact 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/js_lexer/js_lexer.go"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1f50d460a15a989fec595b17b03f8034bbc962786dc43542d408bf7ebb4335f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/js_parser/js_parser.go:3880-3895 | internal/js_parser/js_parser.go:3949-3964 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:3880\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":3880}}}],"partialFingerprints":{"codehealthFindingId/v1":"e88ac17d0afea96d1961304e282be687c6f556a9916b8afefb7077a641fd8207"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/js_parser/js_parser.go:16883-16898 | internal/js_parser/js_parser.go:16959-16974 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:16883\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":16883}}}],"partialFingerprints":{"codehealthFindingId/v1":"98df07b86710845266a305679437bb3dc0828bf45356122cab63be78eeb36eb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/linker/linker.go:5757-5772 | internal/linker/linker.go:6321-6336 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:5757\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":5757}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f615c1a81394f694731af8c1f90c87fe4938f5caf3592f295fc86efb3e27806"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/js_printer/js_printer.go:4270-4284 | internal/js_printer/js_printer.go:4317-4331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:4270\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":4270}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85abf4aae3a39122e678bb0cdc63eaeed3379d420ddcfee6c1747c8d556cd51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/js_ast/js_ident.go:156-170 | internal/js_ast/js_ident.go:197-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_ast/js_ident.go:156\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/js_ast/js_ident.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"69ee64425df3ce92deb241688236d4a7e25790768620b9e542a046844ee4c2c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): internal/js_parser/js_parser.go:2969-2982 | internal/js_parser/ts_parser.go:896-909 | internal/js_parser/ts_parser.go:1002-1015 | internal/js_parser/ts_parser.go:1025-1038 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":2969}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2fc6747e8201ce2dbe0de8a7460c0a12447ba3364aa7fde9c0c3f35b195828a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/esbuild/service.go:1009-1022 | cmd/esbuild/service.go:1098-1111 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/esbuild/service.go:1009\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":1009}}}],"partialFingerprints":{"codehealthFindingId/v1":"9faf28dd20e483f0399b7aa5601f08ece2a2c8fd8ea415fdd2a639da1bd022d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/css_parser/css_nesting.go:301-314 | internal/css_parser/css_nesting.go:324-337 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_parser/css_nesting.go:301\u0060 it begins part-way through the construct above it, so those exact 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/css_parser/css_nesting.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f1893ef4d797f10465307f7229ff3f1f8842c7b7150fe32a2c50c574b137ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/css_printer/css_printer.go:983-996 | internal/js_printer/js_printer.go:792-805 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":983}}}],"partialFingerprints":{"codehealthFindingId/v1":"c20b0abbee926c1195ae18debe2490b88aa2b74cfe801ecf38a6c65dc2e22366"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/js_printer/js_printer.go:4298-4311 | internal/js_printer/js_printer.go:4345-4358 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:4298\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":4298}}}],"partialFingerprints":{"codehealthFindingId/v1":"f96a51ed19ddd678f9d63730e682d662f29e81a08b49448dcff154945010a3a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/js_printer/js_printer.go:4327-4340 | internal/js_printer/js_printer.go:4746-4759 \u2014 both copies are in the same file, so extract the block 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":"internal/js_printer/js_printer.go"},"region":{"startLine":4327}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b32cfe0cb839fe8db062023e9830ebe9fa3118b1c1691bc6f885e1a0fddccc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/esbuild/service.go:490-502 | cmd/esbuild/service.go:535-547 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/esbuild/service.go:490\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a515070264f4651d21af069c3980cfbc3cb7ae1c47ac08ef797b39f46a2c738"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/bundler/bundler.go:1085-1097 | internal/bundler/bundler.go:1203-1215 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/bundler/bundler.go:1085\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":1085}}}],"partialFingerprints":{"codehealthFindingId/v1":"8616b1d6027d4783e90968d33638ed383da7970fca268dd1efda58a9f5ac8d48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/css_parser/css_parser.go:1630-1642 | internal/css_parser/css_parser.go:1739-1751 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/css_parser/css_parser.go:1630\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/css_parser/css_parser.go"},"region":{"startLine":1630}}}],"partialFingerprints":{"codehealthFindingId/v1":"16fcaaea9f056f6b9d56be1c6fc8709f74b9e57b1ae5ba39e8888bb272ff4dd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/js_parser/js_parser.go:4346-4358 | internal/js_parser/js_parser.go:4485-4497 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:4346\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":4346}}}],"partialFingerprints":{"codehealthFindingId/v1":"361a3b1ffd553b15c7b4fe649c599d7a4b6823d7a0a4a11a2cf492050afaeaf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/js_parser/js_parser.go:14315-14327 | internal/js_parser/js_parser.go:14488-14500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:14315\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":14315}}}],"partialFingerprints":{"codehealthFindingId/v1":"449c2ed0d1e1da86d0e50d3acb7c2f136b1dd5e246e725f34726df6574d9c9dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/js_printer/js_printer.go:2439-2452 | internal/js_printer/js_printer.go:2475-2487 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:2439\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":2439}}}],"partialFingerprints":{"codehealthFindingId/v1":"3593d6886e01e6a3bf6e7555da10aef12792575c7ec42a38c9a27075fcaa3154"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/resolver/package_json.go:125-137 | internal/resolver/package_json.go:156-168 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/resolver/package_json.go:125\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/resolver/package_json.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2658ae6592b8137b3e9aa9417b46cf539546fafa2285afe211905c0e0cacfbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/js_parser/js_parser_lower_class.go:263-274 | internal/js_parser/js_parser_lower_class.go:288-299 | internal/js_parser/js_parser_lower_class.go:315-326 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/js_parser/js_parser_lower_class.go:263\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser_lower_class.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f22a71a92a5193f83cf753d8e10c2c20ba140366e217f58a6c23715720ade4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/css_printer/css_printer.go:109-120 | internal/js_printer/js_printer.go:4111-4122 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_printer/css_printer.go:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"2576341ef036285ae41d046f68ccd52cf6aba5577cb21620fdfab23dae08b00f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_parser/js_parser.go:10540-10551 | internal/js_parser/js_parser.go:11347-11358 \u2014 both copies are in the same file, so extract the block 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/js_parser/js_parser.go"},"region":{"startLine":10540}}}],"partialFingerprints":{"codehealthFindingId/v1":"7718094646211fdfed9261f944aa19705e0d6efefea2557ab95229fee543dea9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_parser/js_parser.go:14253-14264 | internal/js_parser/js_parser.go:14390-14401 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:14253\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":14253}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb14515a6a7a7a34d769e165722d8e29223bfd85bf48f64e823effc09da7413"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_parser/js_parser.go:16259-16270 | internal/js_parser/js_parser.go:16306-16317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:16259\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":16259}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1904a600165591192fe122a35adb9d222f003953ac7e211432a0cf9ba4b7b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_parser/ts_parser.go:117-133 | internal/js_parser/ts_parser.go:440-451 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/ts_parser.go:117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"7195d4570a8b7086167b9abd283d82c76ab3ba419a066872a0fca6d111c4ed44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_printer/js_printer.go:583-594 | internal/js_printer/js_printer.go:2815-2826 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:583\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fb1c58129d706496956047a0c370e2cf74bf5db330e1d6b048cdccb43178a03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_printer/js_printer.go:643-654 | internal/js_printer/js_printer.go:2870-2881 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:643\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"6464238d3af525a5a3cb4add63f35f743a1c25cc1717cc3417e355589810344b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_printer/js_printer.go:1223-1234 | internal/js_printer/js_printer.go:1265-1276 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:1223\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":1223}}}],"partialFingerprints":{"codehealthFindingId/v1":"a43bfac4a3de012f2fb7146fd13cb2bc7cc8ae832c1653d84a3cc74399402ea8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/js_printer/js_printer.go:2424-2435 | internal/js_printer/js_printer.go:2823-2834 \u2014 both copies are in the same file, so extract the block 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/js_printer/js_printer.go"},"region":{"startLine":2424}}}],"partialFingerprints":{"codehealthFindingId/v1":"c12e76fcc754ca660f630c893856cb93042aca129fe31901c52a11a1085d6341"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/css_parser/css_decls_color.go:505-515 | internal/css_parser/css_decls_color.go:543-553 | internal/css_parser/css_decls_color.go:583-593 | internal/css_parser/css_decls_color.go:677-687 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_parser/css_decls_color.go:505\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_color.go"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"05951c975bf064c1a44518e81228df1f71fbacf99227d92c97e5ac488d084450"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/esbuild/service.go:326-336 | cmd/esbuild/service.go:363-373 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/esbuild/service.go:326\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9cd5d7debb37b21e407e2854a3344f1cd70d545075c40f424ad18e6829308f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/css_parser/css_reduce_calc.go:123-133 | internal/css_parser/css_reduce_calc.go:140-150 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_parser/css_reduce_calc.go:123\u0060 it begins part-way through the construct above it, so those exact 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/css_parser/css_reduce_calc.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1c4f21ea8c5e8ae697737cd01171e41b566639e54004f78e033e0b0c25edbfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/js_parser/js_parser.go:3093-3103 | internal/js_parser/js_parser.go:6727-6737 \u2014 both copies are in the same file, so extract the block 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/js_parser/js_parser.go"},"region":{"startLine":3093}}}],"partialFingerprints":{"codehealthFindingId/v1":"74aaea17bd0a48563d4129cb802851707221959933d05ff407c6f564df093b76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/js_parser/js_parser.go:4311-4322 | internal/js_parser/js_parser.go:4422-4432 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:4311\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":4311}}}],"partialFingerprints":{"codehealthFindingId/v1":"0362dc99b0e57649fac4774b8fc326a0f04a3f6c967b4cff1128217b7be244e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/js_parser/js_parser.go:14242-14252 | internal/js_parser/js_parser.go:14375-14385 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:14242\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":14242}}}],"partialFingerprints":{"codehealthFindingId/v1":"f168d3dd066185690f60eaa3847bc163113af80db9187ef4c5f7ba5c55a8be10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/js_parser/ts_parser.go:315-328 | internal/js_parser/ts_parser.go:333-343 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/js_parser/ts_parser.go:315\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/ts_parser.go"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"c84b74939061df15c870c80119224507503d0feba1f9d5b968d5eab32dcf95eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/js_parser/ts_parser.go:1710-1720 | internal/js_parser/ts_parser.go:1726-1736 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/js_parser/ts_parser.go:1710\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/ts_parser.go"},"region":{"startLine":1710}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ba5d992967d880dfacfa8f4653708f0fcc2fd9687ba117a46c125b3ace33aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/js_printer/js_printer.go:2772-2782 | internal/js_printer/js_printer.go:4214-4224 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:2772\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":2772}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a9b49a72b3eea6b3888ace5df1c34f83193ea2957328aab159422a56db9a513"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/linker/linker.go:5952-5962 | internal/linker/linker.go:6430-6440 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:5952\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5952}}}],"partialFingerprints":{"codehealthFindingId/v1":"e97da6d46cdc70d3f7c3a556572a74349cff8aa3cd52e05a229020879f15265a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/cli/cli_impl.go:1275-1285 | pkg/cli/cli_impl.go:1321-1331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/cli/cli_impl.go:1275\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/cli/cli_impl.go"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"d43d2b231a41573eb02d760e941c44874a99466696d9026567628f97dd2b05ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): internal/js_printer/js_printer.go:3832-3841 | internal/js_printer/js_printer.go:4407-4416 | internal/js_printer/js_printer.go:4502-4511 | internal/js_printer/js_printer.go:4654-4663 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/js_printer/js_printer.go:3832\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":3832}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf6a280773467f6d7e66a6d30848d7413170223846f9fab6be1bb351fa57eba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): pkg/api/serve_other.go:275-284 | pkg/api/serve_other.go:300-309 | pkg/api/serve_other.go:314-323 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/serve_other.go:275\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67e5e45ccc0469c60e1dacd15bf5e22d2dbad756d00d3324d99060ca5221b29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/esbuild/service.go:988-997 | cmd/esbuild/service.go:1079-1088 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/esbuild/service.go:988\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":988}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda85ed03391be485b8d3292533b10ce4237b5decae764ca1b6250295d97281c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/bundler/bundler.go:1665-1674 | internal/bundler/bundler.go:1685-1694 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/bundler/bundler.go:1665\u0060 it begins part-way through the construct above it, so those exact 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/bundler/bundler.go"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9e6a4aabca743ed055644847d7c50ea752d818d03a3334f9ce4c04074e90dff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/cache/cache_ast.go:45-54 | internal/cache/cache_ast.go:156-165 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cache/cache_ast.go:45\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cache/cache_ast.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d078d2287b3d6ade1ca6446b152502290161b35cd82e8da91a7ff98e21249d39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_ast/js_ast_helpers.go:2941-2950 | internal/js_ast/js_ast_helpers.go:2954-2963 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_ast/js_ast_helpers.go:2941\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_ast/js_ast_helpers.go"},"region":{"startLine":2941}}}],"partialFingerprints":{"codehealthFindingId/v1":"072c478f4b316762de9fc5354a76dd48793da87930f473b12597bbca5c950c4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_lexer/js_lexer.go:1861-1871 | internal/js_lexer/js_lexer.go:1980-1989 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_lexer/js_lexer.go:1861\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":1861}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e17ffdae2c198ca76555b61d3af9b4b3fda5a1c5c2c74ec99454e82a566a27d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_lexer/js_lexer.go:2602-2611 | internal/js_lexer/js_lexer.go:2620-2629 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_lexer/js_lexer.go:2602\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_lexer/js_lexer.go"},"region":{"startLine":2602}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f88100a7fd1ddbf63356cd69ff962c305c581c26a23bae1a254466e59984fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_parser/js_parser.go:4365-4375 | internal/js_parser/js_parser.go:4505-4514 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:4365\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":4365}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef24f084cce8ce3682de4c696ae56b0861fe24707f94238856010c9c839a7b15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_parser/js_parser.go:4907-4916 | internal/js_parser/js_parser.go:4932-4942 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:4907\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":4907}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb37d994b67d678dece4d63a987c494be71619866f6a546f9cb461db0494eed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_parser/js_parser.go:5752-5761 | internal/js_parser/js_parser.go:5794-5803 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:5752\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":5752}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ac2ce6b3702e53039936f60144af373af8178e7a5b7492d7147825e84ec4fd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_printer/js_printer.go:1191-1200 | internal/js_printer/js_printer.go:1326-1335 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:1191\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bbf188d52dfdace6110c386722273ff56b336fcf466a34f597b072e2492b54c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/linker/linker.go:4399-4408 | internal/linker/linker.go:4444-4453 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:4399\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":4399}}}],"partialFingerprints":{"codehealthFindingId/v1":"26ced6bb2b987f5f74cdafcfdb98ac005ca3e1510972ed691cb91725cb09cff7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/linker/linker.go:5986-5995 | internal/linker/linker.go:6461-6470 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:5986\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5986}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c7ed0b67f414cec8df462cb7d6b886f610d1cba011f558701d19a23b3093e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/api_impl.go:1261-1270 | pkg/api/api_impl.go:1725-1734 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/api_impl.go:1261\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1261}}}],"partialFingerprints":{"codehealthFindingId/v1":"124f3b4e923d7f0e5ab7afecfb822b61adc0504804aea442a1dbd80d33b261c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/js_ast/js_ident.go:138-147 | internal/js_ast/js_ident.go:179-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 \u0060internal/js_ast/js_ident.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. 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/js_ast/js_ident.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e93aeac17d6dd14b587df6a4e79ee0ba8c38a7d0b96bcf7269092b28f951cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/bundler/bundler.go:338-346 | internal/bundler/bundler.go:352-360 | internal/bundler/bundler.go:375-383 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/bundler/bundler.go"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"5598b81f94214d44e72c00599ba041985e9d9f8015960ebdd042cb45e0378a24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/esbuild/service.go:1057-1065 | cmd/esbuild/service.go:1141-1149 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/esbuild/service.go:1057\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"550b0c241a80fd1aa573b453ad4f9bc550a14e1cf7a8aadcd2875a87f3a599e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/bundler/bundler.go:2470-2478 | internal/bundler/bundler.go:2508-2516 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/bundler/bundler.go:2470\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/bundler/bundler.go"},"region":{"startLine":2470}}}],"partialFingerprints":{"codehealthFindingId/v1":"923c42ddef2312d4f9433242f53ce8b54bd7933381d89c0b26a0853da85243c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_lexer/js_lexer.go:2124-2132 | internal/js_lexer/js_lexer.go:2423-2431 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_lexer/js_lexer.go:2124\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_lexer/js_lexer.go"},"region":{"startLine":2124}}}],"partialFingerprints":{"codehealthFindingId/v1":"36698c22e8c95dff019f72567c6fce2f090c5e32886807607d0335b7b9ad1da0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_parser/js_parser.go:2345-2353 | internal/js_parser/js_parser.go:2360-2388 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:2345\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":2345}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad1fdb55a1ed7fa215f632792715c98f6aac293ee9be385e50bf135a62a610d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_parser/js_parser.go:5037-5045 | internal/js_parser/js_parser.go:5064-5072 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:5037\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":5037}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd9c2d47479b56a16b4df89e3e44b2c3ad375ce425b5fa4b6ac8ce17348225a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_parser/js_parser.go:12310-12319 | internal/js_parser/js_parser.go:14874-14882 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:12310\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":12310}}}],"partialFingerprints":{"codehealthFindingId/v1":"656e209435be91751dac6bfd074a58823b6c9a0a07d437c3f2e86881895119ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_parser/js_parser.go:15107-15115 | internal/js_parser/js_parser.go:15699-15707 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:15107\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":15107}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd6a10c7f1789dcc61bbb358c3b4edc7a30b3565aca756ebe7a72cd143b48a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_parser/js_parser.go:16129-16137 | internal/js_parser/js_parser.go:16173-16181 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:16129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":16129}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8a7932bf6f69c67ff2d530985e80c88cb1a638c3d80683a91ec7bc517fe22df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_printer/js_printer.go:671-679 | internal/js_printer/js_printer.go:1165-1173 \u2014 both copies are in the same file, so extract the block 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":"internal/js_printer/js_printer.go"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea611db556c4250d181996813d09ea40f4f9fed0c1bb96a0161df280119a9bfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_printer/js_printer.go:1688-1696 | internal/js_printer/js_printer.go:2307-2315 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:1688\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":1688}}}],"partialFingerprints":{"codehealthFindingId/v1":"f55212f5d47accd8327ac29971af6285ffb9e8dde2976e70f5544515fcb67e59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_printer/js_printer.go:4833-4841 | internal/js_printer/js_printer.go:4846-4854 \u2014 both copies are in the same file, so extract the block 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/js_printer/js_printer.go"},"region":{"startLine":4833}}}],"partialFingerprints":{"codehealthFindingId/v1":"78a01fb77a96d5e9233fa16badbeb49064c65b6391421df481d521d6529a62e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/linker/linker.go:822-830 | internal/linker/linker.go:859-867 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:822\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bbc32d11de5cbae446d386d3dc93425cfcabce05de19a5a3446e7f6a120683b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/linker/linker.go:1324-1332 | internal/linker/linker.go:1381-1389 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:1324\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ae5f4d899eb0e5781994ceb990a5b0fc1d1b84bbe83aa981cf3cb93e9d64d39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/linker/linker.go:2274-2282 | internal/linker/linker.go:5185-5193 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:2274\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":2274}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab964cc38008eab98814cc9a0b0f3e31b89f89ea55c3332429549d135e97ff53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/linker/linker.go:2443-2451 | internal/linker/linker.go:2479-2487 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:2443\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":2443}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc873b2ad8ea4eea4e9fef692cd01e44474820a500c147c2b6245c7d9de4e82c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/resolver/package_json.go:263-271 | internal/resolver/resolver.go:1226-1234 \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/resolver/package_json.go:263\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/resolver/package_json.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9841ff2ac946605f66c9ba0b69d95546e4f2ca73e6404af8c818786e1a9005d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/resolver/yarnpnp.go:638-646 | internal/resolver/yarnpnp.go:664-673 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/resolver/yarnpnp.go:638\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/resolver/yarnpnp.go"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"85bbcef92e5ca89bb96efd800b613d5c68fa1b6d3ce857ae615ecd827423175e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/js_ast/js_ident.go:78-86 | internal/js_ast/js_ident.go:106-114 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/js_ast/js_ident.go:78\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ident.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"a38e0ebbb5f7d5d1982d4cf6958a08f1e71cc744ab688a6ff8494857f49cc75e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/esbuild/service.go:980-987 | cmd/esbuild/service.go:1071-1078 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbf79768c6411caca6a8080534d89c4f58f7ffb5eadcefc9e28d15506d5354d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/bundler/bundler.go:392-399 | internal/bundler/bundler.go:409-416 \u2014 both copies are in the same file, so extract the block 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/bundler/bundler.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"1367aedf91e2450e22a74a8deb70860178b5b5622135fe0a27120606ee9509d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/css_parser/css_decls_color.go:566-573 | internal/css_parser/css_decls_color.go:594-601 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/css_parser/css_decls_color.go:566\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/css_parser/css_decls_color.go"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e3e576ea2edaa7cad8929fceae35041544db0deb64acc702a373659d7e3e95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/js_lexer/js_lexer.go:1657-1664 | internal/js_lexer/js_lexer.go:1670-1677 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_lexer/js_lexer.go:1657\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_lexer/js_lexer.go"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e79f98f015660d22932738ed9055b4414775631e15b541fbc9373f9f4353dd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/js_parser/js_parser.go:3554-3561 | internal/js_parser/json_parser.go:42-49 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":3554}}}],"partialFingerprints":{"codehealthFindingId/v1":"a85a693b08769b67a3acae7138c7fe510b68e3ebe8d31ebdbc93a770cbce87d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/js_parser/ts_parser.go:1498-1505 | internal/js_parser/ts_parser.go:1780-1804 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/ts_parser.go:1498\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/ts_parser.go"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"5866a3e7f2e7156d4a7ef05dbd409bb31dd52fbdc9ecd6a4650f8e9477ebdcc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/linker/linker.go:4820-4827 | internal/linker/linker.go:4892-4899 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:4820\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":4820}}}],"partialFingerprints":{"codehealthFindingId/v1":"42976fff0636da9f3dd2512759957309d1bafec51d4adae8e354138aa175f27c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/resolver/resolver.go:1876-1883 | internal/resolver/resolver.go:2005-2012 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/resolver/resolver.go:1876\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":1876}}}],"partialFingerprints":{"codehealthFindingId/v1":"34dfe8dc586fca32687ddf86a2ce7377a811f45a8e530a2bcb5a1310115084ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/resolver/resolver.go:2804-2811 | internal/resolver/resolver.go:2821-2828 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/resolver/resolver.go:2804\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/resolver/resolver.go"},"region":{"startLine":2804}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3c0227a5b17145769131b9ad4f958274f0ae7db40261ce0046ca1a8fb6380c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/api_impl.go:1274-1281 | pkg/api/api_impl.go:1740-1747 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/api_impl.go"},"region":{"startLine":1274}}}],"partialFingerprints":{"codehealthFindingId/v1":"6912abd810a10815bd49a80a174d9cb6d196668cbc2d93df3a688a016bb7c471"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): internal/bundler/bundler.go:269-275 | internal/bundler/bundler.go:278-284 | internal/bundler/bundler.go:288-294 | internal/bundler/bundler.go:298-304 \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/bundler/bundler.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"609d32e97d5cefd1284f2c19f45c2f44e366df3a64221bc6bb083666236cc899"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): internal/css_parser/css_color_spaces.go:83-89 | internal/css_parser/css_color_spaces.go:109-115 | internal/css_parser/css_color_spaces.go:183-189 | internal/css_parser/css_color_spaces.go:227-233 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_parser/css_color_spaces.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/css_parser/css_color_spaces.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"c55e9ef6c1a483ff3f36130a7251b176dee07255b211b84cfec54f683b295a23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/esbuild/service.go:1359-1365 | cmd/esbuild/service.go:1403-1409 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/esbuild/service.go:1359\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/esbuild/service.go"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"712ef506deca7e90d51c4b4a14c3fa34f57a55ac90c4d70486fdc2049c0d0f18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/css_parser/css_nesting.go:419-425 | internal/css_parser/css_parser_selector.go:135-141 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_parser/css_nesting.go:419\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/css_parser/css_nesting.go"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8812d35615402328239228a2e10f3209d722ca0139e618c036f5a0f86df0862"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/css_parser/css_parser.go:1727-1733 | internal/css_parser/css_parser.go:1759-1765 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/css_parser/css_parser.go:1727\u0060 it begins part-way through the construct above it, so those exact 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/css_parser/css_parser.go"},"region":{"startLine":1727}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae433f6a87790889f0188cf9f640d5e2184eb074a2c1c9f42707223534f6ee5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/css_printer/css_printer.go:95-101 | internal/js_printer/js_printer.go:3937-3943 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_printer/css_printer.go:95\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_printer/css_printer.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb8ec43f5399976a952042c2c5b21355bc04b64563da3707e753309206a3933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_ast/js_ast_helpers.go:815-821 | internal/js_ast/js_ast_helpers.go:876-882 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_ast/js_ast_helpers.go:815\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_ast/js_ast_helpers.go"},"region":{"startLine":815}}}],"partialFingerprints":{"codehealthFindingId/v1":"d82e56b1c2ecd464d7b049da68b0d86f001ebf9f0f10e3236793753579fc54dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_ast/js_ast_helpers.go:1182-1188 | internal/js_ast/js_ast_helpers.go:1191-1197 \u2014 both copies are in the same file, so extract the block 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/js_ast/js_ast_helpers.go"},"region":{"startLine":1182}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4c161bf6f687d56be6f63dde4350c15408295b2461721303bc3d587a2561f86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_parser/js_parser.go:2191-2197 | internal/js_parser/js_parser.go:2758-2764 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:2191\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":2191}}}],"partialFingerprints":{"codehealthFindingId/v1":"7208b22fa911642889f93648499e2597436f01801bb805dab8ac31d7f9d27d21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_parser/js_parser.go:7665-7671 | internal/js_parser/js_parser.go:7710-7718 \u2014 both copies are in the same file, so extract the block 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/js_parser/js_parser.go"},"region":{"startLine":7665}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ec1962ed336cb253bf85a8bcb725f3ef9778cda8ca88f2c0d6a34f95b153ee2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_parser/js_parser.go:7935-7941 | internal/js_parser/js_parser.go:7973-7979 \u2014 both copies are in the same file, so extract the block 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/js_parser/js_parser.go"},"region":{"startLine":7935}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfac75f02129207b7b4dd10efc96db1ee87086a405f83c1f2290e0ab9f4fd0b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_parser/js_parser.go:9548-9554 | internal/js_parser/js_parser.go:9605-9612 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:9548\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":9548}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c75a10512d0b233ff2b43de9fb297d3207cd8573fbd52fc6c032a935bbefbbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_parser/js_parser.go:11008-11014 | internal/js_parser/js_parser.go:11051-11058 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:11008\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":11008}}}],"partialFingerprints":{"codehealthFindingId/v1":"46e8972fa22866b8885709aa624d7fdf272877a5a282ba216c923bb044401fbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/js_printer/js_printer.go:3846-3853 | internal/js_printer/js_printer.go:4588-4594 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:3846\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_printer/js_printer.go"},"region":{"startLine":3846}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c590519b9055b21129bec43ec0f50c06609ad6218b26f99cc12c04ad7f6b6c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/api/serve_other.go:244-250 | pkg/api/serve_other.go:297-303 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/serve_other.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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff37eac1ab70130e06ee3e5e9d172d3c28da1ef5d996fa690cd4bbcd37518b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/helpers/utf.go:52-58 | internal/helpers/utf.go:101-107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/helpers/utf.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cc3b9ce680a4284e9f2cc5272b4e271a3edb0bb69ec651d62ebb5a609782954"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/bundler/bundler.go:1760-1765 | internal/bundler/bundler.go:1880-1885 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/bundler/bundler.go:1760\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/bundler/bundler.go"},"region":{"startLine":1760}}}],"partialFingerprints":{"codehealthFindingId/v1":"761f79522e857182bcc0ec40ee359cd64ee68ddeec7fd4f6528b06b8c5a820cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/css_parser/css_decls_color.go:342-347 | internal/css_parser/css_decls_color.go:369-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/css_parser/css_decls_color.go:342\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/css_parser/css_decls_color.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"65527b74054fd3d1dcfa3e8635739c0d5b261fa45b5b370b50a47aabef1298a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/css_parser/css_reduce_calc.go:539-544 | internal/css_parser/css_reduce_calc.go:579-584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/css_parser/css_reduce_calc.go:539\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/css_parser/css_reduce_calc.go"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"898fa34a036760915523545d13147f7c51eecdf4d89150d08ce3f9cbce57a9e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_lexer/js_lexer.go:2303-2308 | internal/js_lexer/js_lexer.go:2337-2343 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_lexer/js_lexer.go:2303\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_lexer/js_lexer.go"},"region":{"startLine":2303}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd26da66a28872d2e5f93051601a3c1aa68cf714734606379dbdcf896e5f760"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser.go:2793-2798 | internal/js_parser/js_parser.go:6937-6942 \u2014 both copies are in the same file, so extract the block 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":"internal/js_parser/js_parser.go"},"region":{"startLine":2793}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b034cf21a33afda48bc47322d5273ea7b873ef2dfe5b40263f77e20bf911cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser.go:4270-4275 | internal/js_parser/js_parser.go:4580-4585 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:4270\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":4270}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4140bf0b6dc4b4823a11c0176aa0df61971c08922c159600afe3c8c98ecb2eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser.go:5714-5725 | internal/js_parser/js_parser.go:5849-5854 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:5714\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":5714}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d5fb27cdc849c8e288e40c18059a6aef44896ba162caba362601eacc4b0ecf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser.go:7490-7495 | internal/js_parser/js_parser.go:7521-7526 \u2014 both copies are in the same file, so extract the block 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":"internal/js_parser/js_parser.go"},"region":{"startLine":7490}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f0a845561aee25788d5480218404ebcbaf4b90a23d69f22e01357393321e3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser.go:9275-9280 | internal/js_parser/js_parser.go:9285-9290 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:9275\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":9275}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7d1c203b70b7222694e17aa7d6c3539b23767b1ac5f14eddf9bf5e4c36de006"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser.go:9563-9568 | internal/js_parser/js_parser.go:9619-9624 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":9563}}}],"partialFingerprints":{"codehealthFindingId/v1":"bebc9c853b14e7957f49ff9b79962ffd396e9ea284b7280101d29486b4cc035b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser.go:15490-15495 | internal/js_parser/js_parser.go:15708-15713 \u2014 both copies are in the same file, so extract the block 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/js_parser/js_parser.go"},"region":{"startLine":15490}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b35d35d7f6ee06d4413462618176115b5f11be1e8fb8d7e4ada787e0572cf68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser_lower_class.go:2319-2324 | internal/js_parser/js_parser_lower_class.go:2365-2370 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser_lower_class.go:2319\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser_lower_class.go"},"region":{"startLine":2319}}}],"partialFingerprints":{"codehealthFindingId/v1":"e30e4ea6bec4cba8cfe3cc649fd9e16b2efa7d16a468dc90aa8bcde5118c2c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_parser/js_parser_lower_class.go:2496-2501 | internal/js_parser/js_parser_lower_class.go:2503-2508 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser_lower_class.go:2496\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/js_parser_lower_class.go"},"region":{"startLine":2496}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a40117b0bd55a1b79d31c1ed65e228949604d4f79f5fa2bc37691a25db85a96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/js_printer/js_printer.go:2801-2806 | internal/js_printer/js_printer.go:4233-4238 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_printer/js_printer.go:2801\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_printer/js_printer.go"},"region":{"startLine":2801}}}],"partialFingerprints":{"codehealthFindingId/v1":"59286a94b8b8c48486b0e0d8aa133ac3730cde8412f815f8f78067bcd351c28d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/linker/linker.go:2383-2389 | internal/linker/linker.go:5047-5052 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:2383\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":2383}}}],"partialFingerprints":{"codehealthFindingId/v1":"80514736d7090b4b221a5714ecc7c57e60b4e6e27a6219f2dda10c1fa6da62d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): internal/js_ast/js_ast_helpers.go:1168-1172 | internal/js_ast/js_ast_helpers.go:1182-1186 | internal/js_ast/js_ast_helpers.go:1191-1195 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_ast/js_ast_helpers.go"},"region":{"startLine":1168}}}],"partialFingerprints":{"codehealthFindingId/v1":"38f092eaf22610fa1ed73868ac11a896e208095091f68f55a6acb2d055cf9b45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/css_parser/css_decls_color.go:528-532 | internal/css_parser/css_decls_color.go:566-571 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/css_parser/css_decls_color.go:528\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/css_parser/css_decls_color.go"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e45609aabbebf22c6a67fc5e65f9ade326a9b42f80b3304969ff84c9c86f5f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/js_parser/js_parser.go:2319-2323 | internal/js_parser/js_parser.go:2356-2360 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:2319\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":2319}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6a1b72ed5ccdbfa91f3745a143a82daee619dd63c418a3ea2878dbc1798d2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/js_parser/js_parser.go:3407-3411 | internal/js_parser/js_parser.go:3438-3442 \u2014 both copies are in the same file, so extract the block 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/js_parser/js_parser.go"},"region":{"startLine":3407}}}],"partialFingerprints":{"codehealthFindingId/v1":"de54ef3023502abab5fe831fdbd0cce891d2b9c3b7654fbdb670a8ea985755f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/js_parser/js_parser.go:7523-7527 | internal/js_parser/js_parser.go:7855-7859 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":7523}}}],"partialFingerprints":{"codehealthFindingId/v1":"adab36bdb5d6f648929d3bc069e85fac11c79ef7696628b6ff640b2947c52a05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/js_parser/js_parser.go:12067-12071 | internal/js_parser/js_parser.go:12092-12096 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:12067\u0060 it begins part-way through the construct above it, so those exact 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/js_parser/js_parser.go"},"region":{"startLine":12067}}}],"partialFingerprints":{"codehealthFindingId/v1":"618e23b0b512bba54646b2e71b2ea01ea85a2385bdaedbb054b24ca5c830ba44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/js_parser/js_parser.go:14790-14794 | internal/js_parser/js_parser.go:14829-14833 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:14790\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/js_parser/js_parser.go"},"region":{"startLine":14790}}}],"partialFingerprints":{"codehealthFindingId/v1":"c318ef4849687af6a9842f1acb6d2bf8f9785f6ebb8299cdc0963ac10ea380f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/js_parser/js_parser.go:16254-16258 | internal/js_parser/js_parser.go:16301-16305 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/js_parser.go:16254\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":16254}}}],"partialFingerprints":{"codehealthFindingId/v1":"3efa18c6499eafcde0d980e725044cfb1c3baa5240828bf67a8cabacb6b9412c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/js_parser/ts_parser.go:1927-1931 | internal/js_parser/ts_parser.go:2037-2041 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/js_parser/ts_parser.go:1927\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/js_parser/ts_parser.go"},"region":{"startLine":1927}}}],"partialFingerprints":{"codehealthFindingId/v1":"1206c7c1f6e2007f2cc85e29c677b1d56691444545bbf06d1a8d0dcc0eb92784"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/linker/linker.go:4253-4257 | internal/linker/linker.go:4279-4283 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:4253\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/linker/linker.go"},"region":{"startLine":4253}}}],"partialFingerprints":{"codehealthFindingId/v1":"57985a92585f6c841c1a0c3359e855d6a9718cc74c1c1163d0c536fee2124d03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/linker/linker.go:5021-5025 | internal/linker/linker.go:5059-5063 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/linker/linker.go:5021\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":5021}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3dab33e060ed121c796fdfde114338a93518d1076557018a1d843ea631ea841"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/xxhash/xxhash_other.go:22-26 | internal/xxhash/xxhash_other.go:68-72 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/xxhash/xxhash_other.go:22\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/xxhash/xxhash_other.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de6abe9cd908ebd98f57b15527ddfb5161d5ae0c13efc4f995e067c618ae1f5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/js_parser/js_parser.go: internal/js_parser/js_parser.go changed 5 times in last 90 days, max complexity 618. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/js_parser/js_parser.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a72837b0cdd082332721d78acb81a370ed5178737075dc6635c7a03aae24ed"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/js_printer/js_printer.go: internal/js_printer/js_printer.go changed 3 times in last 90 days, max complexity 377. 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":"internal/js_printer/js_printer.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b33cfa00e04d686ab7eec64d6bc160d25e5a32a5929889285b6dac384bd30b9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/linker/linker.go: internal/linker/linker.go changed 2 times in last 90 days, max complexity 141. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/linker/linker.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bb0d7cb3edd6bb07776da3a9e25e228f2c5e16afe07e80cbb662129a5c1bee9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/api/serve_other.go: pkg/api/serve_other.go changed 2 times in last 90 days, max complexity 71. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/serve_other.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1f683a62e3bc9f2ebfdeecb18e12ab70e31224afc9f37036f9fee9623d4f7c2"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 30 significant file(s) lose their only recent owner: internal/js_parser/js_parser.go, internal/bundler/bundler.go, internal/js_parser/js_parser_lower_class.go, internal/js_ast/js_ast_helpers.go, lib/shared/common.ts, internal/js_parser/js_parser_lower.go, internal/js_parser/ts_parser.go, internal/js_ast/js_ast.go (\u002B22 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6a44852fbf174c5bdb7a5bd50b2ffada2b7fbe81271eb41aa3d1f604280a1ccf"}},{"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":"7ceee73d76663034321cbd3b5bbecae8b673163039b70b12462f979a331e73d3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e7a9139ada736d07ff392922c41056ab290cbfa563beec669fc516345f13b2e4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3246b5222a032aab15d3aed73ed2340cb2d1abd2d19403ebd80dcf07e5221781"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8eb50784ab958284eb3ecd7050384e4061ddeae0c76cf46d9d242ff3f816fc6b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"77765882d55462152a369fef948de5215108ca7f45d82e78ff505271ac66abac"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1e2210c393bb92b7bb4a14d39bcbd332b86343148ea5ad556b91323f349478c5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4e5ba20d569d258ae6d0a24953bb1bf2096a834bc4a53403da7c12ca10d2411b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2f9837116a08b8e6d1c399be63869d7e00828011b478e4dec43ad56ec6d8fca0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d587f5b3d5b7a5da58a4dd5d4715d21c7f2db71423f87f1e9f0c1b025fc10401"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4e0bcd6e1babf72663060e59d0d6396c27a1642824e0633b2e1facafccc85d05"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"229f33f5083a1fefa5ebd7f3b2a50f455445c022072eadf8ca675541407f621d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"63f6fe19604e9bbc201805ab413127670d457ca05c4ff3d9f121266d5a97d87d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ec18c7e38200a3ea39c3a5970f9d5b0810fd43fe6d132e294dfa65a87ec165c2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"50854385222ed7f5d1948613cf1ac36ac8082a917ec3d410cf0276c5ba2053ff"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"53c3bc1b0889314894dcecd76587f7a38bd5b92c48ce65e734e68b21081935b4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"89366500f3707aa46d331d93c7126468f5edaac52d4b6a254e432aca181a0afa"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1f6c12d6105dcbf80340a81f9a86b18ef5a4cc172248d15aa8b41e736ba1ffc4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9ec99759035437e8e671d0cba6ad8373d65bbaa6ada889e5d78f6d36a2843f5f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4b7fc8af8bcd9d3abdb7a549d03121306e44264305625d3487ccf9bcde91ac83"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ae43daa211cf210780082b761d591d7d500d608c1cefe0bc86be8236bde7a570"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8144a31c4104420e8c5e360cce30d51302c8ccc8ead507df44fab2077b06f5ee"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"af2dde1bb65a45b5b0aea8e374705b7653dffc9d194a7e52280abe3c36902dae"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"56b26fdbac008a770e9945c17a24891f684ed065bbb97a5b4f79e6a3a851ffc6"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bcb10062ff124989d0ce52ef3007b87e5435dbb85f762d28271cc225bf7aa1b2"},"taxa":[{"id":"CWE-78","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":"1821f22663cb998fbf5949673ba7174de984120de9ec8375d21919753b46657a"},"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":"dc3cd2e6e3b135d80b4437d58f5d34bfe4a0aa604d56c21fbf7c1c5deae80771"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a1ec882e9f017646fada12bcc45845b7fb077a6b1c6f20a65ed562f9cba897a8"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"42abd7d794c7c5d422e3261246f0da9f4fc271248aa26c27308d08bd2b674efc"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b9488592d8cb2f172ec968d90771b413cc40f178a5035674a3b39a31be520370"},"taxa":[{"id":"CWE-319","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":"0528552ba568c85310bcdf7aa2d39c9328057cfa1c5fcb1d428d7d768031c4f5"},"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":"68ebb31e88d2dfce479e28385733100c823e52847cfa8f99a86dc1ea63859fb5"},"taxa":[{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 2 of 92 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 largest first: internal/css_parser/css_decls_font_family.go, internal/css_parser/css_decls_font.go. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"31e048fef672531927f325e91a5c041accffd003e263c5c6d619e1a16640bfe7"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"09da1124a419c403d2ade055c55a726a6b6cb1356ccba469658bdc8833529ae7"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3aa1f0c47eda44c9a63211ec09a05ff085fba6a2e2a8195c35ef17a87bc71415"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a4ec71b00d78e310caf7dec250b5e13395837f80572074a6330515ef60aab0d6"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4b2bbe033341992102cd007d30598e643c79ea259d351a4683303d3c22181f73"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"87ffbfc507bc79c902b27edf8898072ff15f8c1808b3703210b362fc35555194"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0afef0262f06d51d232bb031024260dc80e039697b4264d74f286cc4d7521820"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c220eaa6b9e97e2bee1cd2b5b69335341269029f885a39deef95baaddc9a957d"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"73384c3409130a344b0edd936fd2f7ce4cd83ee394546d2fe5a68cb6e21358f1"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5b62a2d184dff6e35c483fe5d62bc0a0beb09ad135b98313e3ba52982d3fde1e"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"05553de10e2051430bc3454d41bbe5a4bcdfb4784196b6857b7c0396e02957a5"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"523ba9404aa007109a8e691281ea3c8b23f7581e146e519dbde8386f637ebe30"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6b63e28c021b43e02a5fe0a8d7b8e9debc952dd7ff1bf20b54229f1dcabfd580"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"179b2268712909ee3027c6a6650b297df8578c7251c78896886e0256d4906f60"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2d2a29b3533961770d7ae78c109eb860e71d8e0f91832fe9268cef601287e7eb"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1e4de2f161446d380a7a1503ee52a177542c3cb87728c5f4a644a208cea3cc4e"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fca3231b2caaf200b2fed6ec20b7a3ced098e90a9f75d37993050f510f017660"}},{"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":"056bdfcf15a1fb84e4e8c321ca5842d8dfe5f89c4f7a7bb189a0ccd25b23fa08"}},{"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":"2f1d5dba56fbfe355d79a2fa2c5f7621575499f2c08f8ff8cd1f21f9b0b08caa"}},{"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":"be217444638ac33aa1bd5044cfc99a2e92b284c1cc1654e8220d2ef2ef47944d"}},{"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":"31605d43278106a80ea898a086b437d89cbc21a99987fe2ddd4c5e4f4606030b"}},{"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":"67779a1faf484d9fa12ef38151fd67659afde649efe64655dd1b8f204f5e3f97"}},{"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":"b741797bd343cd08c48ea3543ceb076bec0e6c549d32b2b2697116033b269360"}},{"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":"77bf5a1e1df77c32719f44274977e19a1aa5fdf9d6d83d7ef9a228c35739dd8f"}}],"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-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-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-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-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"helpUri":"https://cwe.mitre.org/data/definitions/353.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-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":59,"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."]}]}