1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-22 00:15:39 +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 .lint
.test .test
.vet .vet
.staticcheck
.gocyclo
gomtree gomtree

View file

@ -14,7 +14,7 @@ default: build validation
validation: .test .lint .vet .cli.test 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 .staticcheck
.PHONY: gocyclo .PHONY: gocyclo
gocyclo: .gocyclo gocyclo: .gocyclo
@ -24,6 +24,14 @@ CLEAN_FILES += .gocyclo
.gocyclo: .gocyclo:
gocyclo -avg -over 15 -ignore 'vendor/*' . && touch $@ gocyclo -avg -over 15 -ignore 'vendor/*' . && touch $@
.PHONY: staticcheck
staticcheck: .staticcheck
CLEAN_FILES += .staticcheck
.staticcheck:
staticcheck . && touch $@
.PHONY: test .PHONY: test
test: .test test: .test
@ -79,6 +87,7 @@ $(BUILD): $(SOURCE_FILES)
install.tools: install.tools:
@go install -u github.com/fatih/color@latest ; \ @go install -u github.com/fatih/color@latest ; \
go install -u github.com/fzipp/gocyclo/cmd/gocyclo@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 \ 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