-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 write Metadata for queries to get Call Graph in JavaScript? #16587
Comments
Hi @flyboss, For queries that specify the |
Thank you for your immediate help! I find the query has three problems:
Now the query is: /**
* This is an automatically generated file
* @name MyCG
* @kind problem
* @precision high
* @problem.severity warning
* @id javascript/example/my-cg
*/
import javascript
from DataFlow::InvokeNode call, Function caller, Function callee
where caller = call.getEnclosingExpr().getEnclosingFunction()
and callee = call.getACallee()
select call, "invoke" It works. May I ask another question? Why did #9458 add |
Because the user is asking about producing at DOT file, and that requires information about nodes in addition to just the select.
It doesn't. Note that no |
The metadata tag The select statement of a Another kind is Fun facts: internally a |
I want to get a call graph in JavaScript. I have found a solution in #9458 . But when I add query metadata to the query, for example
the vscode codeql extension meets the error:
After read the guide, I guess maybe my "select" has mistakes, so I also try 'select call, "call"', but I still meet the same error.
Can anyone help me? Thank you very much!
The text was updated successfully, but these errors were encountered: