From d6e821ea4fb1d08ae1ff34202d30d4b0cf728f38 Mon Sep 17 00:00:00 2001 From: Zach Ramsay Date: Sun, 10 Dec 2017 22:11:24 +0000 Subject: [PATCH] linter: enable in CI & make deterministic --- Makefile | 10 +++++----- circle.yml | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d5fe913b2..7176ab101 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ GOTOOLS = \ github.com/mitchellh/gox \ github.com/Masterminds/glide \ - github.com/alecthomas/gometalinter \ + gopkg.in/alecthomas/gometalinter.v2 \ github.com/ckaznocha/protoc-gen-lint \ github.com/gogo/protobuf/protoc-gen-gogo \ github.com/gogo/protobuf/gogoproto @@ -62,7 +62,7 @@ get_deps: ensure_tools: go get -u -v $(GOTOOLS) - @gometalinter --install + @gometalinter.v2 --install get_vendor_deps: ensure_tools @rm -rf vendor/ @@ -71,11 +71,11 @@ get_vendor_deps: ensure_tools metalinter: protoc $(INCLUDE) --lint_out=. types/*.proto - gometalinter --vendor --deadline=600s --enable-all --disable=lll ./... + gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./... metalinter_test: - protoc $(INCLUDE) --lint_out=. types/*.proto - gometalinter --vendor --deadline=600s --disable-all \ + #protoc $(INCLUDE) --lint_out=. types/*.proto + gometalinter.v2 --vendor --deadline=600s --disable-all \ --enable=maligned \ --enable=deadcode \ --enable=goconst \ diff --git a/circle.yml b/circle.yml index 7d4545e54..95d1dea5e 100644 --- a/circle.yml +++ b/circle.yml @@ -2,7 +2,6 @@ machine: environment: GOPATH: /home/ubuntu/.go_workspace REPO: $GOPATH/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME - GO15VENDOREXPERIMENT: 1 hosts: circlehost: 127.0.0.1 localhost: 127.0.0.1 @@ -16,7 +15,7 @@ checkout: test: override: - - cd $REPO && make get_vendor_deps && make test_integrations + - cd $REPO && make get_vendor_deps && make metalinter_test && make test_integrations post: - cd "$REPO" && bash <(curl -s https://codecov.io/bash) -f coverage.txt - cd "$REPO" && mv coverage.txt "${CIRCLE_ARTIFACTS}"