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
When using gocritic together with gofumpt they collide when taking care of comments with multiple lines.
In case of multiple line comments, when the first line does not have a whitespace, it will be deleted. If there are more than 2 lines, the first line will be deleted and the rest of the lines will remain unfixed.
For example:
//foo
// foobar
expected:
// foo
// foobar
actual:
// foobar
and in case of 3 lines:
//bar
//foo
// foobar
expected:
// bar
// foo
// foobar
actual:
//foo
// foobar
It is possible to solve it by silencing the commentFormatting check in gocritic, I'm just afraid this bug will come back to bite me in some other scenario.
Version of golangci-lint
$ golangci-lint --versiongolangci-lint has version 1.52.2 built with go1.20.2 from da04413 on 2023-03-23T16:18:48Z
Welcome
Description of the problem
When using
gocritic
together withgofumpt
they collide when taking care of comments with multiple lines.In case of multiple line comments, when the first line does not have a whitespace, it will be deleted. If there are more than 2 lines, the first line will be deleted and the rest of the lines will remain unfixed.
For example:
expected:
actual:
and in case of 3 lines:
expected:
actual:
It is possible to solve it by silencing the
commentFormatting
check ingocritic
, I'm just afraid this bug will come back to bite me in some other scenario.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: