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

Gitlab CI ERROR #884

Closed
3 tasks done
Steed-LHV opened this issue Dec 9, 2019 · 4 comments
Closed
3 tasks done

Gitlab CI ERROR #884

Steed-LHV opened this issue Dec 9, 2019 · 4 comments
Labels
bug Something isn't working stale No recent correspondence or work activity

Comments

@Steed-LHV
Copy link

Steed-LHV commented Dec 9, 2019

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 --version
golangci-lint has version 1.20.1 built from 849044b on 2019-10-15T19:12:01Z
Using Default
$ cat .golangci.yml
# paste output here
Go environment
$ go version && go env
$ golangci-lint --version
golangci-lint has version 1.20.1 built from 849044b on 2019-10-15T19:12:01Z
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
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="/project/repo/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-build005188697=/tmp/go-build -gno-record-gcc-switches"```

</details>

<details><summary>Verbose output of running</summary>

```bash
$ golangci-lint run -v
# paste output here
level=error msg="Running error: context loading failed: failed to load program with go/packages: could not determine GOARCH and Go compiler"
@tpounds tpounds added the bug Something isn't working label Dec 30, 2019
@zaynetro
Copy link

zaynetro commented Jan 2, 2020

For me upgrading to v1.22.2 resolved this issue.

@Dominik-K
Copy link
Contributor

@zuotw32: What's the output when adding the environment variables GL_DEBUG=linters_output GOPACKAGESPRINTGOLISTERRORS=1?

@cstevandy
Copy link

I got a similar issue. I have .golang-ci.yaml with run setting modules-download-mode: vendor, but when I ran it, the golangci-lint still tried to download some dependencies and I got the same error.

It was solved by explicitly type the modules-download-mode setting.
golangci-lint --modules-download-mode=vendor

@stale
Copy link

stale bot commented Apr 18, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Apr 18, 2021
@stale stale bot closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale No recent correspondence or work activity
Projects
None yet
Development

No branches or pull requests

5 participants