From b9d23fa8f92cad0471911e9fd39cb14e9cd4acd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 22 Jun 2019 14:47:28 +0200 Subject: [PATCH] Add a gofmt make target that only checks The standard "fmt" target will also rewrite Add return code, by checking for empty output --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b744c2c43f..015bd2af73 100755 --- a/Makefile +++ b/Makefile @@ -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: