mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
disable consistency checks in QL tests that does not hold with the current parameterized modules implementation
This commit is contained in:
@@ -326,11 +326,14 @@ module ModConsistency {
|
||||
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
}
|
||||
|
||||
query predicate multipleResolveModuleRef(ModuleExpr me, int c, ContainerOrModule m) {
|
||||
c = strictcount(ContainerOrModule m0 | resolveModuleRef(me, m0)) and
|
||||
c > 1 and
|
||||
resolveModuleRef(me, m)
|
||||
}
|
||||
// This can happen with parameterized modules.
|
||||
/*
|
||||
* query predicate multipleResolveModuleRef(ModuleExpr me, int c, ContainerOrModule m) {
|
||||
* c = strictcount(ContainerOrModule m0 | resolveModuleRef(me, m0)) and
|
||||
* c > 1 and
|
||||
* resolveModuleRef(me, m)
|
||||
* }
|
||||
*/
|
||||
|
||||
query predicate noName(Module mod) { not exists(mod.getName()) }
|
||||
|
||||
|
||||
@@ -174,17 +174,20 @@ module PredConsistency {
|
||||
c > 1 and
|
||||
resolvePredicateExpr(pe, p)
|
||||
}
|
||||
// This can happen with parametarized modules
|
||||
/*
|
||||
* query predicate multipleResolveCall(Call call, int c, PredicateOrBuiltin p) {
|
||||
* c =
|
||||
* strictcount(PredicateOrBuiltin p0 |
|
||||
* resolveCall(call, p0) and
|
||||
* // aliases are expected to resolve to multiple.
|
||||
* not exists(p0.(ClasslessPredicate).getAlias()) and
|
||||
* // overridden predicates may have multiple targets
|
||||
* not p0.(ClassPredicate).isOverride()
|
||||
* ) and
|
||||
* c > 1 and
|
||||
* resolveCall(call, p)
|
||||
* }
|
||||
*/
|
||||
|
||||
query predicate multipleResolveCall(Call call, int c, PredicateOrBuiltin p) {
|
||||
c =
|
||||
strictcount(PredicateOrBuiltin p0 |
|
||||
resolveCall(call, p0) and
|
||||
// aliases are expected to resolve to multiple.
|
||||
not exists(p0.(ClasslessPredicate).getAlias()) and
|
||||
// overridden predicates may have multiple targets
|
||||
not p0.(ClassPredicate).isOverride()
|
||||
) and
|
||||
c > 1 and
|
||||
resolveCall(call, p)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,11 +355,14 @@ module TyConsistency {
|
||||
)
|
||||
}
|
||||
|
||||
query predicate multipleResolve(TypeExpr te, int c, Type t) {
|
||||
c = strictcount(Type t0 | resolveTypeExpr(te, t0)) and
|
||||
c > 1 and
|
||||
resolveTypeExpr(te, t)
|
||||
}
|
||||
// This can happen with parameterized modules.
|
||||
/*
|
||||
* query predicate multipleResolve(TypeExpr te, int c, Type t) {
|
||||
* c = strictcount(Type t0 | resolveTypeExpr(te, t0)) and
|
||||
* c > 1 and
|
||||
* resolveTypeExpr(te, t)
|
||||
* }
|
||||
*/
|
||||
|
||||
query predicate multiplePrimitives(TypeExpr te, int c, PrimitiveType t) {
|
||||
c = strictcount(PrimitiveType t0 | resolveTypeExpr(te, t0)) and
|
||||
|
||||
Reference in New Issue
Block a user