mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
WIP: Go: Add context query for retrieving call graph edges
This commit is contained in:
15
go/ql/src/CallGraph.ql
Normal file
15
go/ql/src/CallGraph.ql
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @name Call graph
|
||||
* @description Generates the call graph for the program.
|
||||
* @kind graph
|
||||
* @id go/call-graph
|
||||
*/
|
||||
|
||||
import go
|
||||
import semmle.go.dataflow.DataFlow
|
||||
|
||||
query predicate edges(CallExpr call, Function f, string key, string value) {
|
||||
call.getTarget() = f and
|
||||
key = "semmle.label" and
|
||||
value = f.getQualifiedName()
|
||||
}
|
||||
Reference in New Issue
Block a user