Skip to content

Commit 7a117ca

Browse files
authored
QL: Autoformat
1 parent 2fa4424 commit 7a117ca

4 files changed

Lines changed: 23 additions & 8 deletions

File tree

ql/src/codeql_ql/ast/internal/AstNodes.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ class TBinOpExpr = TAddSubExpr or TMulDivModExpr;
6868
class TAggregate = TFullAggregate or TExprAggregate;
6969

7070
class TExpr =
71-
TBinOpExpr or TLiteral or TAggregate or TIdentifier or TInlineCast or
72-
TCall or TUnaryExpr or TExprAnnotation or TDontCare or TRange or TSet or TAsExpr or TSuper;
71+
TBinOpExpr or TLiteral or TAggregate or TIdentifier or TInlineCast or TCall or TUnaryExpr or
72+
TExprAnnotation or TDontCare or TRange or TSet or TAsExpr or TSuper;
7373

7474
class TCall = TPredicateCall or TMemberCall or TNoneCall or TAnyCall;
7575

ql/src/codeql_ql/ast/internal/Predicate.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,20 @@ private class BuiltinMember extends BuiltinPredicate, TBuiltinMember {
234234
module PredConsistency {
235235
query predicate noResolvePredicateExpr(PredicateExpr pe) {
236236
not resolvePredicateExpr(pe, _) and
237-
not pe.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
237+
not pe.getLocation()
238+
.getFile()
239+
.getAbsolutePath()
240+
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
238241
}
239242

240243
query predicate noResolveCall(Call c) {
241244
not resolveCall(c, _) and
242245
not c instanceof NoneCall and
243246
not c instanceof AnyCall and
244-
not c.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
247+
not c.getLocation()
248+
.getFile()
249+
.getAbsolutePath()
250+
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
245251
}
246252

247253
query predicate multipleResolvePredicateExpr(PredicateExpr pe, int c, ClasslessPredicate p) {

ql/src/codeql_ql/ast/internal/Type.qll

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,10 @@ private predicate defines(FileOrModule m, string name, Type t, boolean public) {
325325
module TyConsistency {
326326
query predicate noResolve(TypeExpr te) {
327327
not resolveTypeExpr(te, _) and
328-
not te.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
328+
not te.getLocation()
329+
.getFile()
330+
.getAbsolutePath()
331+
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
329332
}
330333

331334
query predicate multipleResolve(TypeExpr te, int c, Type t) {
@@ -336,7 +339,10 @@ module TyConsistency {
336339

337340
query predicate varDefNoType(VarDef def) {
338341
not exists(def.getType()) and
339-
not def.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
342+
not def.getLocation()
343+
.getFile()
344+
.getAbsolutePath()
345+
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
340346
}
341347

342348
query predicate exprNoType(Expr e) {
@@ -346,6 +352,9 @@ module TyConsistency {
346352
not exists(p.getReturnType())
347353
) and
348354
not e instanceof Formula and
349-
not e.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
355+
not e.getLocation()
356+
.getFile()
357+
.getAbsolutePath()
358+
.regexpMatch(".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*")
350359
}
351360
}

ql/src/codeql_ql/ast/internal/Variable.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import ql
22
import codeql_ql.ast.internal.AstNodes
33

44
private class TScope =
5-
TClass or TFullAggregate or TExprAggregate or TQuantifier or TSelect or TPredicate or TNewTypeBranch;
5+
TClass or TAggregate or TQuantifier or TSelect or TPredicate or TNewTypeBranch;
66

77
/** A variable scope. */
88
class VariableScope extends TScope, AstNode {

0 commit comments

Comments
 (0)