mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
JS: Fix unused variable FP in template placeholders
This commit is contained in:
@@ -165,6 +165,9 @@ predicate whitelisted(UnusedLocal v) {
|
||||
or
|
||||
// ignore ambient declarations - too noisy
|
||||
vd.isAmbient()
|
||||
or
|
||||
// ignore variables in template placeholders, as each placeholder sees a different copy of the variable
|
||||
vd.getTopLevel() instanceof Templating::TemplateTopLevel
|
||||
)
|
||||
or
|
||||
exists(Expr eval | eval instanceof DirectEval or eval instanceof GeneratedCodeExpr |
|
||||
|
||||
Reference in New Issue
Block a user