Permalink
Browse files

CI: use ! cmd | grep '^' to check output

Handling xargs option is troublesome...
  • Loading branch information...
1 parent cf2fbeb commit 4bde23f38dabb4c2a12ca32b4d9d2f57e24be573 @haya14busa committed Sep 2, 2016
Showing with 2 additions and 8 deletions.
  1. +2 −8 Makefile
View
@@ -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

0 comments on commit 4bde23f

Please sign in to comment.