mirror of
https://github.com/github/codeql.git
synced 2026-02-11 20:51:06 +01:00
Autoformat
This commit is contained in:
@@ -68,8 +68,8 @@ class TBinOpExpr = TAddSubExpr or TMulDivModExpr;
|
||||
class TAggregate = TFullAggregate or TExprAggregate;
|
||||
|
||||
class TExpr =
|
||||
TBinOpExpr or TLiteral or TAggregate or TIdentifier or TInlineCast or
|
||||
TCall or TUnaryExpr or TExprAnnotation or TDontCare or TRange or TSet or TAsExpr or TSuper;
|
||||
TBinOpExpr or TLiteral or TAggregate or TIdentifier or TInlineCast or TCall or TUnaryExpr or
|
||||
TExprAnnotation or TDontCare or TRange or TSet or TAsExpr or TSuper;
|
||||
|
||||
class TCall = TPredicateCall or TMemberCall or TNoneCall or TAnyCall;
|
||||
|
||||
|
||||
@@ -234,14 +234,20 @@ 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|ql-training|recorded-call-graph-metrics)/.*")
|
||||
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|ql-training|recorded-call-graph-metrics)/.*")
|
||||
not c.getLocation()
|
||||
.getFile()
|
||||
.getAbsolutePath()
|
||||
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
}
|
||||
|
||||
query predicate multipleResolvePredicateExpr(PredicateExpr pe, int c, ClasslessPredicate p) {
|
||||
|
||||
@@ -325,7 +325,10 @@ 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|ql-training|recorded-call-graph-metrics)/.*")
|
||||
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 +339,10 @@ module TyConsistency {
|
||||
|
||||
query predicate varDefNoType(VarDef def) {
|
||||
not exists(def.getType()) and
|
||||
not def.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
not def.getLocation()
|
||||
.getFile()
|
||||
.getAbsolutePath()
|
||||
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
}
|
||||
|
||||
query predicate exprNoType(Expr e) {
|
||||
@@ -346,6 +352,9 @@ module TyConsistency {
|
||||
not exists(p.getReturnType())
|
||||
) and
|
||||
not e instanceof Formula and
|
||||
not e.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
not e.getLocation()
|
||||
.getFile()
|
||||
.getAbsolutePath()
|
||||
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import ql
|
||||
import codeql_ql.ast.internal.AstNodes
|
||||
|
||||
private class TScope =
|
||||
TClass or TFullAggregate or TExprAggregate or TQuantifier or TSelect or TPredicate or TNewTypeBranch;
|
||||
TClass or TAggregate or TQuantifier or TSelect or TPredicate or TNewTypeBranch;
|
||||
|
||||
/** A variable scope. */
|
||||
class VariableScope extends TScope, AstNode {
|
||||
|
||||
Reference in New Issue
Block a user