-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Gofumpt removing newlines before comments #300
Comments
Seems like this is happening specifically with the assignment |
This is also getting triggered JUST when the error is named |
According to the docs:
Will be always formatted to:
whether there is a comment or no I suppose |
This is working as intended; see "No empty lines before a simple error check" in the README. |
Well, maybe this can be changed for the case with comments? I understand that it's working as intended right now, but is there some huge problem with changing it? I could probably make a PR for the change |
Personally I don't see the problem with removing empty lines when there are comments, but sure, I can review a PR. |
I think this seems fine personally. The comment could be placed inside the block instead. On a simple error check, are you likely to be commenting something useful inbetween those lines too? |
Why has gofumpt started removing newlines when it isn't needed? e.g. this is a transformation I'm constantly seeing now
Before formatting:
After formatting:
This just looks incredibly bad, to be honest...
The text was updated successfully, but these errors were encountered: