-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
It seems like golangci-lint does not run stylecheck's ST1000 (which complains about missing or malformed package comments) even if stylecheck is enabled. Stylecheck disables it by default; it's not clear to me if golangci-lint intends to do so as well, but if so it has no way to enable it.
For example, run golangci-lint on its own codebase, which enables stylecheck. (Say on ./pkg/commands, which has no package doc.) No errors are reported. (Same applies to a package doc that doesn't start "Package packagename ...".)
Is it possible to enable this, either by default or in configuration?
- 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).
Please include the following information:
Version of golangci-lint
$ golangci-lint --version
golangci-lint has version 1.23.7 built from 96964db on 2020-02-28T12:07:44ZConfig file
(running on golangci/golangci-lint itself)
Go environment
$ go version && go env
go version go1.13.5 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/benkraft/.cache/go-build"
GOENV="/home/benkraft/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/benkraft/.go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/benkraft/src/golangci-lint/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build202635661=/tmp/go-build -gno-record-gcc-switches"Verbose output of running
$ golangci-lint run -v ./pkg/commands/
INFO [config_reader] Config search paths: [./ /home/benkraft/src/golangci-lint/pkg/commands /home/benkraft/src/golangci-lint/pkg /home/benkraft/src/golangci-l
int /home/benkraft/src /home/benkraft /home /]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 35 linters: [bodyclose deadcode depguard dogsled dupl errcheck funlen gochecknoinits goconst gocritic gocyclo gofmt goimports golint g
omnd goprintffuncname gosec gosimple govet ineffassign interfacer lll misspell nakedret rowserrcheck scopelint staticcheck structcheck stylecheck typecheck un
convert unparam unused varcheck whitespace]
INFO [lintersdb] Active 35 linters: [bodyclose deadcode depguard dogsled dupl errcheck funlen gochecknoinits goconst gocritic gocyclo gofmt goimports golint g
omnd goprintffuncname gosec gosimple govet ineffassign interfacer lll misspell nakedret rowserrcheck scopelint staticcheck structcheck stylecheck typecheck un
convert unparam unused varcheck whitespace]
INFO [loader] Go packages loading at mode 575 (compiled_files|types_sizes|deps|exports_file|files|imports|name) took 248.976387ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 2.59017ms
INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 11.826866399s with top 10 stages: buildssa: 9.302634707s, inspect: 624.028215ms, ctrlflow: 435.0
53726ms, fact_deprecated: 414.82956ms, printf: 362.323826ms, fact_purity: 340.985916ms, goimports: 33.559718ms, dupl: 32.319154ms, gocritic: 30.578649ms, gose
c: 28.351244ms
INFO [runner/unused/goanalysis] analyzers took 18.583548ms with top 10 stages: buildssa: 14.658602ms, U1000: 3.924946ms
INFO [runner] Issues before processing: 30, after processing: 0
INFO [runner] Processors filtering stat (out/in): filename_unadjuster: 30/30, skip_files: 30/30, skip_dirs: 30/30, path_prettifier: 30/30, identifier_marker:
30/30, exclude-rules: 2/2, cgo: 30/30, autogenerated_exclude: 30/30, exclude: 2/30, nolint: 0/2
INFO [runner] processing took 2.547733ms with stages: nolint: 1.200208ms, exclude: 651.102µs, identifier_marker: 468.268µs, path_prettifier: 152.868µs, autoge
nerated_exclude: 57.939µs, skip_dirs: 8.244µs, cgo: 3.674µs, filename_unadjuster: 2.331µs, exclude-rules: 933ns, max_same_issues: 710ns, uniq_by_line: 314ns,
max_from_linter: 253ns, diff: 239ns, skip_files: 191ns, path_shortener: 165ns, source_code: 164ns, max_per_file_from_linter: 130ns
INFO [runner] linters took 2.945401154s with stages: goanalysis_metalinter: 2.7176486s, unused: 225.147624ms
INFO File cache stats: 9 entries of total size 36.0KiB
INFO Memory: 34 samples, avg is 330.0MB, max is 474.1MB
INFO Execution took 3.201593403sMetadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested