You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cop Style/ZeroLengthPredicate allows "bad" length checks. length == 0 gets reported and should be replaced with empty? but length < 1 is ok.
since length < 1 also is an empty? question, it should report it.
Expected behavior
as it does for length == 0, report it
RuboCop version
0.37.2 (using Parser 2.3.0.6, running on ruby 2.1.7 x86_64-darwin14.0)
The text was updated successfully, but these errors were encountered:
The cop Style/ZeroLengthPredicate allows "bad" length checks.
length == 0
gets reported and should be replaced withempty?
butlength < 1
is ok.since
length < 1
also is anempty?
question, it should report it.Expected behavior
as it does for
length == 0
, report itRuboCop version
0.37.2 (using Parser 2.3.0.6, running on ruby 2.1.7 x86_64-darwin14.0)
The text was updated successfully, but these errors were encountered: