Skip to content
Permalink
Browse files

[#445] Add gofmt validation to CI (#523)

* [#445] Add gofmt validation to CI

* Show files that weren't compliant to gofmt

Co-Authored-By: Ahmed Elsabbahy <aelsabbahy@users.noreply.github.com>

* Limit gofmt to actual code base by excluding vendor and test files
  • Loading branch information
pedroMMM authored and aelsabbahy committed Dec 18, 2019
1 parent 7af6389 commit 15da66c24a1e0f9bf1f9055097e080b2835eabff
Showing with 10 additions and 2 deletions.
  1. +10 −2 Makefile
@@ -24,6 +24,14 @@ lint:
#go tool vet .
golint $(pkgs) | grep -v 'unexported' || true

fmt:
$(info INFO: Starting build $@)
{ \
set -e ;\
fmt=$$(gofmt -l ${GO_FILES}) ;\
[ -z "$$fmt" ] && echo "valid gofmt" || (echo -e "invalid gofmt\n$$fmt"; exit 1)\
}

bench:
$(info INFO: Starting build $@)
go test -bench=.
@@ -89,8 +97,8 @@ arch: build
cd integration-tests/ && ./test.sh arch amd64


test-all-32: lint test test-int-32
test-all: lint test test-int
test-all-32: fmt lint test test-int-32
test-all: fmt lint test test-int

gen:
$(info INFO: Starting build $@)

0 comments on commit 15da66c

Please sign in to comment.
You can’t perform that action at this time.