Repository navigation
fix: resolve SonarQube findings - #48
Merged
Merged
Conversation
- trim trailing slashes with a linear scan instead of a backtracking regex - mark fire-and-forget analytics and queue cleanup promises with void - hoist the landing page default limits into a constant - install CI dependencies with --ignore-scripts
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes the open SonarQube issues on main.
What
/\/+$/on the request path (routing, access log) and the operator URL is replaced bytrimTrailingSlashes()inutil.ts, a linear scan. Same output, no quadratic work on paths with long runs of slashes.phCapture/phExceptioncalls and the Node queue'srun.finally(...)cleanup are marked withvoid. No behavior change: with an execution context these calls already hand the work towaitUntil.landingPage()uses aDEFAULT_LIMITSconstant.npm ci --ignore-scripts. No dependency needs its install script for typecheck, tests or builds.Two findings were triaged in SonarQube as false positives: MD5 in the Node storage emulation (R2-compatible ETag only) and the mandate error log (structured Workers log argument).
How to test
npm ci --ignore-scripts; npm run check(typecheck, 125 tests incl. newtrimTrailingSlashestests, both builds).No migrations or deploy config changes.