mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Merge pull request #6698 from asgerf/js/template-self-assignment
Approved by esbena
This commit is contained in:
@@ -43,5 +43,8 @@ where
|
||||
// exclude DOM properties
|
||||
not isDOMProperty(e.(PropAccess).getPropertyName()) and
|
||||
// exclude self-assignments that have been inserted to satisfy the TypeScript JS-checker
|
||||
not e.getAssignment().getParent().(ExprStmt).getDocumentation().getATag().getTitle() = "type"
|
||||
not e.getAssignment().getParent().(ExprStmt).getDocumentation().getATag().getTitle() = "type" and
|
||||
// exclude self-assignments in speculatively parsed template files
|
||||
// named arguments may be incorrectly parsed as assignments
|
||||
not e.getTopLevel() instanceof Templating::TemplateTopLevel
|
||||
select e.getParent(), "This expression assigns " + dsc + " to itself."
|
||||
|
||||
Reference in New Issue
Block a user