diff --git a/.travis.yml b/.travis.yml index 3707a419..1daf9377 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: minimal env: global: - GOVERSION=1.13.8 - - GOMETALINTER_VERSION=2.0.11 + - GOLANGCI_LINT_VERSION=v1.24.0 - GITHUB_RELEASE_VERSION=0.7.2 matrix: @@ -31,9 +31,8 @@ matrix: # go - (cd ~ && curl -fsSLO https://dl.google.com/go/go${GOVERSION}.darwin-amd64.tar.gz) - mkdir ~/go-${GOVERSION} && tar xf ~/go${GOVERSION}.darwin-amd64.tar.gz -C ~/go-${GOVERSION} --strip-components 1 - # gometalinter - - (cd ~ && curl -fsSLO https://github.com/alecthomas/gometalinter/releases/download/v${GOMETALINTER_VERSION}/gometalinter-${GOMETALINTER_VERSION}-darwin-amd64.tar.gz) - - tar -xf ~/gometalinter-${GOMETALINTER_VERSION}-darwin-amd64.tar.gz -C /usr/local/bin --strip-components 1 + # golangci-linter + - (cd ~ && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s ${GOLANGCI_LINT_VERSION}) # github-release - (cd ~ && curl -fsSLO https://github.com/aktau/github-release/releases/download/v${GITHUB_RELEASE_VERSION}/darwin-amd64-github-release.tar.bz2) - tar -xf ~/darwin-amd64-github-release.tar.bz2 -C /usr/local/bin --strip-components 3 diff --git a/build/Dockerfile b/build/Dockerfile index 822b7a12..387aaa0f 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -43,11 +43,10 @@ ENV ARCH x64 RUN curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner -# Fetch gometalinter -ENV GOMETALINTER_VERSION 2.0.11 +# Fetch golangci-lint +ENV GOLANGCI_LINT_VERSION v1.24.0 ENV ARCH amd64 -RUN curl -fsSLO --compressed "https://github.com/alecthomas/gometalinter/releases/download/v$GOMETALINTER_VERSION/gometalinter-$GOMETALINTER_VERSION-linux-$ARCH.tar.gz" \ - && tar -xf "gometalinter-$GOMETALINTER_VERSION-linux-$ARCH.tar.gz" -C /usr/local/bin --strip-components=1 --no-same-owner +RUN curl -fsSLO curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT} # Fetch gosu ENV GOSU_VERSION 1.11 diff --git a/run-tests.sh b/run-tests.sh index 38209985..e75bcf73 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -32,14 +32,15 @@ echo "==> Running eslint on examples" echo echo "==> Running go linters" -gometalinter --tests --vendor --disable-all --deadline=600s \ - --enable=misspell \ - --enable=vet \ - --enable=ineffassign \ - --enable=gofmt \ - --enable=deadcode \ - --enable=golint \ - ./... +golangci-lint run --no-config --timeout=600s \ + --disable-all --enable=deadcode --enable=golint --enable=varcheck \ + --enable=structcheck --enable=dupl --enable=ineffassign \ + --enable=interfacer --enable=govet --enable=gofmt --enable=misspell \ + ./... + +# these are unused linters at present; some may fail. +# --enable=unconvert --enable=megacheck --enable=errcheck --enable=maligned +# --enable=goconst --enable=gosec # Tests, both unit tests and integration tests under /tests echo