Files
codeql/python/ql/test/library-tests/regex/Consistency.ql
Rasmus Lerchedahl Petersen 34b054ff53 Python: Add consistency checks
2021-08-11 14:58:27 +02:00

13 lines
287 B
Plaintext

/**
* Flags regular expressions that are parsed ambigously
*/
import python
import semmle.python.regex
from string str, Location loc, int counter
where
counter = strictcount(Regex term | term.getLocation() = loc and term.getText() = str) and
counter > 1
select str, counter, loc