Add gocyclo into source build, choosing cyclomatic complexity tolerance of 15 and below

This commit is contained in:
Harshavardhana
2015-03-25 15:49:42 -07:00
parent c366fdd2d8
commit 58082cd8dc
7 changed files with 164 additions and 128 deletions

View File

@@ -14,8 +14,9 @@ getdeps: checkdeps checkgopath
@go get github.com/tools/godep && echo "Installed godep"
@go get github.com/golang/lint/golint && echo "Installed golint"
@go get golang.org/x/tools/cmd/vet && echo "Installed vet"
@go get github.com/fzipp/gocyclo && echo "Installed gocyclo"
verifiers: getdeps vet fmt lint
verifiers: getdeps vet fmt lint cyclo
vet:
@echo "Running $@"
@@ -28,6 +29,10 @@ lint:
@echo "Running $@"
@test -z "$$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
cyclo:
@echo "Running $@"
@test -z "$$(gocyclo -over 15 . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
build-all: verifiers
@echo "Building Libraries"
@godep go generate ./...