Closed psaikko closed 4 months ago
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