mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
changes based on Python review
This commit is contained in:
@@ -245,15 +245,11 @@ module Make<RegexTreeViewSig TreeImpl, HostnameRegexpSig<TreeImpl> Specific> {
|
||||
term.isRootTerm()
|
||||
or
|
||||
exists(RegExpTerm parent |
|
||||
term = getLastChild(parent) and
|
||||
term = parent.getLastChild() and
|
||||
isRightArmTerm(parent)
|
||||
)
|
||||
}
|
||||
|
||||
private RegExpTerm getLastChild(RegExpTerm parent) {
|
||||
result = max(RegExpTerm child, int i | child = parent.getChild(i) | child order by i)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `regexp` is a regular expression that is likely to match a hostname,
|
||||
* but the pattern is incomplete and may match more hosts than intended.
|
||||
|
||||
Reference in New Issue
Block a user