JS: Fix unused variable FP in template placeholders

This commit is contained in:
Asger F
2022-06-23 19:26:32 +02:00
parent 3b2b884f09
commit f5a19a1013

View File

@@ -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 |