1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-21 16:05:40 +00:00

Makefile: staticcheck validation

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2022-04-08 22:55:48 -04:00
parent 7b5bbd4eaa
commit dac969b14e
Signed by: vbatts
GPG key ID: 10937E57733F1362
2 changed files with 12 additions and 1 deletions

2
.gitignore vendored
View file

@ -3,4 +3,6 @@
.lint
.test
.vet
.staticcheck
.gocyclo
gomtree

View file

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