diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a890b49d95..ed246f392c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2 jobs: - lint: + deps: docker: - image: circleci/golang:1.12 environment: @@ -18,14 +18,7 @@ jobs: dep version dep status dep ensure -update -dry-run - - run: - name: Run linter - command: | - export PATH=$GOPATH/bin:$PATH - go get -t ./... - go get -u github.com/alecthomas/gometalinter - gometalinter --install - gometalinter --deadline 10m --config gometalinter.json --vendor ./... + test: docker: @@ -157,7 +150,7 @@ workflows: version: 2 test_and_build: jobs: - - lint: + - deps: filters: tags: only: /.*/ @@ -171,14 +164,14 @@ workflows: only: /.*/ - build-docker-images: requires: - - lint + - deps - test filters: tags: only: /.*/ - build-linux-packages: requires: - - lint + - deps - test filters: branches: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42014b9d996..7ec38529a61 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,14 +56,13 @@ go build **Running the linter**: -We make use of the [gometalinter](https://github.com/alecthomas/gometalinter) tool to lint the code in CI. To run it locally, first install it: +We make use of the [golangci-lint](https://github.com/golangci/golangci-lint) tool to lint the code in CI. To run it locally, first install it: ```bash -go get -u github.com/alecthomas/gometalinter -gometalinter --install +go get -u github.com/golangci/golangci-lint/cmd/golangci-lint ``` then run: ``` -gometalinter --deadline 10m --config gometalinter.json --vendor ./... +golangci-lint run --out-format=tab --new-from-rev master ./... ``` If you've added new dependencies you might also want to check and make sure all dependencies exists in `vendor/` folder by running: @@ -106,7 +105,7 @@ As you'd expect, please adhere to good ol' `gofmt` (there are plugins for most e Continuous integration will catch all of this if you don't, and it's fine to just fix linter complaints with another commit, but you can also run the linter yourself: ``` -gometalinter --config gometalinter.json --deadline 10m ./... +golangci-lint run --out-format=tab --new-from-rev master ./... ``` Comments in the source should wrap at 100 characters, but there's no maximum length or need to be brief here - please include anything one might need to know in order to understand the code, that you could reasonably expect any reader to not already know (you probably don't need to explain what a goroutine is). diff --git a/Makefile b/Makefile index 2783e418864..c10bd275222 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ format: .PHONY: check check: - gometalinter --deadline 10m --config gometalinter.json --vendor ./... + golangci-lint run --out-format=tab --new-from-rev master ./... go test -race -timeout 210s ./... .PHONY: docs diff --git a/release notes/upcoming.md b/release notes/upcoming.md index 76edc368d20..877392f167d 100644 --- a/release notes/upcoming.md +++ b/release notes/upcoming.md @@ -18,4 +18,5 @@ Now all http methods have an additional param called `compression` that will mak ## Internals -* JS: VU initialization time and memory usage has been significantly decreased by caching the parsed version of the core-js library. Thanks, @matlockx! (#1038) \ No newline at end of file +* JS: VU initialization time and memory usage has been significantly decreased by caching the parsed version of the core-js library. Thanks, @matlockx! (#1038) +* CI: removed the gometalinter check in CircleCI, since that project [was deprecated](https://github.com/alecthomas/gometalinter/issues/590) and now exclusively rely on [golangci-lint](https://github.com/golangci/golangci-lint). (#1039) \ No newline at end of file