mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
JavaScript: Add new query UnusedIndexVariable.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
function sum(xs) {
|
||||
var res = 0;
|
||||
for(var i=0; i<xs.length; ++i)
|
||||
res += xs[0]; // BAD: should be xs[i]
|
||||
return res;
|
||||
}
|
||||
Reference in New Issue
Block a user