Skip to content

Commit 5390fae

Browse files
committed
Ruby: add query for measuring call graph
1 parent c7c97d5 commit 5390fae

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ruby/ql/src/queries/meta/CallGraph.ql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @name Call graph
3+
* @description An edge in the call graph.
4+
* @kind problem
5+
* @problem.severity recommendation
6+
* @id rb/meta/call-graph
7+
* @tags meta
8+
* @precision very-low
9+
*/
10+
11+
import codeql.ruby.AST
12+
13+
from Call invoke, Callable f
14+
where invoke.getATarget() = f
15+
select invoke, "Call to $@", f, f.toString()

0 commit comments

Comments
 (0)