Closed
Description
WARN [runner] Can't run linter goanalysis_metalinter: goimports: open /go/src/github.com/grafana/loki/pkg/logql/pkg/logql/expr.y: no such file or directory
The expr.y
exists under /go/src/github.com/grafana/loki/pkg/logql
indeed.
Reproduce step:
- git clone https://github.com/daixiang0/loki.git
- check out update-golint
- run
make lint
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
refer to [link](https://github.com/daixiang0/loki/blob/update-golint/.golangci.yml)Go environment
$ go version && go env
go version go1.12.1 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/deploy/go"
GOPROXY="http://192.168.20.27:8000"
GORACE=""
GOROOT="/usr/lib/golang"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build972039009=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ golangci-lint run -v
# make lint
GO111MODULE=on GOGC=10 ./bin/golangci-lint run -v
INFO [config_reader] Config search paths: [./ /go/src/github.com/grafana/loki /go/src/github.com/grafana /go/src/github.com /go/src /go /]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 18 linters: [deadcode errcheck goconst gofmt goimports golint gosimple govet ineffassign interfacer misspell staticcheck structcheck typecheck unconvert unparam unused varcheck]
INFO [loader] Go packages loading at mode 575 (compiled_files|exports_file|name|types_sizes|deps|files|imports) took 2.286228456s
INFO [runner/filename_unadjuster] Pre-built 1 adjustments in 140.588798ms
INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 10m37.67786349s with top 10 stages: buildssa: 7m33.633120004s, ctrlflow: 24.053607327s, fact_purity: 21.935412659s, fact_deprecated: 21.49902466s, printf: 20.845789535s, inspect: 20.572082345s, goimports: 10.618553436s, gofmt: 7.597685167s, interfacer: 5.816696433s, unparam: 4.599163088s
WARN [runner] Can't run linter goanalysis_metalinter: goimports: open /go/src/github.com/grafana/loki/pkg/logql/pkg/logql/expr.y: no such file or directory
INFO [runner/unused/goanalysis] analyzers took 14.862776971s with top 10 stages: buildssa: 13.553725907s, U1000: 1.309051064s
INFO [runner] Issues before processing: 9, after processing: 0
INFO [runner] Processors filtering stat (out/in): skip_files: 7/7, exclude-rules: 2/2, cgo: 7/9, autogenerated_exclude: 2/7, path_prettifier: 7/7, skip_dirs: 7/7, identifier_marker: 2/2, exclude: 2/2, nolint: 0/2, filename_unadjuster: 7/7
INFO [runner] processing took 5.337681ms with stages: nolint: 4.951235ms, path_prettifier: 102.678µs, exclude: 93.718µs, identifier_marker: 57.984µs, autogenerated_exclude: 51.174µs, skip_dirs: 48.385µs, filename_unadjuster: 15.858µs, cgo: 9.914µs, max_same_issues: 1.895µs, path_shortener: 798ns, max_from_linter: 757ns, diff: 704ns, source_code: 699ns, uniq_by_line: 587ns, skip_files: 564ns, max_per_file_from_linter: 368ns, exclude-rules: 363ns
INFO [runner] linters took 1m5.185648428s with stages: goanalysis_metalinter: 58.910826734s, unused: 6.26925848s
INFO File cache stats: 179 entries of total size 7.1MiB
INFO Memory: 667 samples, avg is 575.3MB, max is 881.7MB
INFO Execution took 1m7.628324203s