mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-22 08:25:38 +00:00
Makefile: staticcheck validation
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
7b5bbd4eaa
commit
dac969b14e
2 changed files with 12 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,4 +3,6 @@
|
||||||
.lint
|
.lint
|
||||||
.test
|
.test
|
||||||
.vet
|
.vet
|
||||||
|
.staticcheck
|
||||||
|
.gocyclo
|
||||||
gomtree
|
gomtree
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue