Skip to content

Can't run linter goanalysis_metalinter: failed prerequisites #827

Closed
@nono

Description

@nono

Sometimes, when running golangci-lint on https://github.com/cozy/cozy-stack, I have a warning about failed_prerequisites:

WARN [runner] Can't run linter goanalysis_metalinter: fact_purity: failed prerequisites: [email protected]/cozy/cozy-stack/model/instance/lifecycle [github.com/cozy/cozy-stack/model/app.test]
  • 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
$ cat .golangci.yml
cat: .golangci.yml: No such file or directory
Go environment
$ go version && go env
go version go1.13.1 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/nono/.cache/go-build"
GOENV="/home/nono/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/nono/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/nix/store/2kzdq7gyxz9jqfqcrp97z2y03vbw4glc-go-1.13.1/share/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/nix/store/2kzdq7gyxz9jqfqcrp97z2y03vbw4glc-go-1.13.1/share/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="/nix/store/7hzmz83nv8khpwsk858yaac7y3idh0a7-gcc-wrapper-8.3.0/bin/cc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/nono/cc/stack/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-build302705204=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /home/nono/cc/stack /home/nono/cc /home/nono /home /] 
INFO [lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck] 
INFO [loader] Go packages loading at mode 575 (exports_file|types_sizes|compiled_files|deps|files|imports|name) took 2.691690133s 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 70.353413ms 
INFO [runner/unused/goanalysis] analyzers took 5.857582585s with top 10 stages: buildssa: 4.867487779s, U1000: 990.094806ms 
INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 9.763996494s with top 10 stages: buildssa: 4.693446351s, ineffassign: 503.987592ms, vrp: 405.948511ms, inspect: 367.360506ms, varcheck: 167.809469ms, SA4018: 166.777714ms, isgenerated: 163.478578ms, deadcode: 160.6481ms, errcheck: 147.053834ms, structcheck: 142.659624ms 
WARN [runner] Can't run linter goanalysis_metalinter: ctrlflow: failed prerequisites: [email protected]/cozy/cozy-stack/web/accounts [github.com/cozy/cozy-stack/web/middlewares.test] 
INFO [runner] processing took 4.732µs with stages: max_same_issues: 1.074µs, skip_dirs: 500ns, cgo: 493ns, nolint: 373ns, filename_unadjuster: 361ns, max_from_linter: 303ns, exclude: 226ns, skip_files: 201ns, path_prettifier: 200ns, uniq_by_line: 170ns, identifier_marker: 154ns, max_per_file_from_linter: 140ns, diff: 138ns, path_shortener: 134ns, autogenerated_exclude: 89ns, source_code: 89ns, exclude-rules: 87ns 
INFO [runner] linters took 3.157498783s with stages: unused: 1.664301241s, goanalysis_metalinter: 1.493144531s 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 60 samples, avg is 407.5MB, max is 1076.4MB 
INFO Execution took 5.924849209s

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