{"$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":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"]}},{"id":"D38","name":"OSV Dependency Vulnerabilities","shortDescription":{"text":"OSV Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D38","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"cache.New (cyclomatic 183): cache.New has cyclomatic complexity 183 (threshold 15). Most of this is not in the body itself: 2 of the 183 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 203, 159, 146, \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":"middleware/cache/cache.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed343c50e512f760442123f9a7463475dffdf10565ce1d5db1eca6c39c5cec5c"}},{"ruleId":"D1","level":"warning","message":{"text":"cors.New (cyclomatic 39): cors.New has cyclomatic complexity 39 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 23 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":"middleware/cors/cors.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e7954ff0aadf2580a317cbbe928e7b74ffb31f5d94a84bcfbf060d9f79833b0"}},{"ruleId":"D1","level":"warning","message":{"text":"static.New (cyclomatic 39): static.New has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 3 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 168). 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":"middleware/static/static.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a6d10fe4f7dcb56f8135703df97675fa03c9b5d0b17089d4e7ddf0eb9851ed"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.getOffer (cyclomatic 33): fiber.getOffer has cyclomatic complexity 33 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 16 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":"helpers.go"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ea25525be06867d9fb4a3af2438e78b53ccf287863e58a532884d518d23ff8"}},{"ruleId":"D1","level":"warning","message":{"text":"cache.parseCacheControlDirectives (cyclomatic 33): cache.parseCacheControlDirectives has cyclomatic complexity 33 (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":"middleware/cache/cachecontrol.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"27bca57e71a98dab3aac5979ad1f43c98c6c482a03ad8ecd0d70880044829bf1"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.genericParseType (cyclomatic 31): fiber.genericParseType 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":"helpers.go"},"region":{"startLine":1311}}}],"partialFingerprints":{"codehealthFindingId/v1":"4259cbbf5a4cb5b5e4fdd996eda26bdf87598cb67a1366c5cd6b6ec50c495644"}},{"ruleId":"D1","level":"warning","message":{"text":"routeParser.analyseParameterPart (cyclomatic 31): routeParser.analyseParameterPart 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":"path.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc34ff1380aefaa970673dcc8fc9edfa76153fa369e49ee8097311e885dbdd68"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultRes.SendFile (cyclomatic 31): DefaultRes.SendFile 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":"res.go"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"0786a475e2696fbbbfc3ceaa9eadaf538843e3a643a4738b396a8094ed773381"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.adaptExpressHandler (cyclomatic 29): fiber.adaptExpressHandler has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 8 belong to 6 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":"adapter.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f8da832896b94d920c108727d25c85caf2f76ed1082068c8e917ac86911daa"}},{"ruleId":"D1","level":"warning","message":{"text":"App.Test (cyclomatic 27): App.Test 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":"app.go"},"region":{"startLine":1390}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ed61483893fc155575e53b6ec8c559c4ab034992ee225e6bcd8121d85d2486f"}},{"ruleId":"D1","level":"warning","message":{"text":"App.next (cyclomatic 27): App.next 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":"router.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69bdd5eedf381f979055d7b4b41d302240a993c58aa7c88f413a90c3b66b67b"}},{"ruleId":"D1","level":"warning","message":{"text":"App.nextCustom (cyclomatic 27): App.nextCustom 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":"router.go"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"795f309f253edd86f05a2e480e4e4e6cea0afdbc60b529c83cfe76d358de9784"}},{"ruleId":"D1","level":"warning","message":{"text":"csrf.New (cyclomatic 27): csrf.New has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 112, 64). 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":"middleware/csrf/csrf.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceac6a41e2d68aa519feec1fd339d5ca1ac3ff5794ce902eee665958bdc3fe25"}},{"ruleId":"D1","level":"warning","message":{"text":"idempotency.New (cyclomatic 26): idempotency.New has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 101, 70, 51). 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":"middleware/idempotency/idempotency.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"76551b6178c0c5644102753f018efa25aaf549adbb9499a5150d65663b084d13"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultReq.Range (cyclomatic 25): DefaultReq.Range has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"req.go"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbdb5a84e725156e56264684983c0ba7edf5dddd417da28c5d92e6102b066887"}},{"ruleId":"D1","level":"warning","message":{"text":"skipRouteIndex.buildLookahead (cyclomatic 25): skipRouteIndex.buildLookahead has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router_skip.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"08d0db1da510162e8609eb0c02fb6f2f2e9029a70ae75b8cfef2956146ec21ab"}},{"ruleId":"D1","level":"warning","message":{"text":"App.startupMessage (cyclomatic 24): App.startupMessage has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"listen.go"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd901dd562b6fa9686e30a851de71102a9d21031191a596898ee242cb134fd50"}},{"ruleId":"D1","level":"warning","message":{"text":"static.sanitizePath (cyclomatic 24): static.sanitizePath 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":"middleware/static/static.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"78f3c4354e4c664661e1badcdb38692ceb7936d0abeeedf1d60fd833f0be745d"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.New (cyclomatic 23): fiber.New has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app.go"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"39c6cc9fe18bc40b1359adab90c3b4b23870105b217c093948c191582fe96e4c"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultCtx.Charset (cyclomatic 23): DefaultCtx.Charset 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":"req.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe2ca2c34e0df64c4d3b03f51297bc475998ced5c295b0298959950f1e74dee"}},{"ruleId":"D1","level":"warning","message":{"text":"adaptor.handlerFunc (cyclomatic 23): adaptor.handlerFunc has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 471). 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":"middleware/adaptor/adaptor.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0282566c734f908792c7eaafbc6697fe4e68fe296ccce901ccd246c2634e33a"}},{"ruleId":"D1","level":"warning","message":{"text":"basicauth.New (cyclomatic 23): basicauth.New has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/basicauth/basicauth.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"7de0090f9daa6f92117e256bcefd9fe2fac6f0a17216558a8132f6ddcea27e23"}},{"ruleId":"D1","level":"warning","message":{"text":"keyauth.configDefault (cyclomatic 23): keyauth.configDefault has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/keyauth/config.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fedd441a9273d47bce52f374795669fa7ece917719eaabf73b9078d360fb6f"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.canFastJoinPath (cyclomatic 23): proxy.canFastJoinPath 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":"middleware/proxy/security.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"63626b9d77ebbaee54ee97f3fae5dea57d1de14a0c8b62f0213df362008cf6de"}},{"ruleId":"D1","level":"warning","message":{"text":"helmet.New (cyclomatic 22): helmet.New has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 32). 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":"middleware/helmet/helmet.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc223a758ca62faf45f1b69af4d4f4dd43a8a7a730fa0d08beb47465125ce808"}},{"ruleId":"D1","level":"warning","message":{"text":"App.serverErrorHandler (cyclomatic 21): App.serverErrorHandler has cyclomatic complexity 21 (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":"app.go"},"region":{"startLine":1625}}}],"partialFingerprints":{"codehealthFindingId/v1":"b099b2fdfaa1283a56522b6b3d742203aba0f9a168170186c415037df09da5d5"}},{"ruleId":"D1","level":"warning","message":{"text":"FixedWindow.New (cyclomatic 21): FixedWindow.New has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 31). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/limiter/limiter_fixed.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f210be2ff0d2b77ac6fe3a527e381d0605cb97e13c1580809889db9304a00f0"}},{"ruleId":"D1","level":"warning","message":{"text":"SlidingWindow.New (cyclomatic 21): SlidingWindow.New has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 33). 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":"middleware/limiter/limiter_sliding.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ecb1e6fb130857caaa19e11f3f91d569967ea15940d38512d1959debf05b57"}},{"ruleId":"D1","level":"warning","message":{"text":"Route.match (cyclomatic 21): Route.match 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":"router.go"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"465820b813e8f8ed38ca18aeeaa849a33575375510fd4b56a67e3cc7d3803915"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.normalizeContentTypeMediaType (cyclomatic 20): fiber.normalizeContentTypeMediaType has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"helpers.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"05337a04cb558b5a22ddd9424dbad8335500d6a55b93c4405640abb8cf8167f9"}},{"ruleId":"D1","level":"warning","message":{"text":"App.Listen (cyclomatic 20): App.Listen has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"listen.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"184c62ff6b9bb9795d5cd0f6ef008cd705ab1c7823df6d9bda6751f4ae7c8925"}},{"ruleId":"D1","level":"warning","message":{"text":"core.execFunc (cyclomatic 20): core.execFunc has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 56, 130). 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":"client/core.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"e630f31bda6780d8134080e17f7c3989a014823d5bcb78a33529844f7847171d"}},{"ruleId":"D1","level":"warning","message":{"text":"App.resolveSkip (cyclomatic 19): App.resolveSkip 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":"router_skip.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bdb73011f786c4b848c6ebcc0d4b62f42136af424d2234565faae5c6a42fd3c"}},{"ruleId":"D1","level":"warning","message":{"text":"domainMatcher.match (cyclomatic 19): domainMatcher.match 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":"domain.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da554532484b72bbd8cfad4934a38c4ad27c133993e933f243166e3885513d0"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.embeddedIPv4 (cyclomatic 19): proxy.embeddedIPv4 has cyclomatic complexity 19 (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":"middleware/proxy/security.go"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"7173622e8cfd69c88195b6468bf9a521d45209ded03d71f56d49f6c145645f35"}},{"ruleId":"D1","level":"warning","message":{"text":"routeParser.getMatch (cyclomatic 19): routeParser.getMatch 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":"path.go"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c37c435b806c3660216250046fcbdfe7a927953130ac62bcb5f39837648a4e8"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultReq.Fresh (cyclomatic 19): DefaultReq.Fresh 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":"req.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"73839c1b390a1abb090cbf71ba314240af24b207091104c5a8c3db3761dd6a6f"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.buildRouteURL (cyclomatic 18): fiber.buildRouteURL 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":"router.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"476e2d9368a5104bdd63789529cfe9c9394129296d842cbdc71b22787327d528"}},{"ruleId":"D1","level":"warning","message":{"text":"extractors.isValidToken68 (cyclomatic 18): extractors.isValidToken68 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":"extractors/extractors.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a33d37b4b5d9d5f6607a88df05cd456b74e767ee5c3db064cd50f510e55ae50"}},{"ruleId":"D1","level":"warning","message":{"text":"hostauthorization.parseNormalizedAuthority (cyclomatic 18): hostauthorization.parseNormalizedAuthority 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":"middleware/hostauthorization/hostauthorization.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f92b0455856addef2c5ece60ba794a0cb780f32354275c6e969a9273d5a916"}},{"ruleId":"D1","level":"warning","message":{"text":"keyauth.New (cyclomatic 18): keyauth.New has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 68). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/keyauth/keyauth.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a364334504af3bd8634e1bcd7db31ed223bcdb3a5936148ad309ef82a8e7c2"}},{"ruleId":"D1","level":"warning","message":{"text":"pprof.New (cyclomatic 18): pprof.New has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 37). 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":"middleware/pprof/pprof.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"d290289ddeac0cec89b2e52de1d2a31039d8114e131e9f4fb2d8c6b6b1f50a62"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.Balancer (cyclomatic 18): proxy.Balancer has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 74). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/proxy.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab49d1e7d105da38aa8a08cde26c1849e7fc35d3a71c68f45b57f99a46d177be"}},{"ruleId":"D1","level":"warning","message":{"text":"proxy.joinUpstreamPath (cyclomatic 18): proxy.joinUpstreamPath 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":"middleware/proxy/security.go"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"07e4e4244c980033f15541bf91cc90b4c6c7437c18b76a547ff04fa6ae1c9aae"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.parseDomainPattern (cyclomatic 17): fiber.parseDomainPattern 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":"domain.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"de11e893b87af417c5623c5f65a063f0f31dd10da6fa482e88e5ae44bd13488f"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.addParameterMetaInfo (cyclomatic 17): fiber.addParameterMetaInfo 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":"path.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a0897d8abbdf77a2b80ac03225ea176d3022b10aef24ceb3e19fe93013eaf4"}},{"ruleId":"D1","level":"warning","message":{"text":"Bind.All (cyclomatic 17): Bind.All 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":"bind.go"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"52de28e7f71bc09907b18e1b929917fcae6dadd0753eaa13ab2f93b576bf2645"}},{"ruleId":"D1","level":"warning","message":{"text":"client.setConfigToRequest (cyclomatic 17): client.setConfigToRequest has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/client.go"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"25e625d6502888b32a84a1f246a32f60061c9db1507a23d97a2e2c7c9c79702a"}},{"ruleId":"D1","level":"warning","message":{"text":"cache.appendCanonicalQueryString (cyclomatic 17): cache.appendCanonicalQueryString 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":"middleware/cache/keygen.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcf71e4cf088f96e03f1558161fa4a1912fa5213ea366bac05ed4d45006457de"}},{"ruleId":"D1","level":"warning","message":{"text":"hostauthorization.isValidHostSyntax (cyclomatic 17): hostauthorization.isValidHostSyntax 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":"middleware/hostauthorization/hostauthorization.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"7333ff073e333fe427687cb8855d8f8e46e8a2a30b958196b2a0057e1d889157"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultReq.extractIPsFromHeader (cyclomatic 17): DefaultReq.extractIPsFromHeader 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":"req.go"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"609ce59dc4265238661dadaf39afe19d00127e4cc1b20b99abe4e5109cb66525"}},{"ruleId":"D1","level":"warning","message":{"text":"fiber.RoutePatternMatch (cyclomatic 16): fiber.RoutePatternMatch 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":"path.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"b800fe2093c773ffb3ffdffded9dd0a4abed7e2eff01ad7f42f70bcd92914c96"}},{"ruleId":"D1","level":"warning","message":{"text":"App.register (cyclomatic 16): App.register 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":"router.go"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac3b45e9dd4cc2e9a5378ba8618df297d0988cff0cfdd41b3ca5cbfc9421646"}},{"ruleId":"D1","level":"warning","message":{"text":"client.parserRequestHeader (cyclomatic 16): client.parserRequestHeader 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":"client/hooks.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d085fa74648bd723770eb0c05b53323b84732563eaf05509d8f64a96bb21cb1"}},{"ruleId":"D1","level":"warning","message":{"text":"client.SetValWithStruct (cyclomatic 16): client.SetValWithStruct has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1084). 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":"client/request.go"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb89f40a32b3e8355c594aba186000a19ef1aa03d040aaa305dbd1e1c777f961"}},{"ruleId":"D1","level":"warning","message":{"text":"CookieJar.cookiesForRequest (cyclomatic 16): CookieJar.cookiesForRequest has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/cookiejar.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"a635a436b2809fc405402aea99afb5f585640bb126b5ee4baa8f0b9d1f3b90ed"}},{"ruleId":"D1","level":"warning","message":{"text":"CookieJar.parseCookiesFromResp (cyclomatic 16): CookieJar.parseCookiesFromResp has cyclomatic complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/cookiejar.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a442cbc8c16d4191f157b14f133430d8d4f30b52867996489c12622de8f7e1b"}},{"ruleId":"D1","level":"warning","message":{"text":"helmet.configDefault (cyclomatic 16): helmet.configDefault 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":"middleware/helmet/config.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"13711603fa149a59b9bd8a816b03012c1e8d535a33775a7c808bf82945de6a22"}},{"ruleId":"D1","level":"warning","message":{"text":"logger.New (cyclomatic 16): logger.New has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 91). 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":"middleware/logger/logger.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc1d9c72cfcfc18840364cb13ab5e79a5e44266ab4b3d01dc1df0418746998f"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultReq.extractIPFromHeader (cyclomatic 16): DefaultReq.extractIPFromHeader 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":"req.go"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"8744e384c9dbc7804df3887518cc211fa58e9131587d256f94d1dbf9564b1a28"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultReq.isTrustedProxyIP (cyclomatic 16): DefaultReq.isTrustedProxyIP 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":"req.go"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b75a321938db410c7af929cd515df6fe33990dab33fa99633824575407b0af2"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.New (cognitive 311): cache.New has cognitive complexity 311 (threshold 15). Drivers by points: if/else 241, boolean chains 43, loops 22, jumps 3, match/switch 2 (nesting depth added 129). Most of this is not in the body itself: 1 of the 311 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 203, 159, 146, \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":"middleware/cache/cache.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b8b7d070abc9a22ac03fcf21457a7255425a0b6beefe6598a5391e81f295f12"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.getOffer (cognitive 63): fiber.getOffer has cognitive complexity 63 (threshold 15). Drivers by points: if/else 40, loops 14, boolean chains 6, jumps 2, match/switch 1 (nesting depth added 30). Of this number, 37 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":"helpers.go"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"5981fcc469559827651213d8482f0ec931f650fa6da503bf815f8fe528946003"}},{"ruleId":"D2","level":"warning","message":{"text":"cors.New (cognitive 56): cors.New has cognitive complexity 56 (threshold 15). Drivers by points: if/else 45, boolean chains 10, loops 1 (nesting depth added 15). Of this number, 25 points are the body\u0027s own statements and 31 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":"middleware/cors/cors.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"646c5ec617ec18edf8e2d215207112818770ed6b5ae08cde74854a284c1823c9"}},{"ruleId":"D2","level":"warning","message":{"text":"csrf.New (cognitive 55): csrf.New has cognitive complexity 55 (threshold 15). Drivers by points: if/else 52, boolean chains 1, loops 1, match/switch 1 (nesting depth added 25). Most of this is not in the body itself: 12 of the 55 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 112, 64). 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":"middleware/csrf/csrf.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"520065ceba096ecf05b9028884f0cd24b35ee617f50a1265f77ed38b75b32788"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.parseCacheControlDirectives (cognitive 48): cache.parseCacheControlDirectives has cognitive complexity 48 (threshold 15). Drivers by points: loops 19, boolean chains 16, if/else 13 (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":"middleware/cache/cachecontrol.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb6fd8c8ca96b02fff4013584f1db1310f845c6d80a3660da6a025bd6d0429c"}},{"ruleId":"D2","level":"warning","message":{"text":"static.New (cognitive 48): static.New has cognitive complexity 48 (threshold 15). Drivers by points: if/else 35, boolean chains 11, match/switch 2 (nesting depth added 13). Most of this is not in the body itself: 3 of the 48 points are its own statements and the rest belongs to one function literal inside it that branches (line 168). 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":"middleware/static/static.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3971b049cd8492226bafb030897814f6fc37a68160f64192ba07732aff9eec"}},{"ruleId":"D2","level":"warning","message":{"text":"App.next (cognitive 46): App.next has cognitive complexity 46 (threshold 15). Drivers by points: if/else 37, boolean chains 5, loops 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"266447aa12dd5387153a5fe7d817d962e3af8419ea185054591487259c5009b0"}},{"ruleId":"D2","level":"warning","message":{"text":"App.nextCustom (cognitive 46): App.nextCustom has cognitive complexity 46 (threshold 15). Drivers by points: if/else 37, boolean chains 5, loops 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc1025fcdc149ae836072bd82774bac989f1d4eb5dbc6ef147abddf3268f1db"}},{"ruleId":"D2","level":"warning","message":{"text":"routeParser.analyseParameterPart (cognitive 46): routeParser.analyseParameterPart has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28, boolean chains 12, loops 4, match/switch 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"path.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"53f4a598585f28f794ea167b4456f8019d1c8fb26daf5be714bb6efcf3246cf0"}},{"ruleId":"D2","level":"warning","message":{"text":"skipRouteIndex.buildLookahead (cognitive 46): skipRouteIndex.buildLookahead has cognitive complexity 46 (threshold 15). Drivers by points: if/else 31, loops 11, boolean chains 4 (nesting depth added 25). Of this number, 45 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router_skip.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"faff5863cfdea16860a9382ffa40a703f9b4848a78d6dd22b822ad1dace64907"}},{"ruleId":"D2","level":"warning","message":{"text":"App.Test (cognitive 40): App.Test has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30, match/switch 5, boolean chains 4, loops 1 (nesting depth added 15). Of this number, 39 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app.go"},"region":{"startLine":1390}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7f138adda380a22242cdc5a7cc7e69bc85e96f9baa6a9d9fea28a367860bee0"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultReq.Range (cognitive 40): DefaultReq.Range has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, match/switch 2, boolean chains 1, loops 1 (nesting depth added 17). Of this number, 38 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":"req.go"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94cef2d99dd3d0c407539a072945d56bd20c2638803ed112231b17f2a3e37cd"}},{"ruleId":"D2","level":"warning","message":{"text":"keyauth.New (cognitive 38): keyauth.New has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, boolean chains 3, loops 2 (nesting depth added 21). Of this number, 25 points are the body\u0027s own statements and 13 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/keyauth/keyauth.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"205c3f2938610994cd780eba988ca052aa8f70c9c040e6afcff67f3abb757320"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.adaptExpressHandler (cognitive 37): fiber.adaptExpressHandler has cognitive complexity 37 (threshold 15). Drivers by points: if/else 36, match/switch 1 (nesting depth added 18). Of this number, 21 points are the body\u0027s own statements and 16 belong to 6 function literals inside it that branch. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"adapter.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"571cb41c85207f97aa530b30060addf650a438d2bec093f8b9054679f90de070"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.buildRouteURL (cognitive 37): fiber.buildRouteURL has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26, loops 7, boolean chains 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":"router.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"321b8bbfdd6d43ba2a46456ded0e37c9c48d9d366530ae28b712a89e4c669d3a"}},{"ruleId":"D2","level":"warning","message":{"text":"CookieJar.parseCookiesFromResp (cognitive 37): CookieJar.parseCookiesFromResp has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28, loops 7, boolean chains 2 (nesting depth added 18). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/cookiejar.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"9930dc7f9fc328430b3fda7a2d4c0d33236ed1fa664d9f6340bee61d677f727d"}},{"ruleId":"D2","level":"warning","message":{"text":"adaptor.handlerFunc (cognitive 36): adaptor.handlerFunc has cognitive complexity 36 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 1, match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 471). 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":"middleware/adaptor/adaptor.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"440988a1d0443be12c9a66015c2bcb48d9f1bee67efb197c7a32b6eb56330d1a"}},{"ruleId":"D2","level":"warning","message":{"text":"idempotency.New (cognitive 36): idempotency.New has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, loops 7, boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 101, 70, 51). 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":"middleware/idempotency/idempotency.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"f746ff604f00f5e7c6d1c6e1852e80a456582aa088570a95454c8c983662d562"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultRes.SendFile (cognitive 36): DefaultRes.SendFile has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26, boolean chains 9, 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":"res.go"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"13f717588904ff24ec7876b345073e3f2ad541039fa34f91b7fb1129b497f691"}},{"ruleId":"D2","level":"warning","message":{"text":"routeParser.getMatch (cognitive 35): routeParser.getMatch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, loops 5, boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"path.go"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"153cbabc0b825ca3ead91178e76c695493f8a6f749fa46e22e45bd23fe7b65c7"}},{"ruleId":"D2","level":"warning","message":{"text":"hostauthorization.parseNormalizedAuthority (cognitive 34): hostauthorization.parseNormalizedAuthority has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, match/switch 6, loops 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/hostauthorization/hostauthorization.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"27522a4853c0df62427d744e35d4652b152e23c0d4621b3363488927de0af27b"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.parseDomainPattern (cognitive 32): fiber.parseDomainPattern has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23, loops 7, 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":"domain.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"35cafc4fea617def09847015fe111f6659407654d58b13b2807b09158f99b427"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.forEachMediaRange (cognitive 32): fiber.forEachMediaRange has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22, loops 4, match/switch 4, boolean chains 1, jumps 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":"helpers.go"},"region":{"startLine":731}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed2b003f62b71bbdcbe1bfab760d664f196c1392ad5c0ff780bea43c3b12081"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.Balancer (cognitive 32): proxy.Balancer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, loops 2, boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 74). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/proxy.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"0446f486751b653cc1668f54a254f26a53fd4627a47d4a585441afc5a5727eaf"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.genericParseType (cognitive 31): fiber.genericParseType has cognitive complexity 31 (threshold 15). Drivers by points: if/else 30, match/switch 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":"helpers.go"},"region":{"startLine":1311}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dcc599f112d8384d26a2d01fc56c717b30e61de8913b19378df650fa89552f8"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultCtx.Charset (cognitive 31): DefaultCtx.Charset has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15, match/switch 7, boolean chains 5, loops 3, 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":"req.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"f23c108c624b56a4979a852d9902bc2efc52153d7b937b20146833211bc39509"}},{"ruleId":"D2","level":"warning","message":{"text":"static.sanitizePath (cognitive 31): static.sanitizePath has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, boolean chains 7 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/static/static.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ecf16980dc022e22f1b317b2bdb024410c54d8d5f407c8f7481c75a9a18906"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.normalizeContentTypeMediaType (cognitive 30): fiber.normalizeContentTypeMediaType has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12, loops 10, boolean chains 8 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"helpers.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2592b88947071a37f3d9cac79d85336594e7a880633e441b0b05336a8fdb32c"}},{"ruleId":"D2","level":"warning","message":{"text":"App.startupMessage (cognitive 30): App.startupMessage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20, boolean chains 5, loops 5 (nesting depth added 7). Of this number, 29 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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":"listen.go"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71fdb6a06b290d7c83c5ff59114f29b8bd52e9f79c6d0012a91808b2fccb9a0"}},{"ruleId":"D2","level":"warning","message":{"text":"CookieJar.cookiesForRequest (cognitive 29): CookieJar.cookiesForRequest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 4, boolean chains 3 (nesting depth added 13). Of this number, 27 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/cookiejar.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"952b674d9986e0834a571d6709fcff1c077ea4074466070a254ad4639071a260"}},{"ruleId":"D2","level":"warning","message":{"text":"keyauth.configDefault (cognitive 29): keyauth.configDefault has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, boolean chains 4, loops 2, match/switch 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/keyauth/config.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"aef69debd9c3dd84f86882b1075078be7361c7e074f11b370cf32fd01e0a3d5e"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.defaultLoggerInstance (cognitive 29): logger.defaultLoggerInstance has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20, loops 8, boolean chains 1 (nesting depth added 14). Of this number, 17 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/logger/default_logger.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"583206b20d7c03ecd1a18d6d553d79c971c1ade66df8460e4692b36fb578e941"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.addParameterMetaInfo (cognitive 28): fiber.addParameterMetaInfo has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"path.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"925379bd8fc6f9640d4047420edaa27a2a1bf7ee3d0bf76cc9f86fb570a4958b"}},{"ruleId":"D2","level":"warning","message":{"text":"App.Listen (cognitive 28): App.Listen has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 4, match/switch 2 (nesting depth added 10). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"listen.go"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cae26a57ff3343e950dc2d06eb5462789f0c3e5bcd8cf0f34cf21c5a8ecb2ce"}},{"ruleId":"D2","level":"warning","message":{"text":"App.buildTree (cognitive 28): App.buildTree has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13, loops 13, 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":"router.go"},"region":{"startLine":1172}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e005d50301b009448594b66cbdea9c57d2b6502277f7d35a986f2d3c3f2d64"}},{"ruleId":"D2","level":"warning","message":{"text":"encryptcookie.New (cognitive 28): encryptcookie.New has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 8, boolean chains 1 (nesting depth added 14). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 17). 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":"middleware/encryptcookie/encryptcookie.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"f62b655ca01b3f16c3b70c8d383438b5b4efccf31c6ab4947b8c2b7e1ee57a5a"}},{"ruleId":"D2","level":"warning","message":{"text":"SlidingWindow.New (cognitive 28): SlidingWindow.New has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, boolean chains 7 (nesting depth added 8). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to one function literal inside it that branches (line 33). 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":"middleware/limiter/limiter_sliding.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f650a55708082c7b358993c3f09046307b369a7ab86d4d0cc3fff28480b43e6"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.canFastJoinPath (cognitive 28): proxy.canFastJoinPath has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, boolean chains 7, match/switch 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/security.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"158955f803d62f6a35a5e04921306ef222cd68cf1f557e12b18f96cf568680a4"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultReq.Fresh (cognitive 28): DefaultReq.Fresh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"req.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"621eacbacfa7f6fba7470f9cc215c91b45b96a30c76c42770e1b9cf6c45cda93"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultReq.extractIPFromHeader (cognitive 27): DefaultReq.extractIPFromHeader has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, loops 8, 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":"req.go"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"46e50307f81d182e34e704e8eb835040b8000ecc755eb66b8ca0417e73f0292e"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultRes.Render (cognitive 27): DefaultRes.Render has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 1 (nesting depth added 14). Of this number, 23 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":"res.go"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64fbece98d3ba4c061073ab50797cc801ee2277a213d8d4bf6772061fd6dcb8"}},{"ruleId":"D2","level":"warning","message":{"text":"domainMatcher.match (cognitive 26): domainMatcher.match has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 5, loops 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"domain.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f322cc444ebdc4a7c5b5eb627f0192906b8644db5f04c54edc4955a31fb6590"}},{"ruleId":"D2","level":"warning","message":{"text":"favicon.New (cognitive 26): favicon.New has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 2 (nesting depth added 10). Of this number, 17 points are the body\u0027s own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/favicon/favicon.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a80f172256ac1ba63e58421a700f9ceee927f18370c8f442ae3775ad89d99af"}},{"ruleId":"D2","level":"warning","message":{"text":"Route.match (cognitive 26): Route.match has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, boolean chains 7 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2f6ee85093f942d6baca1226b9f97d0512d1d283d12bff1f4da85e8f402bf0"}},{"ruleId":"D2","level":"warning","message":{"text":"App.resolveSkip (cognitive 25): App.resolveSkip has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 4, 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":"router_skip.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"d72a16f063e24a17ea6f02777ddec0e6f2a77b5cc1b57ed8d420022f80476d63"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.appendCanonicalQueryString (cognitive 25): cache.appendCanonicalQueryString has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 6, 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":"middleware/cache/keygen.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a87c437cb42151ac6f3406b43cf9ebc9e83524fc1c31ebed6e69a332e3e613"}},{"ruleId":"D2","level":"warning","message":{"text":"helmet.New (cognitive 25): helmet.New has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 32). 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":"middleware/helmet/helmet.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"abf0ce345b92c20308618c2cea82e97c5d5a81ddbed3b572a2f89cb417b107f9"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.getBindingPrecedence (cognitive 24): fiber.getBindingPrecedence has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 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":"bind.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"236bcf6fbb007f4a512c01a476cad0a0d254c94e8359198291a324b2721f6ec9"}},{"ruleId":"D2","level":"warning","message":{"text":"CookieJar.setByHostAndPath (cognitive 24): CookieJar.setByHostAndPath has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 12). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/cookiejar.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"58deb8c035a20a8151a2c5c3965499029c4ac2349b48526fd972c51433604a05"}},{"ruleId":"D2","level":"warning","message":{"text":"basicauth.New (cognitive 24): basicauth.New has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 4 (nesting depth added 2). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/basicauth/basicauth.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da74a62e7d77a2426c910f51de034e7f03ff741aa917f2c4cd9f94c486238b9"}},{"ruleId":"D2","level":"warning","message":{"text":"FixedWindow.New (cognitive 24): FixedWindow.New has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 31). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/limiter/limiter_fixed.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d29819f9c8cab1e7f84ddeb08a876c5448bed711809d158851582338d4e331"}},{"ruleId":"D2","level":"warning","message":{"text":"logger.New (cognitive 24): logger.New has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 3, boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 91). 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":"middleware/logger/logger.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a6089ada392e1ef6764ee58b8ef5f51b3ca8e345458d77be450d0ae9bf1489e"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.New (cognitive 22): fiber.New has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, loops 2. Of this number, 21 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app.go"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"45c77b86cc633dc4721931cd2b3e5f9a3760366e4d8c7fcb2b9087422ed92f62"}},{"ruleId":"D2","level":"warning","message":{"text":"App.deleteRoute (cognitive 22): App.deleteRoute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b7f38ea0f7d17ef661bc3372f2fa1b661a7c5caec2e4175a931f9ae081ace77"}},{"ruleId":"D2","level":"warning","message":{"text":"Storage.gc (cognitive 22): Storage.gc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, loops 7, boolean chains 2, match/switch 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/memory/memory.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b2a701bfe7a850f3a1a29413d4dbbc3d78c62a2200e42f891b41ae4a6816348"}},{"ruleId":"D2","level":"warning","message":{"text":"hostauthorization.isValidHostSyntax (cognitive 22): hostauthorization.isValidHostSyntax has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 6, 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":"middleware/hostauthorization/hostauthorization.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21c095a049b850fd3ddaa98fa1a909dc40915795d27c94334a338bb47b67e44"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultReq.extractIPsFromHeader (cognitive 22): DefaultReq.extractIPsFromHeader has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 7, if/else 7, loops 5, match/switch 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"req.go"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d285d3992f9ff15ae95d03fe85babd9ff8e327d8377adc600f1486e766422d3"}},{"ruleId":"D2","level":"warning","message":{"text":"App.register (cognitive 21): App.register has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec13a5236ffba6be38ea8a522351cc1663365a5637e808c8f7b44229eab2a27b"}},{"ruleId":"D2","level":"warning","message":{"text":"Bind.All (cognitive 21): Bind.All has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 3, match/switch 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"bind.go"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"60062cceb8f624fc455ca327af43e8f501368352e36a8409a2a9c9267ec83b7b"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.joinUpstreamPath (cognitive 21): proxy.joinUpstreamPath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/security.go"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea2fad74ccfbd17945acb50312b2a0de106260a40f5537a4f13243da05a4074"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultRes.Format (cognitive 21): DefaultRes.Format has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, 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":"res.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f93ef4307ce5107f700585a610ce3cc8f4ba73b74069f5832c138a4b99290f8"}},{"ruleId":"D2","level":"warning","message":{"text":"App.processSubAppsRoutes (cognitive 20): App.processSubAppsRoutes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, loops 7, 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":"mount.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"325f3c51cb16b5699e4138772ecfe3d09d677f13ac4063efb4b208b24c1d30ab"}},{"ruleId":"D2","level":"warning","message":{"text":"core.execFunc (cognitive 20): core.execFunc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 4, match/switch 3 (nesting depth added 4). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 56, 130). 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":"client/core.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"902a64d8bb7c6863d6a9b2dad763f24ee6a82248a37bfb44150535bba1dde5ac"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultReq.isTrustedProxyIP (cognitive 20): DefaultReq.isTrustedProxyIP has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"req.go"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d1d7b326fa548639bfedf202f045bde1022aa70678a2517c51b9c659f39aa7"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.acceptsLanguageOfferExtended (cognitive 19): fiber.acceptsLanguageOfferExtended has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"helpers.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"1faa97dc93c378e5009b43a2cc85fc0c424fae089a34471bb5d909262495cadb"}},{"ruleId":"D2","level":"warning","message":{"text":"binder.parseParamSquareBrackets (cognitive 19): binder.parseParamSquareBrackets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder/mapping.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"c67b2988dbe56f450095e6ff40579c5145f1888bdf0c8aef16a15ddca58ab2d4"}},{"ruleId":"D2","level":"warning","message":{"text":"CookieJar.ensureHostCapacityLocked (cognitive 19): CookieJar.ensureHostCapacityLocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 3 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/cookiejar.go"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"6801916b66a1da37578ec35cc3ebb9a1c9fafd1990ba2a14b9047e98d2b6c602"}},{"ruleId":"D2","level":"warning","message":{"text":"adaptor.resolveRemoteAddr (cognitive 19): adaptor.resolveRemoteAddr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, 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":"middleware/adaptor/adaptor.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e6b978606b7751b5bc4beb7eaaafd66287413cc30fa29dfef22749853613ce6"}},{"ruleId":"D2","level":"warning","message":{"text":"binder.parseToMap (cognitive 18): binder.parseToMap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, loops 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder/mapping.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1dade80fcd8d7ec0e2362641b379050a4f0cb900640ff3db2feb288743b2818"}},{"ruleId":"D2","level":"warning","message":{"text":"client.doRedirectsWithClient (cognitive 18): client.doRedirectsWithClient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/transport.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"80b8ac2f6c81d02f6ab91057e716d90254f4cc7b0e5accb0d3bc23ee6f891bc5"}},{"ruleId":"D2","level":"warning","message":{"text":"basicauth.parseHashedPassword (cognitive 18): basicauth.parseHashedPassword has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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":"middleware/basicauth/config.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"c42521c650e12efafa55be99d889ab4df7335875d58b3cf4bc2c3fdb97d6bc55"}},{"ruleId":"D2","level":"warning","message":{"text":"proxy.followRedirects (cognitive 18): proxy.followRedirects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/proxy.go"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"33817982e44cab614f08fc402e359aa8312286049052ba24a6524fcd65ed936c"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultReq.Scheme (cognitive 18): DefaultReq.Scheme has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"req.go"},"region":{"startLine":1029}}}],"partialFingerprints":{"codehealthFindingId/v1":"75fed7add14578f18177411dc8cce4402c8bd119fa4f8aa4ac96130e7e481c38"}},{"ruleId":"D2","level":"warning","message":{"text":"App.ensureAutoHeadRoutesLocked (cognitive 17): App.ensureAutoHeadRoutesLocked has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":1096}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c20abf620499cfd8c43ea9aa30dc9bc29e267d3b58e0006745ba2b90bea6868"}},{"ruleId":"D2","level":"warning","message":{"text":"Response.Save (cognitive 17): Response.Save has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"client/response.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4eca206f31d0f9d395c83d0b6d64486f28e6b10fbf5e73976654a1568b4caab"}},{"ruleId":"D2","level":"warning","message":{"text":"adaptor.CopyContextToFiberContext (cognitive 17): adaptor.CopyContextToFiberContext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/adaptor/adaptor.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c16b145d01e3c727f9f81062797ddad6b5cc36bcb26d94b09277c9e573b1a4"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.hasDirective (cognitive 17): cache.hasDirective has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/cache/cachecontrol.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"46eeb6295ea79a178fdf9eb02b7d0b7c8d321c48f3e43b941ccc5c46602a88c6"}},{"ruleId":"D2","level":"warning","message":{"text":"fiber.RoutePatternMatch (cognitive 16): fiber.RoutePatternMatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"path.go"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"886ee2cdb41a4b76b7606367f692113442346c11cf6933aaad9a3c37c266f9be"}},{"ruleId":"D2","level":"warning","message":{"text":"binder.formatBindData (cognitive 16): binder.formatBindData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder/mapping.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"1348c0d6eba35297fd01fb6b1423c182fa5d8a27616444dd1453a02f59e17b0b"}},{"ruleId":"D2","level":"warning","message":{"text":"client.setConfigToRequest (cognitive 16): client.setConfigToRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/client.go"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d668d9687b9fa32fc00dfa5438c384ee5c2b190ad143fbe5a6b05b13a19a0cd"}},{"ruleId":"D2","level":"warning","message":{"text":"client.writeMultipartBody (cognitive 16): client.writeMultipartBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, 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":"client/hooks.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e735a7faa27db50b0f129e7268235eba208212f0eef045c1d2d97c77348a89"}},{"ruleId":"D2","level":"warning","message":{"text":"defaultLogger.privateLogw (cognitive 16): defaultLogger.privateLogw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, match/switch 3, loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"log/default.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f7fb6deb877aaf25bb967f9674dd764e85cb13c6af7f4696cec273a8808573c"}},{"ruleId":"D2","level":"warning","message":{"text":"basicauth.configDefault (cognitive 16): basicauth.configDefault has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, match/switch 1 (nesting depth added 3). Of this number, 11 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/basicauth/config.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"b27ebe393de202a38a26544adf2600fa4ab629f4e4dbe6107eb93a7d36675b7b"}},{"ruleId":"D2","level":"warning","message":{"text":"Session.getExtractorInfo (cognitive 16): Session.getExtractorInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 2, loops 2, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/session/session.go"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"9903f3ed37a007011a472e3c26dcc752412dddaa98d1070c5f3f3f0b0e746f72"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.getSession (cognitive 16): Store.getSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/session/store.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4f56ffa6950ee797c35e9257c423049dc9c5b41abb4bc849b4bdae02b16533"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: App: TooManyMethods \u2014 102 methods, declared across 9 files: ./app.go (46), ./router.go (18), ./listen.go (8), ./services.go (8), \u002B5 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"e455e4b9503517bb8602101adbbdfb9f60c58906638b0eeecaa37d9fe491a3db"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Client: TooManyMethods \u2014 83 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":"client/client.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a2e76c2a7dcf3d8fbd21d22ccafe8ed505e33166ed0fddcf2b175e4239c688d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultCtx: TooManyMethods \u2014 83 methods, declared across 2 files: ./ctx.go (68), ./req.go (15). 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":"ctx.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"af84b302d40cb425656a8c92f548adc6fcd91d37be00daa83db00028d4fcb9e1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Request: TooManyMethods \u2014 78 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":"client/request.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"78de6fc01225ebd7b1a42a47af71f3296d5f5d43b384f4151513ed9539911171"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./helpers.go: FileTooLong \u2014 763 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":"helpers.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffee36fc7b0fc8098c7289484b50169e37e8b9ce9607fc264c4cceb65eb7f77f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultRes: TooManyMethods \u2014 43 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":"res.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab448b4d3fdfbf542584e59743bb0d72c40a0e7bffc2635115729f20e36ed6f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./app.go: FileTooLong \u2014 689 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":"app.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9947ac75d39e9e932bbb9f3fd4cac9b34da85cae21e03da2c4a3f493d1f81dd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./router.go: FileTooLong \u2014 627 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":"router.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad336ba4f3085f5650bf8473d3d7e24bf468750ed1e52ab3195ebb3dd68ddc67"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./res.go: FileTooLong \u2014 623 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":"res.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b0d9b460639358cfcd404355ee90294667e72d07137c7f741197a0ba78cecc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: client/request.go: FileTooLong \u2014 574 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":"client/request.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c8c092011139841f126d45a5cbf818842d160be82387c9aa24fb5ce24e44d9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: client/client.go: FileTooLong \u2014 569 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":"client/client.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fababc5fba048dc902b2ea43ce6490bb3da46452964fee0c01c7c32cd17a1e8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cache/cache.go: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: New (100-897). 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":"middleware/cache/cache.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a4ba9e16d0e770e536dca75911bb28e011f4220ef2712038479decafafd3d3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SharedState: TooManyMethods \u2014 31 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"shared_state.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c0d571a5e189a22ebcd13912b474c31e0b61b82d35bf3b378e659ece9d49996"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: State: TooManyMethods \u2014 31 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"state.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"82e0858fc7ede3f7b2e75138a337b6811649267dcf66f8ee2f490e3491df197f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): middleware/limiter/limiter_fixed.go:85-108 | middleware/limiter/limiter_sliding.go:93-116 \u2014 before extracting anything, compare \u0060middleware/limiter/limiter_fixed.go\u0060 and \u0060middleware/limiter/limiter_sliding.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060middleware/limiter/limiter_fixed.go:85\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/limiter/limiter_fixed.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7273df9cf2cd2ccfffcf9afb860665a513c4693cca3d4f3b5bbefb41d34dff6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): router.go:473-496 | router.go:606-629 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060router.go:473\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"15048eeb0c83eacc1b3d5faa6bfc51598613151ebe774185c693ac7ccf40a563"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): middleware/limiter/limiter_fixed.go:16-36 | middleware/limiter/limiter_sliding.go:18-38 \u2014 before extracting anything, compare \u0060middleware/limiter/limiter_fixed.go\u0060 and \u0060middleware/limiter/limiter_sliding.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060middleware/limiter/limiter_fixed.go:16\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/limiter/limiter_fixed.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"be558d498123733579874d2efcf7702fcbb85c13ea5406e551c77ada6cc51b4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): router.go:555-575 | router.go:686-706 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060router.go:555\u0060 it begins part-way through the construct above it, so those exact 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":"router.go"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1cabc9bfccd5fd3f082b71dbcf9a72079c72841705d1c2257757fef723964d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): middleware/cors/utils.go:74-91 | middleware/csrf/helpers.go:98-115 \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 \u0060middleware/cors/utils.go:74\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/cors/utils.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"a27f1510974e7e79ddfda1247ef0077aed807240a67aef44048bcdda904e599d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): app.go:1037-1051 | group.go:79-93 \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 \u0060app.go:1037\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app.go"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f75d8edf9fb11fd7c0d2cdee1594b1ac833d9708881d674ce71552a29654196"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): shared_state.go:101-114 | shared_state.go:320-333 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060shared_state.go:101\u0060 it begins part-way through the construct above it, so those exact 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":"shared_state.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"181d79351fa47ba4ae4f4264aa59e4ce2d88e4448e64899b5c6a62bd0d2b6f19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): listen.go:281-293 | listen.go:337-349 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060listen.go:281\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"listen.go"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"1041fb26aaa35e0962fddd415bc93faa118a004cd0194f25ef33a6e0dc023875"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): middleware/cors/utils.go:17-33 | middleware/csrf/helpers.go:37-49 \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 \u0060middleware/cors/utils.go:17\u0060 it begins part-way through the construct above it, so those exact 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":"middleware/cors/utils.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c5f3fbcefbca5242578b93ce452ff84991ffa87088ce5bd1223602b4258a88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): middleware/cache/utils.go:148-160 | middleware/cache/vary.go:67-80 \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 \u0060middleware/cache/utils.go:148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/cache/utils.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09f33d0286965bd153d2b5b4b21b6dfe4a5133f91b7ef3ddbba27c152141610"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): middleware/redirect/redirect.go:18-31 | middleware/rewrite/rewrite.go:17-28 \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 \u0060middleware/redirect/redirect.go:18\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/redirect/redirect.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec2bcac7502ac57442f36c65239a8ac36f3e39262da4299afac446322381dd04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): client/cookiejar.go:301-310 | client/cookiejar.go:517-526 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/cookiejar.go:301\u0060 it does not close everything it opens, so those exact 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":"client/cookiejar.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"38030a5c9214bdd3818afff81cbd089967ae4b41390493644f18e032d1286600"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): domain.go:449-463 | mount.go:88-97 \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 \u0060domain.go:449\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"domain.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc7f41e99913a4720a6ed2cf61498afb3aaccb17e5b3ac6108946ab71a70bc76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): router_skip.go:254-263 | router_skip.go:269-278 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060router_skip.go:254\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"router_skip.go"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc2574357665a6c3df921550bc071afa6bba57cd694614a700abaa03b56acd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): client/request.go:242-250 | client/request.go:481-489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/request.go:242\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/request.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ab26aefc252c2fca2bc49fcc2bab2c34fed85bb9118591050e152db5bc8c460"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): constraint.go:418-426 | constraint.go:507-515 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060constraint.go:418\u0060 it begins part-way through the construct above it, so those exact 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":"constraint.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d7752a4e729546ec1af5b70e6014080daccf35d68d5f61d3852fb96aef20f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): middleware/limiter/limiter_fixed.go:137-145 | middleware/limiter/limiter_sliding.go:152-160 \u2014 before extracting anything, compare \u0060middleware/limiter/limiter_fixed.go\u0060 and \u0060middleware/limiter/limiter_sliding.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060middleware/limiter/limiter_fixed.go:137\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/limiter/limiter_fixed.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd448f8e15c54d08ad21d8c045fee97829c58cfd80cde5cbd397ab934d6ccfba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): middleware/proxy/security.go:431-439 | middleware/proxy/security.go:534-542 \u2014 both copies are in the same file, so extract the block 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":"middleware/proxy/security.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0be0556ff2e1c92f19e4fc04ee7d76fc8647fc444d698f8bce1f99638420c1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): middleware/redirect/redirect.go:54-62 | middleware/rewrite/rewrite.go:45-53 \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 \u0060middleware/redirect/redirect.go:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/redirect/redirect.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"c89a62495318433f8f3799b08e34bd89da728eb5372cee1d30bcb12c4bb8d4d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): binder/cookie.go:24-31 | binder/header.go:24-31 | binder/resp_header.go:24-31 \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 \u0060binder/cookie.go:24\u0060 it begins part-way through the construct above it, so those exact 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":"binder/cookie.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"44551d367d697e263f158b2be230b4d32cbf296d8c0bc5d49e4105bff0c6ef1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): binder/form.go:54-61 | binder/query.go:25-32 \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 \u0060binder/form.go:54\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"binder/form.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a60a923abb2c4abdae23cfec7bbff905040b318f8f98b9f47e126f4e916dc45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/cookiejar.go:167-175 | client/cookiejar.go:207-214 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/cookiejar.go:167\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/cookiejar.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"bae5cbdb4b62405b8e99c736480025029f7bb352385d4f553e3aa6781d7b0e6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): client/cookiejar.go:619-627 | client/cookiejar.go:664-671 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060client/cookiejar.go:619\u0060 it does not close everything it opens, so those exact 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":"client/cookiejar.go"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"76ea3a42ce6a95ec0f7e931a775403823d620718d24aeb981a45f55e53144723"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/tlstest/tls.go:24-31 | internal/tlstest/tls.go:72-79 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tlstest/tls.go:24\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tlstest/tls.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"9da0010bbf5305f72d261f56783554482b8b121d9df4e35521147a19937adb4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): req.go:577-582 | res.go:555-560 \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":"req.go"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"578e564f1c79406fa0784e74a8dacc4c020100c4d2605fedb620d5095705abdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): client/transport.go:341-345 | middleware/proxy/proxy.go:446-450 \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 \u0060client/transport.go:341\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"client/transport.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"641089a9643303e74a22555f17f6d5825d02587152595a580a8838559963c981"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): middleware/proxy/proxy.go:590-594 | middleware/proxy/proxy.go:649-653 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060middleware/proxy/proxy.go:590\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/proxy.go"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"d25940f38bdf2d73cfc7169b64b8d8370173a05320cf11e2bd030b25a44bfc78"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/cache/cache.go: middleware/cache/cache.go changed 23 times in last 90 days, max complexity 183. 10 of those changes were fix/bug commits, and the other 13 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/cache/cache.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c81a166e8b6995200ed84e0ff36de4ce3c0411acef581091a96f85c96650226d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: app.go: app.go changed 44 times in last 90 days, max complexity 27. 21 of those changes were fix/bug commits, and the other 23 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":"app.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64c396938487dcb0dca00b166fa5247a1852588e48a1ff427e1b7137261d914"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: router.go: router.go changed 37 times in last 90 days, max complexity 27. 12 of those changes were fix/bug commits, and the other 25 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":"router.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ad3ddd18d2600d06990329eef318476d6e3ff1a0d26470f3a328f6d761214c4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: helpers.go: helpers.go changed 27 times in last 90 days, max complexity 33. 17 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":"helpers.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f644d08e1f8de219a481c6ce17d6a84a4fe78b08a323cae33c5fbb24517dd2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: path.go: path.go changed 27 times in last 90 days, max complexity 31. 11 of those changes were fix/bug commits, and the other 16 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":"path.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"adcdcdd40b8cc5e9f46ff628735dcb175e7067667001dfee7b285583f5eef3b1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: res.go: res.go changed 19 times in last 90 days, max complexity 31. 14 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":"res.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a2232660399db8792ae3753b6d78bab6eb464aa8e448d07762c8e3d16a2f046"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/proxy/proxy.go: middleware/proxy/proxy.go changed 31 times in last 90 days, max complexity 18. 13 of those changes were fix/bug commits, and the other 18 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/proxy.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4066bdf79f4a54a5c02c0716b76ee3924a6bc0065858c76e3113aa568406fcec"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/proxy/security.go: middleware/proxy/security.go changed 24 times in last 90 days, max complexity 23. 10 of those changes were fix/bug commits, and the other 14 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/proxy/security.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbbc81c454dac2fbea6d92c69f6cbfbbf31f10feddc8adc11d47ae4b0f3a2e6f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: client/cookiejar.go: client/cookiejar.go changed 26 times in last 90 days, max complexity 16. 15 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":"client/cookiejar.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0db3e192f4d725830c8e9860a6ae7a835887183b7c722e3f35e51a1a626a9f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: middleware/static/static.go: middleware/static/static.go changed 10 times in last 90 days, max complexity 39. 5 of those changes were fix/bug commits, and the other 5 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"middleware/static/static.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c96e1e5e490a88ec04262006adea5b52d10bb3aa1490ca0655e76e0d735dd949"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: internal/logtemplate/template.go, middleware/cache/vary.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3c40a2e23bca492446b28fa4c901ff060ac238030b3be8bb3c27afe20dc0ba69"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (4 single-owned of 101 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D19","level":"note","message":{"text":"The Ecosystem landing page links to the FiberLandscape component but does not describe how the core module\u0027s template engines, contrib middleware, storage drivers, and other packages fit together in detail for new readers.: Add a short \u0027Getting Started\u0027 section that maps out the main ecosystem components (template engines, contrib middleware) with a link to the FiberLandscape map."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/ecosystem.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44834f539bb721c2bba6410a10555cf1a5d137b6664ce29d7fc6e42eae48487"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0b1f6aa47ac6ed1dacadb7de87eb4e266117eb64a4491f34acd7cfe7d91bb17e"},"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":"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":"157582022435e0f50c708605bdb4595f9f657144edc10f087a635e6fcfca1a8a"},"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":"4d398d2230417a8d2d608f4bbdf96fe951b85951ae0c11d180f0a54c643e0843"},"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":"12143bbffd5917a69044161ecf825c10448a8c1b7288c12ce26e24b7e39d006d"},"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":"7f7bb0ea50476e23d6a5d82d96c6fef6f5a7238303698ba0327ccaeba7d46ab9"},"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":"50615ffe2f4e1efb6a58cfe55b9872acf09fb7457b029c6edb258b738f5b6f72"},"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":"2678f6cae1342cb63e9f42903643a28affd5fa73989fc4a818f487558c9e2d44"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 3 of 101 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/tlstest/tls.go, middleware/idempotency/config.go, middleware/cache/heap.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":"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":"c76cd594d95c82d3166e9658a97474ee2bdbe734d20885458c4fb38b9362f104"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"50c379534161bb30611d421e82af3666b891a67b9a6a35df5a4fc4b4977e653b"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"626e01eacf94c3b3382809ff8a91277880813d4497b12c2cdcf28b0d8c94458b"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-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-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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":15,"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."]}]}