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 a //nolint directive is being removed as part of an automatic fix, undesirable whitespace -- empty lines, or trailing whitespace -- gets left behind.
Version of golangci-lint
$ golangci-lint --versiongolangci-lint has version 1.56.1 built with go1.22.0 from a25592b5 on 2024-02-08T18:03:33Z
Configuration
--enable=nolintlint --fix
Go environment
$ go version && go env
# paste output here
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
# paste output here
A minimal reproducible example or link to a public repository
package main
import"fmt"//nolintfuncmain() {
fmt.Println("Hello, world!") //nolint
}
The fix leaves an empty line behind where the top level //nolint was on line 5, and a trailing whitespace after ) where the inline //nolint was on line 7. Both the empty line and the trailing whitespace should be removed.
Validation
Yes, I've included all information above (version, config, etc.).
The text was updated successfully, but these errors were encountered:
Welcome
Description of the problem
When a
//nolint
directive is being removed as part of an automatic fix, undesirable whitespace -- empty lines, or trailing whitespace -- gets left behind.Version of golangci-lint
Configuration
--enable=nolintlint --fix
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
The fix leaves an empty line behind where the top level
//nolint
was on line 5, and a trailing whitespace after)
where the inline//nolint
was on line 7. Both the empty line and the trailing whitespace should be removed.Validation
The text was updated successfully, but these errors were encountered: