mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
JS: Ignore Angular templates in a few non-security queries
This commit is contained in:
@@ -164,5 +164,7 @@ predicate hasNoEffect(Expr e) {
|
||||
top = e.getParent().(ExprStmt).getParent() and
|
||||
top.getNumChild() = 1 and
|
||||
not exists(Function fun | fun.getEnclosingContainer() = top)
|
||||
)
|
||||
) and
|
||||
// ignore Angular templates
|
||||
not e.getTopLevel() instanceof Angular2::TemplateTopLevel
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user