Closed
Description
Thank you for creating the issue!
- 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.33.0 built from b90551c on 2020-11-23T05:15:36Z
Config file
$ cat .golangci.yml
linters-settings:
funlen:
lines: 150
statements: 80
gci:
local-prefixes: gitlab.mstar.site/gg/sportcast-gateway
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 30
gocognit:
min-complexity: 75
lll:
line-length: 160
maligned:
suggest-new: true
dupl:
threshold: 200
goconst:
min-len: 2
min-occurrences: 2
nestif:
min-complexity: 10
run:
tests: true
skip-dirs:
- cmd
skip-files:
- ".*_generated\\.go$"
- "^generated_.*\\.go$"
- ".*\\.pb\\.go$"
deadline: 7m
issues:
exclude-rules:
- path: _test\.go
linters:
- gocognit
- goconst
- gocyclo
- funlen
- scopelint # frequent false positives in tests https://github.com/kyoh86/scopelint/issues/4
- path: domain/naming/.*
linters:
- goconst
- linters:
- lll # https://github.com/walle/lll/pull/13
source: "^//go:generate "
linters:
disable-all: false
enable-all: true
disable:
- exhaustive
- exhaustivestruct
- goerr113
- gochecknoglobals
- gochecknoinits
- godox
- gomnd
- interfacer
- nakedret
- nlreturn
- testpackage
- wsl
- wrapcheck
- paralleltest
Go environment
$ go version && go env
go version go1.15.2 darwin/amd64
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/Users/a.telyshev/go/bin"
GOCACHE="/Users/a.telyshev/Library/Caches/go-build"
GOENV="/Users/a.telyshev/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/a.telyshev/gows/pkg/mod"
GONOPROXY="gitlab.mstar.site"
GONOSUMDB="gitlab.mstar.site"
GOOS="darwin"
GOPATH="/Users/a.telyshev/gows:/Users/a.telyshev/go"
GOPRIVATE="gitlab.mstar.site"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/a.telyshev/softpro/sportcast-gateway/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/8c/0cgvdsl90d32skq_jttyr_nj1h1jzd/T/go-build257005041=/tmp/go-build -gno-record-gcc-switches -fno-common"
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
▶ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/a.telyshev/softpro/sportcast-gateway /Users/a.telyshev/softpro /Users/a.telyshev /Users /]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 47 linters: [asciicheck bodyclose deadcode depguard dogsled dupl errcheck errorlint exportloopref funlen gci gocognit goconst gocritic gocyclo godot gofmt gofumpt goheader goimports golint gomodguard goprintffuncname gosec gosimple govet ineffassign lll maligned misspell nestif noctx nolintlint prealloc rowserrcheck scopelint sqlclosecheck staticcheck structcheck stylecheck tparallel typecheck unconvert unparam unused varcheck whitespace]
INFO [loader] Go packages loading at mode 575 (exports_file|files|types_sizes|compiled_files|deps|imports|name) took 1.265851003s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 31.940064ms
INFO [linters context/goanalysis] analyzers took 25m23.673844025s with top 10 stages: buildir: 2m30.102799422s, buildssa: 1m26.265003199s, the_only_name: 1m23.142796169s, godot: 1m20.576746243s, gosec: 51.179273039s, dupl: 48.814305259s, golint: 33.781351147s, goimports: 31.640759144s, whitespace: 30.94994362s, gofumpt: 29.402583271s
WARN [linters context] Panic: godot: package "localization" (isInitialPkg: true, needAnalyzeSource: true): runtime error: slice bounds out of range [:59] with capacity 32: goroutine 16776 [running]:
runtime/debug.Stack(0x1b30585, 0x3c, 0xc00a96b390)
/opt/hostedtoolcache/go/1.15.5/x64/src/runtime/debug/stack.go:24 +0x9f
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1(0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:508 +0x1be
panic(0x1a1d160, 0xc0028f9540)
/opt/hostedtoolcache/go/1.15.5/x64/src/runtime/panic.go:969 +0x1b9
github.com/tetafro/godot.checkCommentForPeriod(0xc002a6ff00, 0xc01574e5c0, 0xc00a6ea070, 0x1, 0x30, 0x1, 0x0)
/home/runner/go/pkg/mod/github.com/tetafro/[email protected]/checks.go:90 +0x545
github.com/tetafro/godot.checkComments(0xc002a6ff00, 0xc008290280, 0x8, 0x8, 0x1adcf1c, 0xc, 0x1, 0x0, 0x0, 0x2)
/home/runner/go/pkg/mod/github.com/tetafro/[email protected]/checks.go:43 +0x311
github.com/tetafro/godot.Run(0xc0072b3000, 0xc002a6ff00, 0x1adcf1c, 0xc, 0xbfe9adc5bb560001, 0xc004d2bd58, 0x187758a, 0x19b8960, 0x0, 0x0)
/home/runner/go/pkg/mod/github.com/tetafro/[email protected]/godot.go:49 +0x155
github.com/golangci/golangci-lint/pkg/golinters.NewGodot.func1.1(0xc0146a1c70, 0x1c0eb0102, 0x227df40, 0xc01c2c8d60, 0x2)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/godot.go:49 +0x175
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:590 +0xa83
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:512 +0x2a
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001679590, 0x1a8233c, 0x5, 0xc004c8b770)
/home/runner/work/golangci-lint/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x50
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:511 +0x91
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc01166a860, 0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:1059 +0x65
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:1054 +0x305
INFO [linters context/goanalysis] analyzers took 14.969621754s with top 10 stages: buildir: 12.449291017s, U1000: 2.520330737s
INFO [runner/skip dirs] Skipped 8 issues from dir cmd/test-client-local by pattern cmd
INFO [runner] Issues before processing: 43, after processing: 0
INFO [runner] Processors filtering stat (out/in): exclude: 11/11, path_prettifier: 43/43, skip_files: 19/43, filename_unadjuster: 43/43, autogenerated_exclude: 11/11, identifier_marker: 11/11, cgo: 43/43, skip_dirs: 11/19, exclude-rules: 11/11, nolint: 0/11
INFO [runner] processing took 3.118971ms with stages: nolint: 1.460639ms, path_prettifier: 1.080171ms, autogenerated_exclude: 221.835µs, skip_dirs: 113.031µs, exclude-rules: 104.157µs, skip_files: 67.274µs, identifier_marker: 56.433µs, cgo: 7.435µs, filename_unadjuster: 4.772µs, max_same_issues: 693ns, uniq_by_line: 472ns, diff: 331ns, max_from_linter: 282ns, source_code: 240ns, exclude: 240ns, max_per_file_from_linter: 226ns, severity-rules: 208ns, path_shortener: 206ns, sort_results: 201ns, path_prefixer: 125ns
INFO [runner] linters took 29.644870922s with stages: goanalysis_metalinter: 27.384192247s, unused: 2.25748725s
INFO File cache stats: 781 entries of total size 3.6MiB
INFO Memory: 263 samples, avg is 1124.6MB, max is 1762.2MB
INFO Execution took 30.958812036s
Panic:
WARN [linters context] Panic: godot: package "localization" (isInitialPkg: true, needAnalyzeSource: true):
runtime error: slice bounds out of range [:59]
with capacity 32: goroutine 16776 [running]:
Tree:
$ ls -lR localization
total 0
drwxr-xr-x 4 a.telyshev 1391657618 128 Dec 1 15:56 base
drwxr-xr-x 3 a.telyshev 1391657618 96 Jul 22 15:04 external
localization/base:
total 24
-rw-r--r-- 1 a.telyshev 1391657618 2350 Nov 18 11:58 en.po
-rw-r--r-- 1 a.telyshev 1391657618 4162 Dec 1 15:56 ru.po
localization/external:
More:
WARN [linters context] Panic: godot: package "localization" (isInitialPkg: true, needAnalyzeSource: true): runtime error: slice bounds out of range [:59] with capacity 32: goroutine 16776 [running]:
runtime/debug.Stack(0x1b30585, 0x3c, 0xc00a96b390)
/opt/hostedtoolcache/go/1.15.5/x64/src/runtime/debug/stack.go:24 +0x9f
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1(0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:508 +0x1be
panic(0x1a1d160, 0xc0028f9540)
/opt/hostedtoolcache/go/1.15.5/x64/src/runtime/panic.go:969 +0x1b9
github.com/tetafro/godot.checkCommentForPeriod(0xc002a6ff00, 0xc01574e5c0, 0xc00a6ea070, 0x1, 0x30, 0x1, 0x0)
/home/runner/go/pkg/mod/github.com/tetafro/[email protected]/checks.go:90 +0x545
github.com/tetafro/godot.checkComments(0xc002a6ff00, 0xc008290280, 0x8, 0x8, 0x1adcf1c, 0xc, 0x1, 0x0, 0x0, 0x2)
/home/runner/go/pkg/mod/github.com/tetafro/[email protected]/checks.go:43 +0x311
github.com/tetafro/godot.Run(0xc0072b3000, 0xc002a6ff00, 0x1adcf1c, 0xc, 0xbfe9adc5bb560001, 0xc004d2bd58, 0x187758a, 0x19b8960, 0x0, 0x0)
/home/runner/go/pkg/mod/github.com/tetafro/[email protected]/godot.go:49 +0x155
github.com/golangci/golangci-lint/pkg/golinters.NewGodot.func1.1(0xc0146a1c70, 0x1c0eb0102, 0x227df40, 0xc01c2c8d60, 0x2)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/godot.go:49 +0x175
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:590 +0xa83
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:512 +0x2a
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001679590, 0x1a8233c, 0x5, 0xc004c8b770)
/home/runner/work/golangci-lint/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x50
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:511 +0x91
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc01166a860, 0xc004f4e800)
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:1059 +0x65
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
/home/runner/work/golangci-lint/golangci-lint/pkg/golinters/goanalysis/runner.go:1054 +0x305
localization is not a go package!