JS: Ignore delete expressions in js/missing-await

This commit is contained in:
Asger Feldthaus
2020-04-02 11:26:04 +01:00
parent ccce0205b4
commit 3a9d047cf5
2 changed files with 2 additions and 2 deletions

View File

@@ -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()

View File

@@ -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. |