-
Notifications
You must be signed in to change notification settings - Fork 59
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
dynamic rules: @fliter capturing any pattern not only variable #1249
base: master
Are you sure you want to change the base?
Conversation
37d0238
to
0e9a399
Compare
@@ -558,3 +558,37 @@ func (p *parser) checkForVariableInPattern(name string, pattern ir.Node, verifie | |||
|
|||
return found | |||
} | |||
|
|||
func (p *parser) filterByPattern(name string, pattern ir.Node, verifiedVars map[string]struct{}) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the tests? It's a very fragile place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/tests/rules/rules_test.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's missing is a test that checks that the filter is type-aware.
// var
callFunc($name);
// str
callFunc("name");
No description provided.