mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
JS: introduce CallToObjectDefineProperty::getAPropertyAttribute
This commit is contained in:
@@ -157,6 +157,11 @@ where
|
||||
or
|
||||
// exclude result from accessor declarations
|
||||
assign1.getWriteNode() instanceof AccessorMethodDeclaration
|
||||
) and
|
||||
// exclude results from non-value definitions from `Object.defineProperty`
|
||||
(
|
||||
assign1 instanceof CallToObjectDefineProperty implies
|
||||
assign1.(CallToObjectDefineProperty).getAPropertyAttribute().getPropertyName() = "value"
|
||||
)
|
||||
select assign1.getWriteNode(),
|
||||
"This write to property '" + name + "' is useless, since $@ always overrides it.",
|
||||
|
||||
Reference in New Issue
Block a user