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.
1 parent 3b2b884 commit f5a19a1Copy full SHA for f5a19a1
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