Comment Comment by ukoki > # This cop checks for `next` (and sometimes `break`) in loops.> ...> # - For small loops, you can just use normal conditions instead of `next`.This rule will just end up with devs writing this: array.each do |elem| if condition if another_condition if yet_another_condition do_something end end end end Rather than the much easier to parse: array.each do |elem| next if !condition next if !another_condition next if !yet_another_condition do_something end parent ukoki 2 years ago
> ...
> # - For small loops, you can just use normal conditions instead of `next`.
This rule will just end up with devs writing this:
Rather than the much easier to parse: