Closed
Description
Welcome
- Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've included all information below (version, config, etc).
- Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)
Description of the problem
Latest (v1.48) nolintlint default config has a conflict with 1.19 gofmt.
After #3002 nolintlint
complains about leading spaces in //nolint
comments
by default and the gofmt
command re-adds the leading space.
Version of golangci-lint
$ golangci-lint --version
v1.48
Configuration file
$ cat .golangci.yml
linters:
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exhaustive
- exportloopref
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- gomnd
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- noctx
- nolintlint
- revive
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
Go environment
$ go version && go env
1.19
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
Error: directive `// nolint` should be written without leading space as `//nolint` (nolintlint)
Code example or link to a public repository
// nolint