Skip to content

Commit 2515fc0

Browse files
authored
QL: Add exclusions to Module consistency test
1 parent 7a117ca commit 2515fc0

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

ql/src/codeql_ql/ast/internal/Module.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,18 @@ private predicate definesModule(
258258
module ModConsistency {
259259
query predicate noResolve(Import imp) {
260260
not resolve(imp, _) and
261-
not imp.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
261+
not imp.getLocation()
262+
.getFile()
263+
.getAbsolutePath()
264+
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
262265
}
263266

264267
query predicate noResolveModuleExpr(ModuleExpr me) {
265268
not resolveModuleExpr(me, _) and
266-
not me.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
269+
not me.getLocation()
270+
.getFile()
271+
.getAbsolutePath()
272+
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
267273
}
268274

269275
query predicate multipleResolve(Import imp, int c, ContainerOrModule m) {

0 commit comments

Comments
 (0)