Skip to content

Commit d6a39ad

Browse files
committed
Revert "JS: Mark some alerts as picked up trivial-conditional"
This reverts commit 02e8959.
1 parent 26ec503 commit d6a39ad

File tree

1 file changed

+5
-5
lines changed
  • javascript/ql/test/query-tests/Expressions/UnneededDefensiveProgramming

1 file changed

+5
-5
lines changed

javascript/ql/test/query-tests/Expressions/UnneededDefensiveProgramming/tst.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@
159159
}
160160
}
161161

162-
if (typeof x !== undefined); // $ Alert[js/comparison-between-incompatible-types]
163-
if (typeof window !== undefined); // $ Alert[js/comparison-between-incompatible-types]
162+
if (typeof x !== undefined);
163+
if (typeof window !== undefined);
164164
if (typeof x !== x);
165-
if (typeof x !== u); // $ Alert[js/comparison-between-incompatible-types]
165+
if (typeof x !== u); // $ Alert
166166

167167
if (typeof window !== "undefined");
168168
if (typeof module !== "undefined");
@@ -172,8 +172,8 @@
172172
if (typeof module !== "undefined" && module.exports);
173173
if (typeof global !== "undefined" && global.process);
174174

175-
u && (f(), u.p); // $ Alert[js/trivial-conditional]
176-
u && (u.p, f()); // $ Alert[js/trivial-conditional] - technically not OK, but it seems like an unlikely pattern
175+
u && (f(), u.p);
176+
u && (u.p, f()); // technically not OK, but it seems like an unlikely pattern
177177
u && !u.p; // $ MISSING: Alert
178178
u && !u(); // $ MISSING: Alert
179179

0 commit comments

Comments
 (0)