We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
FunctionExpr
1 parent 1f256ab commit 15b1daeCopy full SHA for 15b1dae
javascript/ql/lib/Expressions/ExprHasNoEffect.qll
@@ -140,6 +140,8 @@ predicate isCompoundExpression(Expr e) {
140
e instanceof SeqExpr
141
or
142
e instanceof ParExpr and
143
+ // Parenthesized function expressions like `(function() {...})` should still be flagged
144
+ // as useless when not invoked, so we exclude them
145
not e.stripParens() instanceof FunctionExpr
146
}
147
0 commit comments