mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-12-22 13:56:30 +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
|
||||
.test
|
||||
.vet
|
||||
.staticcheck
|
||||
.gocyclo
|
||||
gomtree
|
||||
|
|
11
Makefile
11
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue