Query module MissingDotLengthInComparison

name
Missing ‘.length’ in comparison
description
Two variables are being compared using a relational operator, but one is also used to index into the other, suggesting a “.length” is missing from the comparison.
kind
problem
problem.severity
warning
id
js/missing-dot-length-in-comparison
precision
high
tags
correctness

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

contradictoryAccess

Holds for a comparison and index expression with the same operands, such as base < index and base[index].

relevantBasicBlocks
sameBranch
sameIndex