mirror of
https://github.com/github/codeql.git
synced 2026-02-07 18:51:06 +01:00
Exclude a few more paths from tests
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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)/.*")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user