Skip to content

Commit f079cd0

Browse files
committed
Fix go vet in git hooks
In my previous change, I messed up the go vet command line. This un-messes it up. We want the (harmless) errors from go list to go to /dev/null, but we want the errors from go vet to go to stdout so it can get captured. This closes keybase#1590.
1 parent c5fe0d6 commit f079cd0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎git-hooks/pre-commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ check_go_vet() {
4444
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$' | grep -v go/vendor/)
4545
[ -z "$gofiles" ] && return 0
4646

47-
warnings=$(go vet $(go list ./... 2>&1 | grep -v vendor))
47+
warnings=$(go vet $(go list ./... 2>/dev/null | grep -v vendor) 2>&1)
4848
[ -z "$warnings" ] && return 0
4949

5050
# go vet found issues

‎git-hooks/pre-push‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ check_go_fmt() {
4040
}
4141

4242
check_go_vet() {
43-
warnings=$(go vet $(go list ./... 2>&1 | grep -v vendor))
43+
warnings=$(go vet $(go list ./... 2>/dev/null | grep -v vendor) 2>&1)
4444
[ -z "$warnings" ] && return 0
4545

4646
# go vet found issues

0 commit comments

Comments
 (0)