Fix format errors and add gofmt and golines to Makefile

This commit is contained in:
Daniel Carrillo 2021-11-21 18:23:36 +01:00
parent 2807e2afc9
commit 2571e22843
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 8 additions and 2 deletions

View File

@ -22,8 +22,14 @@ install-tools:
@command $(GOPATH)/shadow > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.1.7; \
fi
@command $(GOPATH)/golines > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go install github.com/segmentio/golines@latest; \
fi
.PHONY: lint
lint: install-tools
gofmt -l . && test -z $$(gofmt -l .)
golines -l . && test -z $$(golines -l .)
golangci-lint run
shadow ./...