Skip to content

Sporadic "Can't run linter goanalysis_metalinter: findcall: analysis skipped:" error on a cold cache #885

Closed
@agnivade

Description

@agnivade

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.21.0 built from 645e794 on 2019-10-15T18:16:56Z
Config file

https://github.com/mattermost/mattermost-server/blob/master/.golangci.yml

Go environment
$ go version && go env
go version go1.13.3 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/agniva/.cache/go-build"
GOENV="/home/agniva/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY="gitlab.com"
GONOSUMDB="gitlab.com"
GOOS="linux"
GOPATH="/home/agniva/play/go"
GOPRIVATE="gitlab.com"
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/agniva/play/go/src/github.com/mattermost/mattermost-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-build167304403=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$golangci-lint cache clean
$golangci-lint run -v ./...
INFO [config_reader] Config search paths: [./ /home/agniva/play/go/src/github.com/mattermost/mattermost-server /home/agniva/play/go/src/github.com/mattermost /home/agniva/play/go/src/github.com /home/agniva/play/go/src /home/agniva/play/go /home/agniva/play /home/agniva /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 10 linters: [deadcode gofmt golint gosimple govet ineffassign structcheck unconvert unused varcheck] 
INFO [loader] Go packages loading at mode 575 (exports_file|files|name|types_sizes|compiled_files|deps|imports) took 5.387007051s 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 322.661431ms 
INFO [runner/unused/goanalysis] analyzers took 15.090283129s with top 10 stages: buildssa: 10.301643416s, U1000: 4.788639713s 
INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 1m41.150561507s with top 10 stages: buildssa: 38.616755762s, gofmt: 13.941436377s, golint: 12.181338544s, ineffassign: 7.597249561s, unconvert: 5.306994472s, inspect: 5.274666727s, varcheck: 2.707316975s, printf: 1.946889246s, ctrlflow: 1.569463711s, shadow: 1.219817439s 
WARN [runner] Can't run linter goanalysis_metalinter: findcall: analysis skipped: errors in package: [/home/agniva/play/go/src/github.com/mattermost/mattermost-server/testlib/resources.go:64:58: cannot use (func(fileInfo os.FileInfo) bool literal) (value of type func(fileInfo os.FileInfo) bool) as func(os.FileInfo) bool value in argument to fileutils.FindPath /home/agniva/play/go/src/github.com/mattermost/mattermost-server/testlib/resources.go:49:57: cannot use (func(fileInfo os.FileInfo) bool literal) (value of type func(fileInfo os.FileInfo) bool) as func(os.FileInfo) bool value in argument to fileutils.FindPath] 
INFO [runner] Issues before processing: 3, after processing: 0 
INFO [runner] Processors filtering stat (out/in): identifier_marker: 2/2, cgo: 3/3, filename_unadjuster: 3/3, path_prettifier: 3/3, skip_files: 3/3, exclude: 2/2, exclude-rules: 0/2, skip_dirs: 3/3, autogenerated_exclude: 2/3 
INFO [runner] processing took 270.673µs with stages: path_prettifier: 85.725µs, exclude: 82.895µs, autogenerated_exclude: 34.321µs, skip_dirs: 30.317µs, identifier_marker: 25.779µs, exclude-rules: 4.983µs, cgo: 2.18µs, filename_unadjuster: 1.048µs, diff: 709ns, max_same_issues: 707ns, nolint: 485ns, max_from_linter: 399ns, path_shortener: 254ns, max_per_file_from_linter: 243ns, source_code: 235ns, uniq_by_line: 201ns, skip_files: 192ns 
INFO [runner] linters took 24.468562251s with stages: goanalysis_metalinter: 16.106297827s, unused: 8.361894689s 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 187 samples, avg is 1190.1MB, max is 2485.7MB 
INFO Execution took 30.376538862s                 

You can see such an instance of this here: https://golangci.com/r/github.com/mattermost/mattermost-server/pulls/13090

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions