From eaa6113cb43e3e7fa2ed4e1052fcff2c35f4a84d Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Thu, 2 Sep 2021 13:36:20 +0530 Subject: [PATCH] Use new mattermost-govet (#18329) ```release-note NONE ``` --- .circleci/config.yml | 2 -- .gitlab-ci.yml | 1 - Makefile | 5 +---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c52a7f2f1f..33609680d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -179,9 +179,7 @@ jobs: at: ~/mattermost/ - run: command: | - echo "Installing mattermost-govet" export GOBIN=${PWD}/mattermost-server/bin - GO111MODULE=off go get -u github.com/mattermost/mattermost-govet export PATH=$PATH:$GOBIN cd mattermost-server make config-reset diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab54eed166..7c47e6ca97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,6 @@ empty: image: $CI_REGISTRY/mattermost/ci/images/golangci-lint:v1.39.0-1 stage: test script: - - GO111MODULE=off GOBIN=$PWD/bin go get -u github.com/mattermost/mattermost-govet - make config-reset - make check-style #todo MM_VET_OPENSPEC_PATH='$CI_PROJECT_DIR/mattermost-api-reference/v4/html/static/mattermost-openapi-v4.yaml' timeout: 60 mins diff --git a/Makefile b/Makefile index 7b7304d2e3..df2a431eda 100644 --- a/Makefile +++ b/Makefile @@ -618,10 +618,7 @@ update-dependencies: ## Uses go get -u to update all the dependencies while hold $(GO) mod tidy vet: ## Run mattermost go vet specific checks - @if ! [ -x "$$(command -v $(GOBIN)/mattermost-govet)" ]; then \ - echo "mattermost-govet is not installed. Please install it executing \"GO111MODULE=off GOBIN=$(PWD)/bin go get -u github.com/mattermost/mattermost-govet\""; \ - exit 1; \ - fi; + $(GO) install github.com/mattermost/mattermost-govet/v2@new @VET_CMD="-license -structuredLogging -inconsistentReceiverName -inconsistentReceiverName.ignore=session_serial_gen.go,team_member_serial_gen.go,user_serial_gen.go -emptyStrCmp -tFatal -configtelemetry -errorAssertions"; \ if ! [ -z "${MM_VET_OPENSPEC_PATH}" ] && [ -f "${MM_VET_OPENSPEC_PATH}" ]; then \ VET_CMD="$$VET_CMD -openApiSync -openApiSync.spec=$$MM_VET_OPENSPEC_PATH"; \