Skip to content

Files

Latest commit

 

History

History
41 lines (29 loc) · 581 Bytes

Lint-RequireRangeParentheses.md

File metadata and controls

41 lines (29 loc) · 581 Bytes

Pattern: Missing range parentheses

Issue: -

Description

Checks that a range literal is enclosed in parentheses when the end of the range is at a line break.

case condition
when 42..
  do_something
end

Examples

# bad - Represents `(1..42)`, not endless range.
1..
42

# good - It's incompatible, but your intentions when using endless range may be:
(1..)
42

# good
1..42

# good
(1..42)

# good
(1..
42)

Further Reading