mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
JS: Ignore delete expressions in js/missing-await
This commit is contained in:
@@ -45,7 +45,8 @@ predicate isBadPromiseContext(Expr expr) {
|
||||
or
|
||||
exists(UnaryExpr e |
|
||||
expr = e.getOperand() and
|
||||
not e instanceof VoidExpr
|
||||
not e instanceof VoidExpr and
|
||||
not e instanceof DeleteExpr
|
||||
)
|
||||
or
|
||||
expr = any(UpdateExpr e).getOperand()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
| tsTest.ts:4:12:4:19 | cache[x] | Missing await. This value is always a promise. |
|
||||
| tst.js:8:9:8:13 | thing | Missing await. The value 'thing' is always a promise. |
|
||||
| tst.js:10:9:10:13 | thing | Missing await. The value 'thing' is always a promise. |
|
||||
| tst.js:12:15:12:19 | thing | Missing await. The value 'thing' is always a promise. |
|
||||
|
||||
Reference in New Issue
Block a user