mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: Treat GeneratedCodeExpr as DirectEval in UnusedVariable.ql
This commit is contained in:
@@ -167,7 +167,7 @@ predicate whitelisted(UnusedLocal v) {
|
||||
vd.isAmbient()
|
||||
)
|
||||
or
|
||||
exists(DirectEval eval |
|
||||
exists(Expr eval | eval instanceof DirectEval or eval instanceof GeneratedCodeExpr |
|
||||
// eval nearby
|
||||
eval.getEnclosingFunction() = v.getADeclaration().getEnclosingFunction() and
|
||||
// ... but not on the RHS
|
||||
|
||||
Reference in New Issue
Block a user