mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
JS: support noop parentheses in js/useless-assignment-to-local
The syntatic recognizer `isNullOrUndef` did not handle expressions that were wrapped in parentheses. This eliminates some results here: https://lgtm.com/projects/g/vuejs/vue/alerts?mode=tree&ruleFocus=7900088
This commit is contained in:
@@ -141,4 +141,15 @@ function v() {
|
||||
x = 23;
|
||||
x = 42;
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
(function(){
|
||||
var x = (void 0);
|
||||
var y = ((void 0));
|
||||
var z1 = z2 = (void 0);
|
||||
x = 42;
|
||||
y = 42;
|
||||
z1 = 42;
|
||||
z2 = 42;
|
||||
return x + y + z1 + z2;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user