gofumpt icon indicating copy to clipboard operation
gofumpt copied to clipboard

remove definitely useless parentheses

Open mvdan opened this issue 4 years ago • 3 comments

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.

mvdan avatar Mar 18 '20 12:03 mvdan

Relevant discussion: https://github.com/go-critic/go-critic/issues/836

twpayne avatar Apr 08 '20 22:04 twpayne

Thanks so much🩺

ashn4455 avatar Feb 12 '22 13:02 ashn4455

I can work on this if you like

doubbz avatar Aug 31 '22 15:08 doubbz