Skip to content

Commit 9ab6cdb

Browse files
committed
test.bash: don't run "go tool vet" if vendor dir exists
...this fails in a thousand ways: [...] vendor/golang.org/x/crypto/sha3/keccakf_amd64.s:324: [amd64] keccakF1600: unknown variable state; offset 0 is a+0(FP) vendor/golang.org/x/crypto/ssh/certs.go:172: declaration of "err" shadows declaration at vendor/golang.org/x/crypto/ssh/certs.go:166 vendor/golang.org/x/crypto/ssh/certs.go:187: declaration of "rest" shadows declaration at vendor/golang.org/x/crypto/ssh/certs.go:161 vendor/golang.org/x/crypto/ssh/certs.go:187: declaration of "ok" shadows declaration at vendor/golang.org/x/crypto/ssh/certs.go:161 vendor/golang.org/x/crypto/ssh/client_auth.go:226: declaration of "err" shadows declaration at vendor/golang.org/x/crypto/ssh/client_auth.go:193 vendor/golang.org/x/crypto/ssh/client_auth.go:394: declaration of "err" shadows declaration at vendor/golang.org/x/crypto/ssh/client_auth.go:380 vendor/golang.org/x/crypto/ssh/client_auth.go:405: declaration of "err" shadows declaration at vendor/golang.org/x/crypto/ssh/client_auth.go:380 vendor/golang.org/x/crypto/ssh/handshake.go:566: declaration of "err" shadows declaration at vendor/golang.org/x/crypto/ssh/handshake.go:547 vendor/golang.org/x/crypto/ssh/handshake.go:592: declaration of "err" shadows declaration at vendor/golang.org/x/crypto/ssh/handshake.go:547 vendor/golang.org/x/crypto/ssh/handshake.go:630: declaration of "err" shadows declaration at vendor/golang.org/x/crypto/ssh/handshake.go:620 [...]
1 parent 8431381 commit 9ab6cdb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test.bash

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ if [[ $OSTYPE == linux* ]] ; then
3030
./build.bash
3131
fi
3232

33-
if go tool | grep vet > /dev/null ; then
34-
go tool vet -all -shadow .
35-
else
33+
if ! go tool | grep vet > /dev/null ; then
3634
echo "'go tool vet' not available - skipping"
35+
elif [[ -d vendor ]] ; then
36+
echo "vendor directory exists, skipping 'go tool vet'"
37+
else
38+
go tool vet -all -shadow .
3739
fi
3840

3941
# We don't want all the subprocesses holding the lock file open

0 commit comments

Comments
 (0)