Pattern: Misaligned end
in method
Issue: -
This rule checks whether the end
keywords of method definitions are aligned properly.
Two modes are supported through the EnforcedStyleAlignWith configuration
parameter. If it's set to start_of_line
(which is the default), the
end
shall be aligned with the start of the line where the def
keyword is. If it's set to def
, the end
shall be aligned with the
def
keyword.
# bad
private def foo
end
# EnforcedStyleAlignWith: start_of_line (default)
# good
private def foo
end
# EnforcedStyleAlignWith: def
# good
private def foo
end
Attribute | Value |
---|---|
EnforcedStyleAlignWith | start_of_line |
SupportedStylesAlignWith | start_of_line, def |