From 790a8a9aed3e120a7052e6afafa10303a4ef25e5 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 4 May 2018 15:19:07 +0100 Subject: [PATCH] build: add gometalinter and gometalinter_install Makefile targets --- .gometalinter.json | 14 ++++++++++++++ Makefile | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .gometalinter.json diff --git a/.gometalinter.json b/.gometalinter.json new file mode 100644 index 000000000..4cd25d5ba --- /dev/null +++ b/.gometalinter.json @@ -0,0 +1,14 @@ +{ + "Enable": [ + "deadcode", + "errcheck", + "goimports", + "golint", + "ineffassign", + "structcheck", + "varcheck", + "vet" + ], + "EnableGC": true, + "Vendor": true +} diff --git a/Makefile b/Makefile index 2835626b2..366115625 100644 --- a/Makefile +++ b/Makefile @@ -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