Reputation: 45134
Using RuboCop, I want to disallow method argument formatting that looks like this:
some_method(arg_1,
arg_2)
And allow formatting that looks like this:
some_method(
arg_1,
arg_2
)
I also want to allow formatting that looks like this:
some_method(arg_1, arg_2)
How can I achieve this?
Upvotes: 2
Views: 192
Reputation: 1777
Seems this is the rule you are looking for:
https://www.rubydoc.info/gems/rubocop/0.45.0/RuboCop/Cop/Style/FirstMethodArgumentLineBreak
to enable it just write this in your rubocop.yml file:
Style/FirstMethodArgumentLineBreak:
Enabled: True
Upvotes: 1