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

Fix parentheses offence for numeric arguments with an operator #7107

Merged
merged 3 commits into from
Jun 10, 2019

Conversation

gsamokovarov
Copy link
Contributor

In the Style/MethodCallWithArgsParentheses cop omit_parentheses
style, we register an offense for cases like foo -1 or foo +1. This
is a potential Ruby warning and an offense from
Lint/AmbiguousOperator.

@gsamokovarov gsamokovarov force-pushed the unary-numeric-omit-parentheses branch 4 times, most recently from d77f29e to e5a7aa0 Compare June 4, 2019 21:32
CHANGELOG.md Show resolved Hide resolved
@gsamokovarov gsamokovarov force-pushed the unary-numeric-omit-parentheses branch from e5a7aa0 to 70d0109 Compare June 6, 2019 05:30
In the `Style/MethodCallWithArgsParentheses` cop `omit_parentheses`
style, we register an offense for cases like `foo -1`  or `foo +1`. This
is a potential Ruby warning and an offense from
`Lint/AmbiguousOperator`.
@gsamokovarov gsamokovarov force-pushed the unary-numeric-omit-parentheses branch 3 times, most recently from 5b2f5fb to b2f6789 Compare June 6, 2019 07:23
@bbatsov
Copy link
Collaborator

bbatsov commented Jun 6, 2019

@gsamokovarov Looking at the second commit message I think you didn't squash your commits properly. ;-)

@gsamokovarov
Copy link
Contributor Author

Oh, noes! My recent git commit scissor changes. Let me try again.

@gsamokovarov gsamokovarov force-pushed the unary-numeric-omit-parentheses branch from b2f6789 to 6789e4a Compare June 6, 2019 10:13
@bbatsov bbatsov merged commit 5fafbb4 into rubocop:master Jun 10, 2019
@bbatsov
Copy link
Collaborator

bbatsov commented Jun 10, 2019

Thanks!

@gsamokovarov gsamokovarov deleted the unary-numeric-omit-parentheses branch June 25, 2019 15:14
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

4 participants