From 1c35f28f752b5461fa2d98c2354eefafb12b0fba Mon Sep 17 00:00:00 2001 From: "Anand Babu (AB) Periasamy" Date: Sun, 9 Aug 2015 19:34:37 -0700 Subject: [PATCH] handle grepping stdout and stderr of go tools properly --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ee7741ec..c01794fe 100644 --- a/Makefile +++ b/Makefile @@ -24,19 +24,19 @@ vet: @go vet ./... fmt: @echo "Running $@:" - @test -z "$$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" || \ + @test -z "$$(gofmt -s -l . 2>&1 | grep -v 'Godeps/_workspace/src/')" || \ echo "+ please format Go code with 'gofmt -s'" lint: @echo "Running $@:" - @test -z "$$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" + @test -z "$$(golint ./... 2>&1 | grep -v 'Godeps/_workspace/src/')" cyclo: @echo "Running $@:" - @test -z "$$(gocyclo -over 30 . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" + @test -z "$$(gocyclo -over 30 . 2>&1 | grep -v 'Godeps/_workspace/src/')" deadcode: @echo "Running $@:" - @test -z "$$(deadcode | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" + @test -z "$$(deadcode 2>&1 | grep -v 'Godeps/_workspace/src/')" build: getdeps verifiers @echo "Installing mc:"