From 4bde23f38dabb4c2a12ca32b4d9d2f57e24be573 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Fri, 2 Sep 2016 10:44:51 +0900 Subject: [PATCH] CI: use ! cmd | grep '^' to check output Handling xargs option is troublesome... --- Makefile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 89237e9..fd43940 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,9 @@ deps: go get github.com/kisielk/errcheck go get github.com/client9/misspell/cmd/misspell -# http://syohex.hatenablog.com/entry/20140702/1404250291 -XARG_EMPTY='' -ifeq ("$(uname)", "LINUX") - XARG_EMPTY='-r' -endif - lint: deps - gofmt -d -s . | tee /dev/stderr | xargs $(XARG_EMPTY) false - golint ./... | tee /dev/stderr | xargs $(XARG_EMPTY) false + ! gofmt -d -s . | grep '^' # exit 1 if any output given + ! golint ./... | grep '^' go vet ./... errcheck -asserts -ignoretests -ignore 'Close' misspell -error **/*.go **/*.md