Skip to content

Commit 926e79d

Browse files
committed
JS: Autoformat
1 parent f51e846 commit 926e79d

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

javascript/ql/src/semmle/javascript/Closure.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ module Closure {
115115
override DefaultClosureModuleDeclaration range;
116116
}
117117

118-
private GlobalVariable googVariable() {
119-
variables(result, "goog", any(GlobalScope sc))
120-
}
118+
private GlobalVariable googVariable() { variables(result, "goog", any(GlobalScope sc)) }
121119

122120
pragma[nomagic]
123121
private MethodCallExpr googModuleDeclExpr() {
@@ -135,9 +133,7 @@ module Closure {
135133
* A module using the Closure module system, declared using `goog.module()` or `goog.declareModuleId()`.
136134
*/
137135
class ClosureModule extends Module {
138-
ClosureModule() {
139-
exists(googModuleDeclExprInContainer(this))
140-
}
136+
ClosureModule() { exists(googModuleDeclExprInContainer(this)) }
141137

142138
/**
143139
* Gets the call to `goog.module` or `goog.declareModuleId` in this module.

javascript/ql/src/semmle/javascript/Expr.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,15 @@ class Expr extends @expr, ExprOrStmt, ExprOrType, AST::ValueNode {
249249
result = getCatchParameterFromStmt(getRawEnclosingStmt(this))
250250
or
251251
not exists(getCatchParameterFromStmt(getRawEnclosingStmt(this))) and
252-
result = any(DataFlow::FunctionNode f | f.getFunction() = this.getContainer()).getExceptionalReturn()
252+
result =
253+
any(DataFlow::FunctionNode f | f.getFunction() = this.getContainer()).getExceptionalReturn()
253254
}
254255
}
255256

256257
cached
257258
private DataFlow::Node getCatchParameterFromStmt(Stmt stmt) {
258-
result = DataFlow::parameterNode(stmt.getEnclosingTryCatchStmt().getACatchClause().getAParameter())
259+
result =
260+
DataFlow::parameterNode(stmt.getEnclosingTryCatchStmt().getACatchClause().getAParameter())
259261
}
260262

261263
/**

javascript/ql/src/semmle/javascript/internal/StmtContainers.qll

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Provides predicates and classes for relating nodes to their
55
* enclosing `StmtContainer`.
66
*/
7+
78
private import javascript
89

910
cached
@@ -13,9 +14,7 @@ private StmtContainer getStmtContainer(@node_in_stmt_container node) {
1314
stmtContainers(node, result)
1415
or
1516
// Properties
16-
exists(ASTNode parent |
17-
properties(node, parent, _, _, _)
18-
|
17+
exists(ASTNode parent | properties(node, parent, _, _, _) |
1918
exprContainers(parent, result)
2019
or
2120
stmtContainers(parent, result)
@@ -46,7 +45,5 @@ class NodeInStmtContainer extends Locatable, @node_in_stmt_container {
4645
* Gets the function or toplevel to which this node belongs.
4746
*/
4847
pragma[inline]
49-
final StmtContainer getContainer() {
50-
result = getStmtContainer(this)
51-
}
48+
final StmtContainer getContainer() { result = getStmtContainer(this) }
5249
}

0 commit comments

Comments
 (0)