diff --git a/.travis.yml b/.travis.yml index 0040ed07e..e2aec75a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ go: before_install: - source ./bin/consider-early-travis-exit.sh - sudo apt-get install tree + - go get -u github.com/opennota/check/cmd/varcheck - go get -u github.com/golang/lint/golint - go get -u golang.org/x/tools/cmd/goimports - go get -u github.com/onsi/ginkgo/ginkgo diff --git a/bin/pre-commit.sh b/bin/pre-commit.sh index aeb1681ae..ef4cf3a32 100755 --- a/bin/pre-commit.sh +++ b/bin/pre-commit.sh @@ -41,14 +41,14 @@ function testGoLint { diff -u <(echo -n) <(go_dirs | xargs -0 golint --min_confidence 0.85 ) } +# Not using the 'goimports' check because it reports hyphens in imported +# package names as errors, and we vendor in packages that have +# hyphens in their names. function testGoMetalinter { diff -u <(echo -n) <(go_dirs | xargs -0 gometalinter.v2 --disable-all --deadline 5m \ --enable=misspell \ --enable=structcheck \ --enable=deadcode \ -# Disabling 'goimports' because it reports hyphens in imported package \ -# names as errors, and we have to vendor them in regardless. \ -# --enable=goimports \ --enable=varcheck \ --enable=goconst \ --enable=unparam \ @@ -60,7 +60,6 @@ function testGoMetalinter { --dupl-threshold=400 --enable=dupl) } - function testGoVet { go vet -all ./... }