Files
codeql/python/ql/examples/snippets/mutualrecursion.ql
Taus 2732a652ab Python: Fix example snippets
One might argue that these should be rewritten entirely to use more
modern APIs, but for now I'll be content with just having them compile
properly.
2025-11-26 12:30:30 +00:00

15 lines
323 B
Plaintext

/**
* @id py/examples/mutualrecursion
* @name Mutual recursion
* @description Finds pairs of functions that call each other
* @tags method
* recursion
*/
import python
private import LegacyPointsTo
from FunctionObject m, FunctionObject n
where m != n and m.getACallee() = n and n.getACallee() = m
select m, n