Skip to content

Files

Latest commit

 

History

History
55 lines (42 loc) · 909 Bytes

Layout-IndentFirstParameter.md

File metadata and controls

55 lines (42 loc) · 909 Bytes

Pattern: Misaligned first method parameter

Issue: -

Description

Checks the indentation of the first parameter in a method call.

Examples

# bad
def some_method(
first_param,
second_param)
  123
end

EnforcedStyle: consistent (default)

# The first parameter should always be indented one step more than the
# preceding line.

# good
def some_method(
  first_param,
second_param)
  123
end

EnforcedStyle: align_parentheses

# The first parameter should always be indented one step more than the
# opening parenthesis.

# good
def some_method(
                 first_param,
second_param)
  123
end

Configurable attributes

Name Default value
EnforcedStyle consistent
IndentationWidth <none>

Further Reading