Skip to content

Files

Latest commit

 

History

History
34 lines (25 loc) · 488 Bytes

Lint-DuplicateCaseCondition.md

File metadata and controls

34 lines (25 loc) · 488 Bytes

Pattern: Duplicate case condition

Issue: -

Description

This rule checks that there are no repeated conditions used in case when expressions.

Examples

# bad

case x
when 'first'
  do_something
when 'first'
  do_something_else
end
# good

case x
when 'first'
  do_something
when 'second'
  do_something_else
end

Further Reading