@@ -22,7 +22,7 @@ VERSION_PACKAGE:=$(REPOSITORY_PACKAGE)/application
2222GO_BUILD_FLAGS:=-buildvcs =false
2323GO_LD_FLAGS: =-ldflags '-X $(VERSION_PACKAGE ) .VersionBase=$(VERSION_BASE ) -X $(VERSION_PACKAGE ) .VersionShortCommit=$(VERSION_SHORT_COMMIT ) -X $(VERSION_PACKAGE ) .VersionFullCommit=$(VERSION_FULL_COMMIT ) '
2424
25- FIND_MAIN_CMD: =find . -path './$(BUILD ) *' -not -path './vendor/*' -name '*.go' -not -name '*_test.go' -type f -exec egrep -l '^\s*func\s+main\s*(\s*)' {} \;
25+ FIND_MAIN_CMD: =find . -path './$(BUILD ) *' -not -path './.gvm_local/*' -not -path './ vendor/*' -name '*.go' -not -name '*_test.go' -type f -exec egrep -l '^\s*func\s+main\s*(\s*)' {} \;
2626TRANSFORM_GO_BUILD_CMD: =sed 's|\.\(.*\)\(/[^/]*\)/[^/]*|_bin\1\2\2 .\1\2/.|'
2727
2828GO_BUILD_CMD: =go build $(GO_BUILD_FLAGS ) $(GO_LD_FLAGS ) -o
@@ -96,13 +96,13 @@ ci-generate: generate format-write-changed imports-write-changed
9696format :
9797 @echo " gofmt -d -e -s"
9898 @cd $(ROOT_DIRECTORY ) && \
99- O=` find . -not -path ' ./vendor/*' -name ' *.go' -type f -exec gofmt -d -e -s {} \; 2>&1 ` && \
99+ O=` find . -not -path ' ./.gvm_local/* ' -not -path ' ./ vendor/*' -name ' *.go' -type f -exec gofmt -d -e -s {} \; 2>&1 ` && \
100100 [ -z " $$ {O}" ] || (echo " $$ {O}" && exit 1)
101101
102102format-write :
103103 @echo " gofmt -e -s -w"
104104 @cd $(ROOT_DIRECTORY ) && \
105- O=` find . -not -path ' ./vendor/*' -name ' *.go' -type f -exec gofmt -e -s -w {} \; 2>&1 ` && \
105+ O=` find . -not -path ' ./.gvm_local/* ' -not -path ' ./ vendor/*' -name ' *.go' -type f -exec gofmt -e -s -w {} \; 2>&1 ` && \
106106 [ -z " $$ {O}" ] || (echo " $$ {O}" && exit 1)
107107
108108format-write-changed :
@@ -112,13 +112,13 @@ format-write-changed:
112112imports : goimports
113113 @echo " goimports -d -e -local 'github.com/tidepool-org/platform'"
114114 @cd $(ROOT_DIRECTORY ) && \
115- O=` find . -not -path ' ./vendor/*' -not -path ' **/test/mock.go' -name ' *.go' -type f -exec goimports -d -e -local ' github.com/tidepool-org/platform' {} \; 2>&1 ` && \
115+ O=` find . -not -path ' ./.gvm_local/* ' -not -path ' ./ vendor/*' -not -path ' **/test/mock.go' -name ' *.go' -type f -exec goimports -d -e -local ' github.com/tidepool-org/platform' {} \; 2>&1 ` && \
116116 [ -z " $$ {O}" ] || (echo " $$ {O}" && exit 1)
117117
118118imports-write : goimports
119119 @echo " goimports -e -w -local 'github.com/tidepool-org/platform'"
120120 @cd $(ROOT_DIRECTORY ) && \
121- O=` find . -not -path ' ./vendor/*' -name ' *.go' -type f -exec goimports -e -w -local ' github.com/tidepool-org/platform' {} \; 2>&1 ` && \
121+ O=` find . -not -path ' ./.gvm_local/* ' -not -path ' ./ vendor/*' -name ' *.go' -type f -exec goimports -e -w -local ' github.com/tidepool-org/platform' {} \; 2>&1 ` && \
122122 [ -z " $$ {O}" ] || (echo " $$ {O}" && exit 1)
123123
124124imports-write-changed : goimports
@@ -137,7 +137,7 @@ vet-ignore:
137137lint : golint tmp
138138 @echo " golint"
139139 @cd $(ROOT_DIRECTORY ) && \
140- find . -not -path ' ./vendor/*' -name ' *.go' -type f | sort -d | xargs -I {} golint {} | grep -v ' exported.*should have comment.*or be unexported' 2> _tmp/golint.out > _tmp/golint.out || [ $$ {? } == 1 ] && \
140+ find . -not -path ' ./.gvm_local/* ' -not -path ' ./ vendor/*' -name ' *.go' -type f | sort -d | xargs -I {} golint {} | grep -v ' exported.*should have comment.*or be unexported' 2> _tmp/golint.out > _tmp/golint.out || [ $$ {? } == 1 ] && \
141141 diff .golintignore _tmp/golint.out || \
142142 exit 0
143143
@@ -325,7 +325,8 @@ clean-deploy:
325325
326326clean-all : clean
327327
328- pre-commit : format imports vet lint
328+ pre-commit : format imports vet
329+ # pre-commit: format imports vet lint
329330
330331gopath-implode :
331332 cd $(REPOSITORY_GOPATH ) && rm -rf bin pkg && find src -not -path " src/$( REPOSITORY_PACKAGE) /*" -type f -delete && find src -not -path " src/$( REPOSITORY_PACKAGE) /*" -type d -empty -delete
0 commit comments