mirror of
https://github.com/github/codeql.git
synced 2026-05-04 05:05:12 +02:00
JS: document limitation of js/useless-assignment-to-local
This commit is contained in:
@@ -9,3 +9,4 @@
|
||||
| tst.js:45:6:45:11 | x = 23 | This definition of x is useless, since its value is never read. |
|
||||
| tst.js:51:6:51:11 | x = 23 | This definition of x is useless, since its value is never read. |
|
||||
| tst.js:132:7:132:13 | {x} = o | This definition of x is useless, since its value is never read. |
|
||||
| tst.js:162:6:162:14 | [x] = [0] | This definition of x is useless, since its value is never read. |
|
||||
|
||||
@@ -157,3 +157,12 @@ function v() {
|
||||
(function() {
|
||||
for (var a = (x, -1) in v = a, o);
|
||||
});
|
||||
|
||||
(function() {
|
||||
let [x] = [0], // OK, but flagged due to destructuring limitations
|
||||
y = 0;
|
||||
x = 42;
|
||||
y = 87;
|
||||
x;
|
||||
y;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user