Skip to content

Files

Latest commit

 

History

History
33 lines (24 loc) · 455 Bytes

Lint-ElseLayout.md

File metadata and controls

33 lines (24 loc) · 455 Bytes

Pattern: Odd else layout

Issue: -

Description

This rule checks for odd else block layout - like having an expression on the same line as the else keyword, which is usually a mistake.

Examples

# bad

if something
  ...
else do_this
  do_that
end
# good

if something
  ...
else
  do_this
  do_that
end

Further Reading