We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 091c6c0 + 77105f6 commit 8b277f7Copy full SHA for 8b277f7
javascript/ql/src/Expressions/MissingAwait.ql
@@ -43,7 +43,10 @@ predicate isBadPromiseContext(Expr expr) {
43
or
44
expr = any(LogicalBinaryExpr e).getLeftOperand()
45
46
- expr = any(UnaryExpr e).getOperand()
+ exists(UnaryExpr e |
47
+ expr = e.getOperand() and
48
+ not e instanceof VoidExpr
49
+ )
50
51
expr = any(UpdateExpr e).getOperand()
52
javascript/ql/test/query-tests/Expressions/MissingAwait/tst.js
@@ -61,3 +61,7 @@ function useThingPossiblySync(b) {
61
62
return thing + "bar"; // NOT OK - but we don't flag it
63
}
64
+
65
+function useThingInVoid() {
66
+ void getThing(); // OK
67
+}
0 commit comments