Chore: Implement revive (#16200)

Since we do not like some of the default golint rules,
this commit proposes to use https://github.com/mgechev/revive.

And potential revive speed-up should't hurt :).

Right now, presented config (./conf/revive.toml) is permissive,
we might improve it over time however. Fixes for found revive
issues in the code are very limited so it wouldn't be large to review.

Also in this commit:

* Add annotations for makefile commands and declare phony targets

* Rename "gometalinter" script and CI command to "lint"
  since we are doing there a bit more then using gometalinter package

* Add Makefile rules to .editorconfig

* Documentation which mentioned "golint" replaced with revive

Fixes #16109
Ref #16160
This commit is contained in:
Oleg Gaidarenko
2019-03-27 17:53:49 +01:00
committed by GitHub
parent 33d1d427bc
commit 04b3afcd15
10 changed files with 110 additions and 27 deletions

View File

@@ -86,7 +86,7 @@ jobs:
name: check documentation spelling errors
command: 'codespell -I ./words_to_ignore.txt docs/'
gometalinter:
backend-lint:
docker:
- image: circleci/golang:1.11.5
environment:
@@ -96,8 +96,8 @@ jobs:
steps:
- checkout
- run:
name: Gometalinter tests
command: './scripts/gometalinter.sh'
name: backend lint
command: './scripts/backend-lint.sh'
test-frontend:
docker:
@@ -460,7 +460,7 @@ workflows:
filters: *filter-only-master
- codespell:
filters: *filter-only-master
- gometalinter:
- backend-lint:
filters: *filter-only-master
- test-frontend:
filters: *filter-only-master
@@ -476,7 +476,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-master
@@ -487,7 +487,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-master
@@ -497,7 +497,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
- build-all-enterprise
@@ -511,7 +511,7 @@ workflows:
filters: *filter-only-release
- codespell:
filters: *filter-only-release
- gometalinter:
- backend-lint:
filters: *filter-only-release
- test-frontend:
filters: *filter-only-release
@@ -527,7 +527,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-release
@@ -538,7 +538,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-release
@@ -549,7 +549,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-release
@@ -560,7 +560,7 @@ workflows:
filters: *filter-not-release-or-master
- codespell:
filters: *filter-not-release-or-master
- gometalinter:
- backend-lint:
filters: *filter-not-release-or-master
- test-frontend:
filters: *filter-not-release-or-master
@@ -578,7 +578,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
- cache-server-test
@@ -589,7 +589,7 @@ workflows:
- test-backend
- test-frontend
- codespell
- gometalinter
- backend-lint
- mysql-integration-test
- postgres-integration-test
- cache-server-test