mirror of
https://github.com/github/codeql.git
synced 2025-12-25 05:06:34 +01:00
19 lines
490 B
Plaintext
19 lines
490 B
Plaintext
/**
|
|
* @name Deleting non-property
|
|
* @description The operand of the 'delete' operator should always be a property accessor.
|
|
* @kind problem
|
|
* @problem.severity warning
|
|
* @id js/deletion-of-non-property
|
|
* @tags reliability
|
|
* maintainability
|
|
* language-features
|
|
* external/cwe/cwe-480
|
|
* @precision very-high
|
|
*/
|
|
|
|
import javascript
|
|
|
|
from DeleteExpr del
|
|
where not del.getOperand().stripParens() instanceof PropAccess
|
|
select del, "Only properties should be deleted."
|