Fixed make fmt-check

This commit is contained in:
konrad 2019-04-27 11:05:33 +02:00
parent 2c43925c56
commit a89be187b2
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 3 additions and 8 deletions

View File

@ -85,10 +85,8 @@ workspace:
path: src/git.kolaente.de/sofaraum/client
trigger:
branch:
- master
event:
- push
- tag
steps:
# Needed to get the versions right as they depend on tags

View File

@ -59,9 +59,6 @@ test:
go test -cover -coverprofile cover.out $(PACKAGES)
go tool cover -html=cover.out -o cover.html
required-gofmt-version:
@go version | grep -q '\(1.7\|1.8\|1.9\|1.10\|1.11\)' || { echo "We require go version 1.7, 1.8, 1.9, 1.10 or 1.11 to format code" >&2 && exit 1; }
.PHONY: lint
lint:
@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
@ -70,11 +67,11 @@ lint:
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
.PHONY: fmt
fmt: required-gofmt-version
fmt:
$(GOFMT) -w $(GOFILES)
.PHONY: fmt-check
fmt-check: required-gofmt-version
fmt-check:
# get all go files and run go fmt on them
@diff=$$($(GOFMT) -d $(GOFILES)); \
if [ -n "$$diff" ]; then \