-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(no_invalid_regexp): expand invalid case #1302
Open
Colt45s
wants to merge
3
commits into
denoland:main
Choose a base branch
from
Colt45s:fix/no_invalid_regexp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Colt45s
force-pushed
the
fix/no_invalid_regexp
branch
from
July 28, 2024 14:24
64690a8
to
05f713d
Compare
Colt45s
force-pushed
the
fix/no_invalid_regexp
branch
from
July 28, 2024 15:31
05f713d
to
c569185
Compare
The fix doesn't cover these cases. class C extends RegExp {
constructor() {
super(/+/); // there should be warnings on this line…
}
}
new C();
new function () {
return /+/; // …and on this line.
}; |
Thank you! I'll try 😃 |
Colt45s
force-pushed
the
fix/no_invalid_regexp
branch
from
August 3, 2024 17:08
c569185
to
4283beb
Compare
Colt45s
force-pushed
the
fix/no_invalid_regexp
branch
from
August 3, 2024 17:22
4283beb
to
60b1f9b
Compare
Fixed. |
Colt45s
changed the title
fix(no_invalid_regexp): support inside function calls
fix(no_invalid_regexp): expand invalid case
Aug 3, 2024
Can anyone review this? |
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 #1269
To understand the issue better, I first modified the code to include debug output for inspecting the AST. Specifically, I added the following debug statement to the handle_call_or_new_expr function:
By examining the printed AST output, I thought checking for nested AST might be needed.
I ran lint on the following code snippet.
println
output: