diff --git a/GNUmakefile b/GNUmakefile index cb6632bc..2eb8e15c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -34,7 +34,7 @@ vet: fi fmt: - gofmt -w $(GOFMT_FILES) + gofmt -s -w $(GOFMT_FILES) fmtcheck: @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" diff --git a/scripts/gofmtcheck.sh b/scripts/gofmtcheck.sh index 1c055815..1fb21df2 100755 --- a/scripts/gofmtcheck.sh +++ b/scripts/gofmtcheck.sh @@ -2,7 +2,7 @@ # Check gofmt echo "==> Checking that code complies with gofmt requirements..." -gofmt_files=$(gofmt -l `find . -name '*.go' | grep -v vendor`) +gofmt_files=$(gofmt -s -l `find . -name '*.go' | grep -v vendor`) if [[ -n ${gofmt_files} ]]; then echo 'gofmt needs running on the following files:' echo "${gofmt_files}"