Fix formatter ReDoS regexes#210
Closed
Sean-Kenneth-Doherty wants to merge 1 commit into
Closed
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Collaborator
|
@Sean-Kenneth-Doherty How does this relate to #208? I don't mind AI assisted PR's, but multiple PR's fixing the same issue is confusing. |
Contributor
Author
|
Thanks, that is fair. #210 overlaps with #208 and leaving both open makes the review path confusing. This PR was a later, smaller regex-only variant with broader attack-string fixtures. I folded the useful fixture coverage and the follow-up fixes into #208 at |
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.
Summary
Fixes #187.
Verification
npm cinpm run format:checknpm run build --workspace=@pretty-ts-errors/utilsnpm run lint --workspace=@pretty-ts-errors/formatternpm test --workspace=@pretty-ts-errors/formatter(29tests)npx --yes --package @vscode/vsce npm run buildgit diff --check origin/main...HEAD && git diff --checkThe formatter test suite includes the issue-sized ReDoS stress inputs for
addMissingParenthesesand quote-heavy prettifier messages.Note: in a fresh checkout,
@pretty-ts-errors/utilsneeds to be built before running the formatter TypeScript lint so the workspace package declarations are available.