You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At work we often use t.Run() inside of test cases to separate parts of it, but there is no consistency to the line breaks separating these, so our tests often end up looking like this:
It would be useful if gofumpt enforced the linebreaks between multiline function calls with func() as argument.
When a function is passed as an argument, it basically becomes a wrapper around a stand-alone function, so rules similar to the existing "Multiline top-level declarations must be separated by empty lines" rule should be applied.
Thanks for filing this issue. I can see how you might want consistency when empty lines are used between some t.Run calls and not others, but I honestly don't think either approach (all use empty lines in between, versus none use empty lines in between) is clearly the canonical formatting that everyone should use.
At work we often use
t.Run()
inside of test cases to separate parts of it, but there is no consistency to the line breaks separating these, so our tests often end up looking like this:It would be useful if
gofumpt
enforced the linebreaks between multiline function calls withfunc()
as argument.When a function is passed as an argument, it basically becomes a wrapper around a stand-alone function, so rules similar to the existing "Multiline top-level declarations must be separated by empty lines" rule should be applied.
Expected result:
The text was updated successfully, but these errors were encountered: