Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.6.3 (changelog, source)

Predicate unusedIndexVariable

Holds if rel is a for-loop condition of the form idx <= v.length, but all array indices v[c] inside the loop body (of which there must be at least one) use a constant index c instead of an index based on idx.

Import path

import LanguageFeatures.UnusedIndexVariable
predicate unusedIndexVariable(RelationalComparison rel, Variable idx, Variable v)