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

rules.go: add exprUnparen rule #85

Merged
merged 1 commit into from
Oct 11, 2020
Merged

Conversation

quasilyte
Copy link
Owner

Refs go-critic/go-critic#836

Signed-off-by: Iskander Sharipov quasilyte@gmail.com

@quasilyte quasilyte requested a review from cristaloleg October 11, 2020 15:30
f((xs[0] + 2)) // want `\Qthe parentheses around xs[0] + 2 are superfluous`
f(0, (1 + 2)) // want `\Qthe parentheses around 1 + 2 are superfluous`
f(0, 1, (xs[0] + xs[1])) // want `\Qthe parentheses around xs[0] + xs[1] are superfluous`
f(0, (f(0)), 0) // want `\Qthe parentheses around f(0) are superfluous`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f(0, (f(0)), 0) // want `\Qthe parentheses around f(0) are superfluous`
f(0, (f(0)), 0) // want `\Qthe parentheses around f(0) are superfluous`
f((1), (2)) // want...wait wat?

:D

Refs go-critic/go-critic#836

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
@quasilyte quasilyte force-pushed the quasilyte/add_exprUnparen_rule branch from c7c3c13 to 60c6e23 Compare October 11, 2020 18:23
@quasilyte quasilyte merged commit fee3382 into master Oct 11, 2020
@quasilyte quasilyte deleted the quasilyte/add_exprUnparen_rule branch October 11, 2020 18:50
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.

2 participants