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

remove definitely useless parentheses #44

Open
mvdan opened this issue Mar 18, 2020 · 3 comments
Open

remove definitely useless parentheses #44

mvdan opened this issue Mar 18, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mvdan
Copy link
Owner

mvdan commented Mar 18, 2020

Some examples:

chan (int)
f((3))

We don't want to do this in all cases where a parentheses is unambiguous, though. For example, within binary expressions like (foo && bar) && baz it can help readability and maintainability, even if the parentheses don't actually change the evaluation.

@twpayne
Copy link
Contributor

twpayne commented Apr 8, 2020

Relevant discussion: go-critic/go-critic#836

@mvdan mvdan added the enhancement New feature or request label Nov 23, 2020
@mvdan mvdan added the good first issue Good for newcomers label Sep 26, 2021
@ashn4455
Copy link

Thanks so much🩺

@doubbz
Copy link

doubbz commented Aug 31, 2022

I can work on this if you like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants