Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a50d99

Browse files
committed
JS: Treat GeneratedCodeExpr as DirectEval in UnusedVariable.ql
1 parent 623557b commit 8a50d99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

javascript/ql/src/Declarations/UnusedVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ predicate whitelisted(UnusedLocal v) {
167167
vd.isAmbient()
168168
)
169169
or
170-
exists(DirectEval eval |
170+
exists(Expr eval | eval instanceof DirectEval or eval instanceof GeneratedCodeExpr |
171171
// eval nearby
172172
eval.getEnclosingFunction() = v.getADeclaration().getEnclosingFunction() and
173173
// ... but not on the RHS

0 commit comments

Comments
 (0)