Skip to content

Commit 773cf0d

Browse files
committed
JS: Autoformat
1 parent 0c6e161 commit 773cf0d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

javascript/ql/src/semmle/javascript/frameworks/D3.qll

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/** Provides classes and predicates modelling aspects of the `d3` library. */
2+
23
private import javascript
34
private import semmle.javascript.security.dataflow.Xss
45

@@ -31,7 +32,12 @@ module D3 {
3132
call = d3Selection().getMember(name).getACall() and
3233
result = call.getReturn()
3334
|
34-
name = ["select", "selectAll", "filter", "merge", "selectChild", "selectChildren", "selection", "insert", "remove", "clone", "sort", "order", "raise", "lower", "append", "data", "join", "enter", "exit", "call"]
35+
name =
36+
[
37+
"select", "selectAll", "filter", "merge", "selectChild", "selectChildren", "selection",
38+
"insert", "remove", "clone", "sort", "order", "raise", "lower", "append", "data", "join",
39+
"enter", "exit", "call"
40+
]
3541
or
3642
name = ["text", "html", "datum"] and
3743
call.getNumArgument() > 0 // exclude 0-argument version, which returns the current value
@@ -71,12 +77,8 @@ module D3 {
7177
this = call.asExpr()
7278
}
7379

74-
override string getName() {
75-
result = call.getArgument(0).getStringValue()
76-
}
80+
override string getName() { result = call.getArgument(0).getStringValue() }
7781

78-
override DataFlow::Node getValueNode() {
79-
result = call.getArgument(1)
80-
}
82+
override DataFlow::Node getValueNode() { result = call.getArgument(1) }
8183
}
8284
}

javascript/ql/src/semmle/javascript/security/dataflow/XssThroughDomCustomizations.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ module XssThroughDom {
3030
/**
3131
* Gets a DOM property name that could store user-controlled data.
3232
*/
33-
string unsafeDomPropertyName() {
34-
result = ["innerText", "textContent", "value", "name"]
35-
}
33+
string unsafeDomPropertyName() { result = ["innerText", "textContent", "value", "name"] }
3634

3735
/**
3836
* A source for text from the DOM from a JQuery method call.

0 commit comments

Comments
 (0)