Add varcheck to presubmit.

This commit is contained in:
Jeffrey Regan
2018-08-23 10:17:37 -07:00
parent 22c99aa535
commit f931e15653
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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 ./...
}