QL code and tests for C#/C++/JavaScript.

This commit is contained in:
Pavel Avgustinov
2018-08-02 17:53:23 +01:00
commit b55526aa58
10684 changed files with 581163 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
| tst.js:3:3:3:14 | "use strict" | This expression has no effect. |
| tst.js:5:3:5:18 | point.bias == -1 | This expression has no effect. |

View File

@@ -0,0 +1,6 @@
import javascript
from Expr e
where e.isPure() and
e.getParent() instanceof ExprStmt
select e, "This expression has no effect."

View File

@@ -0,0 +1 @@
| tst.js:5:3:5:18 | point.bias == -1 | This expression has no effect. |

View File

@@ -0,0 +1,7 @@
import javascript
from Expr e
where e.isPure() and
e.getParent() instanceof ExprStmt and
not e.getParent() instanceof Directive // new check
select e, "This expression has no effect."

View File

@@ -0,0 +1,6 @@
!function () {
"use strict"; // jshint ;_;
point.bias == -1;
}();