File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
ql/ql/src/codeql_ql/ast/internal Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -388,9 +388,19 @@ module ModConsistency {
388388 not exists ( mod .asModule ( ) .getAlias ( ) )
389389 ) >= 2 and
390390 // paramerized modules are not treated nicely, so we ignore them here.
391- not i .getResolvedModule ( ) .getEnclosing * ( ) .asModule ( ) .hasParameter ( _, _, _)
391+ not i .getResolvedModule ( ) .getEnclosing * ( ) .asModule ( ) .hasParameter ( _, _, _) and
392+ not i .getLocation ( )
393+ .getFile ( )
394+ .getAbsolutePath ( )
395+ .regexpMatch ( ".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*" )
392396 }
393397
394398 // not a query predicate, because this fails when running qltests, but it passes on the real thing (so it's used in EmptyConsistencies.ql)
395- predicate noResolve ( Import i ) { not exists ( i .getResolvedModule ( ) ) }
399+ predicate noResolve ( Import i ) {
400+ not exists ( i .getResolvedModule ( ) ) and
401+ not i .getLocation ( )
402+ .getFile ( )
403+ .getAbsolutePath ( )
404+ .regexpMatch ( ".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*" )
405+ }
396406}
You can’t perform that action at this time.
0 commit comments