Exclude a few more paths from tests

This commit is contained in:
Taus
2021-06-19 11:54:50 +00:00
committed by GitHub
parent 815337dde1
commit e3a4d3074c
2 changed files with 7 additions and 6 deletions

View File

@@ -234,14 +234,14 @@ private class BuiltinMember extends BuiltinPredicate, TBuiltinMember {
module PredConsistency {
query predicate noResolvePredicateExpr(PredicateExpr pe) {
not resolvePredicateExpr(pe, _) and
not pe.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
not pe.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
}
query predicate noResolveCall(Call c) {
not resolveCall(c, _) and
not c instanceof NoneCall and
not c instanceof AnyCall and
not c.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
not c.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
}
query predicate multipleResolvePredicateExpr(PredicateExpr pe, int c, ClasslessPredicate p) {

View File

@@ -33,7 +33,7 @@ class Type extends TType {
/**
* Gets a supertype of this type. This follows the user-visible type heirarchy,
* and doesn't include internal types like thecharacteristic and domain types of classes.
* and doesn't include internal types like the characteristic and domain types of classes.
*/
Type getASuperType() { none() }
@@ -325,7 +325,7 @@ private predicate defines(FileOrModule m, string name, Type t, boolean public) {
module TyConsistency {
query predicate noResolve(TypeExpr te) {
not resolveTypeExpr(te, _) and
not te.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
not te.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
}
query predicate multipleResolve(TypeExpr te, int c, Type t) {
@@ -336,7 +336,7 @@ module TyConsistency {
query predicate varDefNoType(VarDef def) {
not exists(def.getType()) and
not def.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
not def.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
}
query predicate exprNoType(Expr e) {
@@ -345,6 +345,7 @@ module TyConsistency {
p = e.(Call).getTarget() and
not exists(p.getReturnType())
) and
not e.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
not e instanceof Formula and
not e.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
}
}