From 25f864e62f5cb3fe85fc1afcb8fb691b7e377308 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 29 Nov 2018 18:46:31 -0800 Subject: [PATCH] build: update goclean.sh to use go modules, not dep --- goclean.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/goclean.sh b/goclean.sh index 6422d0c..0a123f9 100755 --- a/goclean.sh +++ b/goclean.sh @@ -7,12 +7,17 @@ set -ex +test_targets=$(go list ./...) + # Automatic checks -test -z "$(go fmt $(glide novendor) | tee /dev/stderr)" +test -z "$(go fmt $test_targets | tee /dev/stderr)" + # test -z "$(goimports -l -w . | tee /dev/stderr)" -test -z "$(for package in $(glide novendor); do golint $package; done | grep -v 'ALL_CAPS\|OP_\|NewFieldVal\|RpcCommand\|RpcRawCommand\|RpcSend\|Dns\|api.pb.go\|StartConsensusRpc\|factory_test.go\|legacy\|UnstableAPI' | tee /dev/stderr)" -test -z "$(go vet $(glide novendor) 2>&1 | grep -v '^exit status \|Example\|newestSha\| not a string in call to Errorf$' | tee /dev/stderr)" -env GORACE="history_size=7 halt_on_errors=1" go test -race $(glide novendor) +test -z "$(for package in $test_targets; do golint $package; done | grep -v 'ALL_CAPS\|OP_\|NewFieldVal\|RpcCommand\|RpcRawCommand\|RpcSend\|Dns\|api.pb.go\|StartConsensusRpc\|factory_test.go\|legacy\|UnstableAPI' | tee /dev/stderr)" + +test -z "$(go vet $test_targets 2>&1 | grep -v '^exit status \|Example\|newestSha\| not a string in call to Errorf$' | tee /dev/stderr)" + +env GORACE="history_size=7 halt_on_errors=1" go test -v -race $test_targets # Run test coverage on each subdirectories and merge the coverage profile.