length_test_linter: Check for a common mistake where length is applied in the wrong place
Description
Usage like length(x == 0) is a mistake. If you intended to check x is empty,
use length(x) == 0. Other mistakes are possible, but running length() on the
outcome of a logical comparison is never the best choice.
Usage
length_test_linter()
Arguments
Tags
best_practices, consistency, robustness
See Also
linters for a complete list of linters available in lintr.