Pattern: Missing else
Issue: -
Checks for if
expressions that do not have an else
branch.
# 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
Attribute | Value |
---|---|
EnforcedStyle | both |
SupportedStyles | if, case, both |