This repository was archived by the owner on Sep 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-28
lines changed
Expand file tree Collapse file tree 1 file changed +12
-28
lines changed Original file line number Diff line number Diff line change 22
33source ./build
44
5- SRC="
6- config
7- config/validate
8- datasource
9- datasource/configdrive
10- datasource/file
11- datasource/metadata
12- datasource/metadata/cloudsigma
13- datasource/metadata/digitalocean
14- datasource/metadata/ec2
15- datasource/proc_cmdline
16- datasource/test
17- datasource/url
18- datasource/vmware
19- datasource/waagent
20- initialize
21- network
22- pkg
23- system
24- .
25- "
5+ SRC=$( find . -name ' *.go' \
6+ -not -path " ./vendor/*" )
7+
8+ PKG=$( cd gopath/src/${REPO_PATH} ; go list ./... | \
9+ grep --invert-match vendor)
2610
2711echo " Checking gofix..."
2812go tool fix -diff $SRC
2913
3014echo " Checking gofmt..."
31- gofmt -d -e $SRC
32-
33- # split SRC into an array and prepend REPO_PATH to each local package for go vet
34- split_vet=( ${SRC // / } )
35- VET_TEST= " ${REPO_PATH} ${split_vet[@] /#/ ${REPO_PATH} / } "
15+ res= $( gofmt -d -e -s $SRC )
16+ echo " ${res} "
17+ if [ -n " ${res} " ] ; then
18+ exit 1
19+ fi
3620
3721echo " Checking govet..."
38- go vet $VET_TEST
22+ go vet $PKG
3923
4024echo " Running tests..."
41- go test -timeout 60s -cover $@ ${VET_TEST } --race
25+ go test -timeout 60s -cover $@ ${PKG } --race
4226
4327echo " Success"
You can’t perform that action at this time.
0 commit comments