Skip to content

Commit 23d2896

Browse files
committed
JS: Autoformat
1 parent 3242f5e commit 23d2896

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

javascript/ql/src/LanguageFeatures/NonLinearPattern.ql

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ class RootDestructuringPattern extends BindingPattern {
3535
/** Gets the first occurrence of the conflicting binding `name`. */
3636
VarDecl getFirstClobberedVarDecl(string name) {
3737
hasConflictingBindings(name) and
38-
result = min(VarDecl decl | decl = getABindingVarRef() and decl.getName() = name | decl order by decl.getLocation().getStartLine(), decl.getLocation().getStartColumn())
38+
result =
39+
min(VarDecl decl |
40+
decl = getABindingVarRef() and decl.getName() = name
41+
|
42+
decl order by decl.getLocation().getStartLine(), decl.getLocation().getStartColumn()
43+
)
3944
}
4045

4146
/** Holds if variables in this pattern may resemble type annotations. */
@@ -54,8 +59,10 @@ where
5459
w = p.getABindingVarRef() and
5560
w.getName() = n and
5661
v != w and
57-
if p.resemblesTypeAnnotation() then
58-
message = "The pattern variable '" + n + "' appears to be a type, but is a variable previously bound $@."
59-
else
60-
message = "Repeated binding of pattern variable '" + n + "' previously bound $@."
62+
if p.resemblesTypeAnnotation()
63+
then
64+
message =
65+
"The pattern variable '" + n +
66+
"' appears to be a type, but is a variable previously bound $@."
67+
else message = "Repeated binding of pattern variable '" + n + "' previously bound $@."
6168
select w, message, v, "here"

0 commit comments

Comments
 (0)