-
Notifications
You must be signed in to change notification settings - Fork 42
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
How to match func called in a defer statement? #482
Comments
There are multiple
It's not a text matching, |
Its been imported from an internal library
Got it. Is this the best way to write this rule then? I was thinking if there is some way I could import the safeconc pkg in the rule and then get the func lit being called in the defer statement and see if its the same as the one I get from the pkg |
There are package-aware filters related to types that require If you have any ideas how this can be improved and/or expressed in the DSL, please do describe it. |
I have a usecase where I need to check if a Recover func is called in the defer statement in a go routine. I am currently doing this using this rule:
I am getting the safeconc.Recover func from a different package. Currently this rule is matching this func using text matching, I wanted to check if there is a better way to do that which uses the actual func in the package
The text was updated successfully, but these errors were encountered: