mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
QL code and tests for C#/C++/JavaScript.
This commit is contained in:
@@ -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. |
|
||||
@@ -0,0 +1,6 @@
|
||||
import javascript
|
||||
|
||||
from Expr e
|
||||
where e.isPure() and
|
||||
e.getParent() instanceof ExprStmt
|
||||
select e, "This expression has no effect."
|
||||
@@ -0,0 +1 @@
|
||||
| tst.js:5:3:5:18 | point.bias == -1 | This expression has no effect. |
|
||||
@@ -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."
|
||||
@@ -0,0 +1,6 @@
|
||||
!function () {
|
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
point.bias == -1;
|
||||
}();
|
||||
Reference in New Issue
Block a user