Skip to content

Files

Latest commit

 

History

History
37 lines (27 loc) · 598 Bytes

Layout-MultilineMethodParameterLineBreaks.md

File metadata and controls

37 lines (27 loc) · 598 Bytes

Pattern: Missing newline for multi-line method param

Issue: -

Description

Ensures that each parameter in a multi-line method definition starts on a separate line.

NOTE: This rule does not move the first argument, if you want that to be on a separate line, see Layout/FirstMethodParameterLineBreak.

Examples

# bad
def foo(a, b,
  c
)
end

# good
def foo(
  a,
  b,
  c
)
end

# good
def foo(a, b, c)
end

Further Reading