Skip to content

Files

Latest commit

 

History

History
34 lines (25 loc) · 634 Bytes

Layout-ClosingParenthesisIndentation.md

File metadata and controls

34 lines (25 loc) · 634 Bytes

Pattern: Malformed ) indentation

Issue: -

Description

This rule checks the indentation of hanging closing parentheses in method calls, method definitions, and grouped expressions. A hanging closing parenthesis means ) preceded by a line break.

Examples

# good: when x is on its own line, indent this way
func(
  x,
  y
)

# good: when x follows opening parenthesis, align parentheses
a = b * (x +
         y
        )

# bad
def func(
  x,
  y
  )

Further Reading