Closed mmorel-35 closed 1 year ago
We have the rule "Composite literals should use newlines consistently", which is similar but more aggressive. I think this makes sense. The only thing to note is that we shouldn't modify the following:
myFunc(param1,
myType{})
That is, we would enforce newlines at both the start and end of the parameter list if either end has a newline already.
We could consider doing the same for function declarations too.
Actually a duplicate of https://github.com/mvdan/gofumpt/issues/74; I had already agreed to doing this :)
I don’t see any linter proposing to remove trailing comma and new line between } and ), so, I’m wondering if gofumpt would implement this rule.
So for example if I see
I would expect to see this
It seems like gofumpt accept either ways. The linter is passing before and after my commit, here.
Would it be possible for gofumpt to provide this rule ?