mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
20 lines
557 B
Plaintext
20 lines
557 B
Plaintext
import codeql.ruby.Regexp
|
|
|
|
query predicate nonUniqueChild(RegExpParent parent, int i, RegExpTerm child) {
|
|
child = parent.getChild(i) and
|
|
strictcount(parent.getChild(i)) > 1
|
|
}
|
|
|
|
query predicate cyclic(RegExpParent parent) { parent = parent.getAChild+() }
|
|
|
|
query predicate nonConsecutive(RegExpParent parent, int i) {
|
|
exists(parent.getChild(i)) and
|
|
i > 0 and
|
|
not exists(parent.getChild(i - 1))
|
|
}
|
|
|
|
query predicate regExpNormalNonUniqueCharValue(RegExpNormalChar term, string value) {
|
|
value = term.getValue() and
|
|
strictcount(term.getValue()) > 1
|
|
}
|