mirror of
https://github.com/github/codeql.git
synced 2026-02-07 18:51:06 +01:00
Add exclusions to Module consistency test
This commit is contained in:
@@ -258,12 +258,18 @@ private predicate definesModule(
|
||||
module ModConsistency {
|
||||
query predicate noResolve(Import imp) {
|
||||
not resolve(imp, _) and
|
||||
not imp.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
|
||||
not imp.getLocation()
|
||||
.getFile()
|
||||
.getAbsolutePath()
|
||||
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
}
|
||||
|
||||
query predicate noResolveModuleExpr(ModuleExpr me) {
|
||||
not resolveModuleExpr(me, _) and
|
||||
not me.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
|
||||
not me.getLocation()
|
||||
.getFile()
|
||||
.getAbsolutePath()
|
||||
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
}
|
||||
|
||||
query predicate multipleResolve(Import imp, int c, ContainerOrModule m) {
|
||||
|
||||
Reference in New Issue
Block a user