Skip to content

Files

Latest commit

 

History

History
42 lines (33 loc) · 586 Bytes

Style-MissingElse.md

File metadata and controls

42 lines (33 loc) · 586 Bytes

Pattern: Missing else

Issue: -

Description

Checks for if expressions that do not have an else branch.

Examples

# bad
if condition
  statement
end
# bad
case var
when condition
  statement
end
# good
if condition
  statement
else
# the content of the else branch will be determined by Style/EmptyElse
end

Default configuration

Attribute Value
EnforcedStyle both
SupportedStyles if, case, both

Further Reading