-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
AnalysisIssues related to static analysis (vet, x/tools/go/analysis)Issues related to static analysis (vet, x/tools/go/analysis)NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.16.3 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="/home/manlio/.local/bin" GOCACHE="/home/manlio/.cache/go-build" GOENV="/home/manlio/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="*.local" GOMODCACHE="/home/manlio/.local/lib/go/pkg/mod" GONOPROXY="" GONOSUMDB="*.local" GOOS="linux" GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.16.3" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" 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-build541737785=/tmp/go-build -gno-record-gcc-switches" GOROOT/bin/go version: go version go1.16.3 linux/amd64 GOROOT/bin/go tool compile -V: compile version go1.16.3 uname -sr: Linux 5.11.11-arch1-1 /usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.33. gdb --version: GNU gdb (GDB) 10.1
Currently go vet
exit code is 2
both when it is invoked incorrectly (e.g. flags) and a problem is reported.
I think that in the case a problem is reported, go vet
exit code should be 1
instead of 2
, to differentiate the two cases.
Metadata
Metadata
Assignees
Labels
AnalysisIssues related to static analysis (vet, x/tools/go/analysis)Issues related to static analysis (vet, x/tools/go/analysis)NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.