Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow parentheses in operator method calls for Style/MethodCallWithArgsParentheses #9620

Merged

Conversation

gsamokovarov
Copy link
Contributor

While calls like data&.[] value, value.=== other do compile, I won't
blame people if they want to leave the parentheses so they know what's
going on.

I'm proposing we legitimize the parens when calling operator methods. I
don't think this deserves extra configuration.

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 22, 2021

The change is fine, but it should be reflected in the cop documentation via some examples, otherwise I don't think the users will figure out how this works. And you have to move that changelog entry. :-)

…rgsParentheses`

While calls like `data&.[] value`, `value.=== other` do compile, I won't
blame people if they want to leave the parentheses so they know what's
going on.

I'm proposing we legitimize the parens when calling operator methods.  I
don't think this deserves extra configuration.
@gsamokovarov gsamokovarov force-pushed the omit-parentheses-operator-methods branch from c05503e to 2e6fec1 Compare March 22, 2021 08:43
@bbatsov bbatsov merged commit 0ec3ee3 into rubocop:master Mar 22, 2021
@bbatsov
Copy link
Collaborator

bbatsov commented Mar 22, 2021

Thanks!

@gsamokovarov gsamokovarov deleted the omit-parentheses-operator-methods branch March 23, 2021 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants