Skip to content

Commit b1f2ef9

Browse files
committed
JS: More alert updates in UselessConditional
1 parent 5e375f8 commit b1f2ef9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/ql/test/query-tests/Statements/UselessConditional/UselessConditional.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async function awaitFlow(){
6767

6868
(function() {
6969
function f1(x) {
70-
x || y // $ Alert - but whitelisted
70+
x || y // OK
7171
}
7272
f1(true);
7373

@@ -79,7 +79,7 @@ async function awaitFlow(){
7979

8080
function f3(x) {
8181
(function(){
82-
x || y // $ Alert - but whitelisted
82+
x || y // OK
8383
});
8484
}
8585
f3(true);
@@ -150,7 +150,7 @@ async function awaitFlow(){
150150
var v = p();
151151
if (v) { // $ Alert
152152
}
153-
if (v) { // $ Alert - but not detected due to SSA limitations
153+
if (v) { // $ MISSING: Alert - due to SSA limitations
154154
}
155155
});
156156

@@ -165,7 +165,7 @@ async function awaitFlow(){
165165
var v = findOrThrow();
166166
if (v) { // $ Alert
167167
}
168-
if (v) { // $ Alert - but not detected due to SSA limitations
168+
if (v) { // $ MISSING: Alert - due to SSA limitations
169169
}
170170
});
171171

@@ -180,7 +180,7 @@ async function awaitFlow(){
180180
(function() {
181181
function outer(x) {
182182
addEventListener("click", () => {
183-
if (!x && something()) { // $ Alert - but whitelisted
183+
if (!x && something()) { // OK
184184
something();
185185
}
186186
});

0 commit comments

Comments
 (0)