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
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 --versiongolangci-lint has version v1.31.1-0.20201009124248-796a95880598 built from (unknown, mod sum: "h1:yo3wFdeBXUjQ4KdXovTyrva5sSE53N9fGUgWgRTakzo=") on (unknown)
Config file
$ cat .golangci.yml
# paste output hereservice: golangci-lint-version: 1.31.1run: timeout: 5m modules-download-mode: vendor skip-dirs: - store/storetest/mockslinters-settings: gofmt: simplify: true govet: check-shadowing: true enable-all: truelinters: disable-all: true enable: - deadcode - gofmt - golint - gosimple - govet - ineffassign - scopelint - structcheck - unconvert - unused - varcheck # TODO: enable this later # - errcheckissues: exclude-rules: - linters: # ignore unused warnings from enterprise code # add more as required. - unused text: "RedisSupplier|LocalCacheSupplier|Enterprise" - linters: - scopelint # ignore warnings from table tests. https://github.com/kyoh86/scopelint/issues/4 path: ".*_test.go|store/storetest" - linters: # ignore golint error for a lot of packages for now - golint path: "api4|app|cmd|einterface|enterprise|jobs|migrations|mlog|model|testlib|services|store|utils|web|wsapi|plugin/plugintest/api.go|plugin/api.go|plugin/context.go|plugin/client.go|plugin/client_rpc.go|plugin/client_rpc_generated.go|plugin/api_timer_layer_generated.go|plugin/hooks_timer_layer_generated|plugin/environment.go|plugin/health_check.go|plugin/hooks.go|plugin/supervisor.go|plugin/valid.go"
Go environment
$ go version && go envgo version go1.14.9 linux/amd64GO111MODULE="on"GOARCH="amd64"GOBIN=""GOCACHE="/home/usr/.cache/go-build"GOENV="/home/usr/.config/go/env"GOEXE=""GOFLAGS=""GOHOSTARCH="amd64"GOHOSTOS="linux"GOINSECURE=""GONOPROXY=""GONOSUMDB=""GOOS="linux"GOPATH="/home/usr/go"GOPRIVATE=""GOPROXY="direct"GOROOT="/usr/lib/golang"GOSUMDB="off"GOTMPDIR=""GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"GCCGO="gccgo"AR="ar"CC="gcc"CXX="g++"CGO_ENABLED="1"GOMOD="/home/usr/org/github/server/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-build575271080=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -vWARN [runner] Can't run linter goanalysis_metalinter: deadcode: analysis skipped: errors in package: [/home/usr/org/github/server/ook_test.go:7:2: could not import gopkg.in/h2non/gock.v1 (ook_test.go:7:2: cannot find package "." in: /home/usr/org/github/server/vendor/gopkg.in/h2non/gock.v1) /home/usr/org/github/server/ook_test.go:11:8: undeclared name: gock /home/usr/org/github/server/ook_test.go:7:2: "gopkg.in/h2non/gock.v1" imported but not used]WARN [runner] Can't run linter unused: buildir: failed to load package : could not load export data: no export data for "gopkg.in/h2non/gock.v1"ERRO Running error: buildir: failed to load package : could not load export data: no export data for "gopkg.in/h2non/gock.v1"✗ 3 (feature/vault|+2…2); golangci-lint run -v ook_test.goINFO [config_reader] Config search paths: [./ /home/usr/org/github/server /home/usr/org/github /home/usr/org /home/usr /home /]INFO [config_reader] Used config file .golangci.ymlINFO [lintersdb] Active 11 linters: [deadcode gofmt golint gosimple govet ineffassign scopelint structcheck unconvert unused varcheck]INFO [loader] Go packages loading at mode 575 (types_sizes|exports_file|name|imports|compiled_files|deps|files) took 81.787853msINFO [runner/filename_unadjuster] Pre-built 0 adjustments in 71.641µsINFO [linters context/goanalysis] analyzers took 1.384401ms with top 10 stages: printf: 117.671µs, ctrlflow: 74.101µs, assign: 45.08µs, lostcancel: 41.39µs, S1025: 33.96µs, buildtag: 32.58µs, inspect: 27.84µs, atomic: 25.45µs, varcheck: 24.65µs, findcall: 23.921µsWARN [runner] Can't run linter goanalysis_metalinter: deadcode: analysis skipped: errors in package: [/home/usr/org/github/server/ook_test.go:7:2: could not import gopkg.in/h2non/gock.v1 (ook_test.go:7:2: cannot find package "." in: /home/usr/org/github/server/vendor/gopkg.in/h2non/gock.v1) /home/usr/org/github/server/ook_test.go:11:8: undeclared name: gock /home/usr/org/github/server/ook_test.go:7:2: "gopkg.in/h2non/gock.v1" imported but not used]INFO [linters context/goanalysis] analyzers took 518.624µs with top 10 stages: buildir: 316.072µs, U1000: 202.552µsWARN [runner] Can't run linter unused: buildir: failed to load package : could not load export data: no export data for "gopkg.in/h2non/gock.v1"INFO [runner] processing took 3.83µs with stages: max_same_issues: 410ns, cgo: 370ns, identifier_marker: 350ns, skip_dirs: 330ns, path_prettifier: 290ns, nolint: 290ns, diff: 280ns, max_from_linter: 260ns, skip_files: 260ns, filename_unadjuster: 210ns, autogenerated_exclude: 170ns, exclude: 130ns, exclude-rules: 120ns, uniq_by_line: 120ns, sort_results: 40ns, path_shortener: 40ns, path_prefixer: 40ns, max_per_file_from_linter: 40ns, source_code: 40ns, severity-rules: 40nsINFO [runner] linters took 80.07906ms with stages: goanalysis_metalinter: 53.885257ms, unused: 26.159183msERRO Running error: buildir: failed to load package : could not load export data: no export data for "gopkg.in/h2non/gock.v1"INFO Memory: 3 samples, avg is 71.7MB, max is 72.6MBINFO Execution took 166.051195ms
Thank you for creating the issue!
Please include the following information:
Version of golangci-lint
Config file
Go environment
Verbose output of running
I have this test file:
When I run
golangci-lint run
I get:Am I missing something here?
The text was updated successfully, but these errors were encountered: