build: add gometalinter and gometalinter_install Makefile targets

s3-about
Nick Craig-Wood 2018-05-04 15:19:07 +01:00
parent f1a43eca4d
commit 790a8a9aed
2 changed files with 24 additions and 0 deletions

14
.gometalinter.json Normal file
View File

@ -0,0 +1,14 @@
{
"Enable": [
"deadcode",
"errcheck",
"goimports",
"golint",
"ineffassign",
"structcheck",
"varcheck",
"vet"
],
"EnableGC": true,
"Vendor": true
}

View File

@ -56,6 +56,16 @@ else
@echo Skipping source quality tests as version of go too old
endif
gometalinter_install:
go get -u github.com/alecthomas/gometalinter
gometalinter --install --update
# We aren't using gometalinter as the default linter yet because
# 1. it doesn't support build tags: https://github.com/alecthomas/gometalinter/issues/275
# 2. can't get -printfuncs working with the vet linter
gometalinter:
gometalinter ./...
# Get the build dependencies
build_dep:
ifdef FULL_TESTS