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.
2 parents 381bcf7 + f5a19a1 commit 3a44584Copy full SHA for 3a44584
javascript/ql/src/Declarations/UnusedVariable.ql
@@ -165,6 +165,9 @@ predicate whitelisted(UnusedLocal v) {
165
or
166
// ignore ambient declarations - too noisy
167
vd.isAmbient()
168
+ or
169
+ // ignore variables in template placeholders, as each placeholder sees a different copy of the variable
170
+ vd.getTopLevel() instanceof Templating::TemplateTopLevel
171
)
172
173
exists(Expr eval | eval instanceof DirectEval or eval instanceof GeneratedCodeExpr |
0 commit comments