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
revive does not exclude some of the exported comment lint. but golint exclude same one.
Version of golangci-lint
$ golangci-lint --versiongolangci-lint has version 1.40.1 built from 625445b1 on 2021-05-14T11:44:45Z
Config file
$ cat .golangci.ymllinters: enable: - revive
Go environment
$ go version && go envGO111MODULE=""GOARCH="amd64"GOBIN=""GOCACHE="/home/taiki/.cache/go-build"GOENV="/home/taiki/.config/go/env"GOEXE=""GOFLAGS=""GOHOSTARCH="amd64"GOHOSTOS="linux"GOINSECURE=""GOMODCACHE="/home/taiki/dev/pkg/mod"GONOPROXY=""GONOSUMDB=""GOOS="linux"GOPATH="/home/taiki/dev"GOPRIVATE=""GOPROXY="https://proxy.golang.org,direct"GOROOT="/usr/lib/go"GOSUMDB="sum.golang.org"GOTMPDIR=""GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"GOVCS=""GOVERSION="go1.16.4"GCCGO="gccgo"AR="ar"CC="gcc"CXX="g++"CGO_ENABLED="1"GOMOD="/home/taiki/tmp/golangci-revive/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-build350676579=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -vINFO [config_reader] Config search paths: [./ /home/taiki/tmp/golangci-revive /home/taiki/tmp /home/taiki /home /]INFO [config_reader] Used config file .golangci.ymlINFO [lintersdb] Active 11 linters: [deadcode errcheck gosimple govet ineffassign revive staticcheck structcheck typecheck unused varcheck]INFO [loader] Go packages loading at mode 575 (exports_file|files|types_sizes|compiled_files|deps|imports|name) took 76.539641msINFO [runner/filename_unadjuster] Pre-built 0 adjustments in 113.41µsINFO [linters context/goanalysis] analyzers took 8.137345ms with top 10 stages: the_only_name: 3.743804ms, nilness: 1.860044ms, fact_deprecated: 326.681µs, buildir: 274.052µs, typedness: 223.17µs, ctrlflow: 150.564µs, SA5012: 143.803µs, printf: 142.874µs, fact_purity: 132.593µs, unused: 94.732µsINFO [runner] Processors filtering stat (out/in): path_prettifier: 2/2, autogenerated_exclude: 2/2, nolint: 2/2, max_from_linter: 2/2, path_prefixer: 2/2, skip_dirs: 2/2, exclude: 2/2, diff: 2/2, max_per_file_from_linter: 2/2, max_same_issues: 2/2, source_code: 2/2, path_shortener: 2/2, severity-rules: 2/2, filename_unadjuster: 2/2, cgo: 2/2, skip_files: 2/2, identifier_marker: 2/2, exclude-rules: 2/2, uniq_by_line: 2/2, sort_results: 2/2INFO [runner] processing took 397.27µs with stages: exclude-rules: 150.264µs, identifier_marker: 98.618µs, nolint: 42.631µs, autogenerated_exclude: 30.98µs, path_prettifier: 26.047µs, source_code: 21.688µs, skip_dirs: 11.265µs, max_same_issues: 3.73µs, uniq_by_line: 3.101µs, cgo: 1.91µs, path_shortener: 1.48µs, max_from_linter: 1.446µs, filename_unadjuster: 1.407µs, max_per_file_from_linter: 762ns, skip_files: 383ns, exclude: 351ns, path_prefixer: 318ns, diff: 310ns, severity-rules: 299ns, sort_results: 280nsINFO [runner] linters took 22.77286ms with stages: goanalysis_metalinter: 21.742262msa.go:4:2: exported: exported const C should have comment (or a comment on this block) or be unexported (revive) C = "x" ^a.go:7:1: exported: comment on exported function F should be of the form "F ..." (revive)// a function^INFO File cache stats: 1 entries of total size 83BINFO Memory: 3 samples, avg is 71.2MB, max is 71.3MBINFO Execution took 120.633263ms
Code example or link to a public repository
package example
const (
C="x"
)
// a functionfuncF() string {
return"F"
}
It looks like the default exlude rule doesn't cover some cases.
Description of the problem
revive does not exclude some of the exported comment lint. but golint exclude same one.
Version of golangci-lint
Config file
Go environment
Verbose output of running
Code example or link to a public repository
It looks like the default exlude rule doesn't cover some cases.
golangci-lint/pkg/config/issues.go
Lines 81 to 91 in 62668d4
The text was updated successfully, but these errors were encountered: