Use new mattermost-govet (#18329)

```release-note
NONE
```
This commit is contained in:
Agniva De Sarker 2021-09-02 13:36:20 +05:30 committed by GitHub
parent 42e75fad4d
commit eaa6113cb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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"; \