-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Ruby/Python: add meta-queries for calls to summarised callables #13299
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
Ruby/Python: add meta-queries for calls to summarised callables #13299
Conversation
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.
Ruby 👍
from DataFlow::Node useSite, SummarizedCallable target, string kind | ||
where | ||
( | ||
useSite = target.getACall() and kind = "Call" | ||
or | ||
useSite = target.getACallback() and kind = "Callback" | ||
) and | ||
not useSite.getLocation().getFile() instanceof IgnoredFile | ||
select useSite, kind + " to " + target |
Check warning
Code scanning / CodeQL
Consistent alert message
from Call invoke, SummarizedCallable f | ||
where f.getACall() = invoke or f.getACallSimple() = invoke | ||
select invoke, "Call to " + f |
Check warning
Code scanning / CodeQL
Consistent alert message
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.
Nice
I retriggered the timed-out Python test.. |
I'm running a test experiment here with these meta queries. |
Adds meta-queries which are similar to
CallGraph.ql
, except they show calls toSummarizedCallable
.