1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-22 00:15:39 +00:00

Makefile: check cyclomatic complexity

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2022-04-08 22:08:50 -04:00
parent 106c52de51
commit 599ae15537
Signed by: vbatts
GPG key ID: 10937E57733F1362

View file

@ -16,6 +16,14 @@ validation: .test .lint .vet .cli.test
.PHONY: validation.tags .PHONY: validation.tags
validation.tags: .test.tags .vet.tags .cli.test validation.tags: .test.tags .vet.tags .cli.test
.PHONY: gocyclo
gocyclo: .gocyclo
CLEAN_FILES += .gocyclo
.gocyclo:
gocyclo -avg -over 15 -ignore 'vendor/*' . && touch $@
.PHONY: test .PHONY: test
test: .test test: .test
@ -69,7 +77,8 @@ $(BUILD): $(SOURCE_FILES)
go build -mod=vendor -o $(BUILD) $(BUILDPATH) go build -mod=vendor -o $(BUILD) $(BUILDPATH)
install.tools: install.tools:
@go get -u github.com/fatih/color ; \ @go install -u github.com/fatih/color@latest ; \
go install -u github.com/fzipp/gocyclo/cmd/gocyclo@latest ; \
if [ "$(findstring $(GO_VER),$(shell go version))" != "" ] ; then \ if [ "$(findstring $(GO_VER),$(shell go version))" != "" ] ; then \
go get -u golang.org/x/lint/golint ;\ go get -u golang.org/x/lint/golint ;\
fi fi