KEMBAR78
Support special_for_inner_method_call with Style/ClosingParenthesisIndentation · Issue #3204 · rubocop/rubocop · GitHub
Skip to content

Support special_for_inner_method_call with Style/ClosingParenthesisIndentation #3204

@jarredholman

Description

@jarredholman

I am using the special_for_inner_method_call option for Style/FirstParameterIndentation to indent parameters to the start of the actual method call. The Style/ClosingParenthesisIndentation cop does not have an equivalent option and forces the closing parenthesis to be aligned with the start of the line, not the start of the method call.


Expected behavior

I would like to be able to write code like this

expect(response).to contain_exactly(
                      { a: 1, b: 'x' },
                      { a: 2, b: 'y' }
                    )

even if that means adding:

Style/ClosingParenthesisIndentation:
  EnforcedStyle: special_for_inner_method_call

to rubocop.yml

Actual behavior

The ClosingParenthesisIndentation rule doesn't seem to have any options so the only style it accepts is

expect(response).to contain_exactly(
                      { a: 1, b: 'x' },
                      { a: 2, b: 'y' }
)

Steps to reproduce the problem

See Expected Behaviour

RuboCop version

$ rubocop -V
0.39.0 (using Parser 2.3.0.7, running on ruby 2.1.5 x64-mingw32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions