Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/vet: fails to return correct exit code when given directory as input #8792
cmd/vet's docs (http://godoc.org/code.google.com/p/go.tools/cmd/vet) state the following: > Vet's exit code is 2 for erroneous invocation of the tool, 1 if a problem was reported, and 0 otherwise. However, sometimes its exit code is 0 even when there are problems found. Specifically, the exit code is always 0 whenever valid input that is a directory is given, regardless if problems were reported or otherwise. Thanks to Krzysztof (https://github.com/kjk) for originally discovering this issue. The fix is relatively trivial so I will be submitting a CL that fixes this shortly. What does 'go version' print? go version go1.3.1 darwin/amd64 What steps reproduce the problem? If possible, include a link to a program on play.golang.org. 1. run `go tool vet ./some-directory-with-problems/` 2. run `echo $?` What happened? exit code: 0 What should have happened instead? exit code: 1
This issue was closed.