mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
JS: Autoformat
This commit is contained in:
@@ -325,7 +325,12 @@ class LocalVariable extends Variable {
|
||||
* If it has no declaration, the location of its declaring scope is used.
|
||||
*/
|
||||
Location getLocation() {
|
||||
result = min(Location loc | loc = getADeclaration().getLocation() | loc order by loc.getStartLine(), loc.getStartColumn() )
|
||||
result =
|
||||
min(Location loc |
|
||||
loc = getADeclaration().getLocation()
|
||||
|
|
||||
loc order by loc.getStartLine(), loc.getStartColumn()
|
||||
)
|
||||
or
|
||||
not exists(getADeclaration()) and
|
||||
result = getDeclaringContainer().getLocation()
|
||||
|
||||
@@ -1230,9 +1230,7 @@ module DataFlow {
|
||||
|
||||
CapturedVariableNode() { this = TCapturedVariableNode(variable) }
|
||||
|
||||
override BasicBlock getBasicBlock() {
|
||||
result = variable.getDeclaringContainer().getStartBB()
|
||||
}
|
||||
override BasicBlock getBasicBlock() { result = variable.getDeclaringContainer().getStartBB() }
|
||||
|
||||
override predicate hasLocationInfo(
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
@@ -1240,9 +1238,7 @@ module DataFlow {
|
||||
variable.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
}
|
||||
|
||||
override string toString() {
|
||||
result = variable.getName()
|
||||
}
|
||||
override string toString() { result = variable.getName() }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1250,9 +1246,7 @@ module DataFlow {
|
||||
*
|
||||
* Gets a data flow node representing the given captured variable.
|
||||
*/
|
||||
Node capturedVariableNode(LocalVariable variable) {
|
||||
result = TCapturedVariableNode(variable)
|
||||
}
|
||||
Node capturedVariableNode(LocalVariable variable) { result = TCapturedVariableNode(variable) }
|
||||
|
||||
/**
|
||||
* Gets the data flow node corresponding to `nd`.
|
||||
|
||||
Reference in New Issue
Block a user