Add a gofmt make target that only checks

The standard "fmt" target will also rewrite

Add return code, by checking for empty output
pull/4557/head
Anders F Björklund 2019-06-22 14:47:28 +02:00
parent cc0a1298d9
commit b9d23fa8f9
1 changed files with 6 additions and 1 deletions

View File

@ -217,7 +217,12 @@ gendocs: out/docs/minikube.md
.PHONY: fmt
fmt:
@gofmt -l -s -w $(SOURCE_DIRS)
@gofmt -s -w $(SOURCE_DIRS)
.PHONY: gofmt
gofmt:
@gofmt -s -l $(SOURCE_DIRS)
@test -z "`gofmt -s -l $(SOURCE_DIRS)`"
.PHONY: vet
vet: