-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Using --fix
with both gofumpt
and gocritic
linters deletes comment lines
#3230
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
I ran into this as well. It was fairly hard to add a comment to the code with this |
I wonder if the issue might be triggered in general by two or more fixers being applied to the same line? |
so per the closed dup issue, not just comments but also code |
Fixed by #3230 |
@ldez above you attached link to this issue itself 🙂 |
Should be #3316 |
Welcome
Description of the problem
Using golangci-lint with
--fix
flag and bothgofumpt
andgocritic
linters enabled deletes comment lines.This is the case with at least comment lines missing a space after
//
.In minimal example running with
golangci-lint run --fix --disable-all --enable gocritic,gofumpt
with no.golangci.yml
config file.Using either
gofumpt
orgocritic
alone has the expected behavior (e.g. adding whitespace after//
)Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
The text was updated successfully, but these errors were encountered: