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
$ cat .golangci.ymllinters-settings: govet: check-shadowing: true settings: printf: funcs: - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf golint: min-confidence: 0 gocyclo: min-complexity: 15 maligned: suggest-new: true dupl: threshold: 100 goconst: min-len: 2 min-occurrences: 2 depguard: list-type: blacklist packages: # logging is allowed only by logutils.Log, logrus # is allowed to use only in logutils package - github.com/sirupsen/logrus packages-with-error-message: - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log" misspell: locale: US lll: line-length: 140 goimports: local-prefixes: github.com/golangci/golangci-lint gocritic: enabled-tags: - diagnostic - experimental - opinionated - performance - style disabled-checks: - dupImport # https://github.com/go-critic/go-critic/issues/845 - ifElseChain - octalLiteral - whyNoLint - wrapperFunc funlen: lines: 100 statements: 50linters: # please, do not use `enable-all`: it's deprecated and will be removed soon. # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint disable-all: true enable: - bodyclose - deadcode - depguard - dogsled - dupl - errcheck - funlen - gochecknoinits - goconst - gocritic - gocyclo - gofmt - goimports - golint - gosec - gosimple - govet - ineffassign - interfacer - lll - misspell - nakedret - scopelint - staticcheck - structcheck - stylecheck - typecheck - unconvert - unparam - unused - varcheck - whitespace # don't enable: # - gochecknoglobals # - gocognit # - godox # - maligned # - preallocrun: skip-dirs: - test/testdata_etc - internal/cache - internal/renameio - internal/robustio
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configurationservice: golangci-lint-version: 1.20.x # use the fixed version to not introduce new linters unexpectedly prepare: - echo "here I can run custom commands, but no preparation needed for this repo"
Go environment
$ go version && go envgo version go1.13.5 linux/amd64GO111MODULE=""GOARCH="amd64"GOBIN="/home/wangyalou/go/bin"GOCACHE="/home/wangyalou/.cache/go-build"GOENV="/home/wangyalou/.config/go/env"GOEXE=""GOFLAGS=""GOHOSTARCH="amd64"GOHOSTOS="linux"GONOPROXY=""GONOSUMDB=""GOOS="linux"GOPATH="/home/wangyalou/go"GOPRIVATE=""GOPROXY="goproxy.io"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/wangyalou/workspace/go/golangci-lint-1.22.2/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=/tmp/go-build623601109=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ makego build -o golangci-lint ./cmd/golangci-lintGL_TEST_RUN=1 time ./golangci-lint run -vINFO [config_reader] Config search paths: [./ /home/wangyalou/workspace/go/golangci-lint-1.22.2 /home/wangyalou/workspace/go /home/wangyalou/workspace /home/wangyalou /home /] INFO [config_reader] Used config file .golangci.yml INFO [lintersdb] Active 32 linters: [bodyclose deadcode depguard dogsled dupl errcheck funlen gochecknoinits goconst gocritic gocyclo gofmt goimports golint gosec gosimple govet ineffassign interfacer lll misspell nakedret scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck whitespace] INFO [lintersdb] Active 32 linters: [bodyclose deadcode depguard dogsled dupl errcheck funlen gochecknoinits goconst gocritic gocyclo gofmt goimports golint gosec gosimple govet ineffassign interfacer lll misspell nakedret scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck whitespace] INFO [loader] Go packages loading at mode 575 (compiled_files|deps|imports|name|exports_file|files|types_sizes) took 191.8778ms INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 5.127553ms INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 779.386276ms with top 10 stages: buildssa: 105.915089ms, unconvert: 44.64782ms, dupl: 42.550848ms, goimports: 32.088614ms, gosec: 29.098375ms, gocritic: 27.558281ms, ST1016: 19.474232ms, ST1005: 19.461626ms, SA1023: 19.336416ms, golint: 17.347428ms WARN [runner] Can't run linter goanalysis_metalinter: S1000: failed prerequisites: [email protected]/golangci/golangci-lint/pkg/logutils, [email protected]/golangci/golangci-lint/pkg/logutils INFO [runner/unused/goanalysis] analyzers took 86.80172ms with top 10 stages: buildssa: 75.693665ms, U1000: 11.108055ms
WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:4:2: could not import github.com/stretchr/testify/mock (/home/wangyalou/workspace/go/golangci-lint-1.22.2/vendor/github.com/stretchr/testify/mock/mock.go:16:2: could not import github.com/stretchr/testify/assert (/home/wangyalou/workspace/go/golangci-lint-1.22.2/vendor/github.com/stretchr/testify/assert/assertion_format.go:9:7: could not import net/http (/usr/local/go/src/net/http/client.go:13:2: could not import crypto/tls (/usr/local/go/src/crypto/tls/cipher_suites.go:16:2: could not import crypto/x509 (/usr/local/go/src/crypto/x509/verify.go:11:2: could not import net (/usr/local/go/src/net/cgo_linux.go:12:8: could not import C (cgo preprocessing failed))))))) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:46:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:41:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:37:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:32:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:27:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:22:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:17:4: m.Called undefined (type *MockLog has no field or method Called)]
INFO [runner] processing took 2.172µs with stages: max_same_issues: 363ns, skip_dirs: 289ns, cgo: 199ns, max_from_linter: 188ns, nolint: 153ns, filename_unadjuster: 150ns, path_prettifier: 130ns, autogenerated_exclude: 119ns, diff: 111ns, identifier_marker: 107ns, skip_files: 92ns, max_per_file_from_linter: 50ns, uniq_by_line: 48ns, exclude: 46ns, source_code: 43ns, exclude-rules: 42ns, path_shortener: 42ns INFO [runner] linters took 748.938991ms with stages: goanalysis_metalinter: 516.599382ms, unused: 232.308721ms
ERRO Running error: buildssa: analysis skipped: errors in package: [/home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:4:2: could not import github.com/stretchr/testify/mock (/home/wangyalou/workspace/go/golangci-lint-1.22.2/vendor/github.com/stretchr/testify/mock/mock.go:16:2: could not import github.com/stretchr/testify/assert (/home/wangyalou/workspace/go/golangci-lint-1.22.2/vendor/github.com/stretchr/testify/assert/assertion_format.go:9:7: could not import net/http (/usr/local/go/src/net/http/client.go:13:2: could not import crypto/tls (/usr/local/go/src/crypto/tls/cipher_suites.go:16:2: could not import crypto/x509 (/usr/local/go/src/crypto/x509/verify.go:11:2: could not import net (/usr/local/go/src/net/cgo_linux.go:12:8: could not import C (cgo preprocessing failed))))))) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:46:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:41:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:37:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:32:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:27:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:22:4: m.Called undefined (type *MockLog has no field or method Called) /home/wangyalou/workspace/go/golangci-lint-1.22.2/pkg/logutils/mock.go:17:4: m.Called undefined (type *MockLog has no field or method Called)]
INFO Memory: 11 samples, avg is 142.3MB, max is 203.5MB INFO Execution took 949.931696ms Command exited with non-zero status 33.14user 0.22system 0:01.08elapsed 311%CPU (0avgtext+0avgdata 192704maxresident)k0inputs+472outputs (0major+62049minor)pagefaults 0swapsMakefile:33: recipe for target 'test' failedmake: *** [test] Error 3
The text was updated successfully, but these errors were encountered:
Thank you for creating the issue!
Please include the following information:
Version of golangci-lint
Config file
Go environment
Verbose output of running
The text was updated successfully, but these errors were encountered: