Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.22.2 on ubuntu 18.04 build failed #911

Closed
3 tasks done
RealBar opened this issue Jan 6, 2020 · 2 comments
Closed
3 tasks done

1.22.2 on ubuntu 18.04 build failed #911

RealBar opened this issue Jan 6, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@RealBar
Copy link

RealBar commented Jan 6, 2020

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
$ pwd
/home/wangyalou/workspace/go/golangci-lint-1.22.2
Config file
$ cat .golangci.yml
linters-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: 50

linters:
  # 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
  # - prealloc

run:
  skip-dirs:
    - test/testdata_etc
    - internal/cache
    - internal/renameio
    - internal/robustio

# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
  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 env
go version go1.13.5 linux/amd64
GO111MODULE=""
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
$ make
go build -o golangci-lint ./cmd/golangci-lint
GL_TEST_RUN=1 time ./golangci-lint run -v
INFO [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 3
3.14user 0.22system 0:01.08elapsed 311%CPU (0avgtext+0avgdata 192704maxresident)k
0inputs+472outputs (0major+62049minor)pagefaults 0swaps
Makefile:33: recipe for target 'test' failed
make: *** [test] Error 3
@tpounds tpounds added the bug Something isn't working label Jan 7, 2020
@ernado
Copy link
Member

ernado commented Jan 7, 2020

Seems like related to #885

@ernado
Copy link
Member

ernado commented Feb 4, 2020

Please check latest version, should be resolved now.
Feel free to reopen if needed.

@ernado ernado closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants