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

Run with go 1.14.4 under MacOS 10.15.5 produces error output. #1220

Closed
3 tasks done
AllenDang opened this issue Jul 9, 2020 · 4 comments
Closed
3 tasks done

Run with go 1.14.4 under MacOS 10.15.5 produces error output. #1220

AllenDang opened this issue Jul 9, 2020 · 4 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or improvement won't fix This will not be worked on

Comments

@AllenDang
Copy link

AllenDang commented Jul 9, 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
$ golangci-lint --version
golangci-lint has version 1.28.1 built from d24bff5 on 2020-07-06T16:24:47Z
Config file
no config file
Go environment
$ go version && go env
go version go1.14.4 darwin/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/allendang/Library/Caches/go-build"
GOENV="/Users/allendang/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/allendang/Documents/Gocode"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/allendang/Documents/Gocode/src/github.com/AllenDang/awEchoId/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=/var/folders/y0/ghys9qvn4c7cykcv61jhb__r0000gn/T/go-build150863691=/tmp/go-build -gno-record-gcc-switches -fno-common"
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
# paste output here

I ran `golangci-lint run' without config file.

Here is the test function.

func TestFunc() {
	var i int
}

Expected result

main.go:10:6: i declared but not used

Actual result

WARN [runner] Can't run linter goanalysis_metalinter: S1001: failed prerequisites: [(inspect@github.com/AllenDang/alfredworkflows/echoid, isgenerated@github.com/AllenDang/alfredworkflows/echoid): analysis skipped: errors in package: [/Users/allendang/Documents/Gocode/src/github.com/AllenDang/awEchoId/main.go:56:6: i declared but not used]] 
WARN [runner] Can't run linter unused: buildir: analysis skipped: errors in package: [/Users/allendang/Documents/Gocode/src/github.com/AllenDang/awEchoId/main.go:56:6: i declared but not used] 
ERRO Running error: buildir: analysis skipped: errors in package: [/Users/allendang/Documents/Gocode/src/github.com/AllenDang/awEchoId/main.go:56:6: i declared but not used] 
@AllenDang AllenDang added the bug Something isn't working label Jul 9, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 9, 2020

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@sayboras
Copy link
Member

sayboras commented Jul 9, 2020

@AllenDang I reckon the above will not compile if you run go build.

There is related #1043 feature request here.

@sayboras sayboras added duplicate This issue or pull request already exists enhancement New feature or improvement won't fix This will not be worked on and removed bug Something isn't working labels Jul 9, 2020
@AllenDang
Copy link
Author

@sayboras Oh, yes, that's exactly the same. I'm also willing to have golangci-lint report compile error as the same format for the linting warnings.

@sayboras
Copy link
Member

sayboras commented Jul 9, 2020

@AllenDang thanks for your confirmation, I think we can close this issue and track feature request in #1043

Feel free to add comment/inputs in #1043 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or improvement won't fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants