handle grepping stdout and stderr of go tools properly

This commit is contained in:
Anand Babu (AB) Periasamy
2015-08-09 19:34:37 -07:00
parent 36b9a4d3e6
commit 1c35f28f75
+4 -4
View File
@@ -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:"