From 81efef7b5aea50f7b5032329058b8fa0fe575632 Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Tue, 7 Jan 2020 12:37:57 +0100 Subject: [PATCH] Don't lint EE code in TE CI (#13574) * Don't lint EE code in TE CI * Fix typo --- .circleci/config.yml | 2 +- Makefile | 4 ++++ build/Jenkinsfile.pr | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5bdb4bde7a..d71777ee09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,7 +69,7 @@ jobs: GO111MODULE=off go get -u github.com/mattermost/mattermost-govet cd mattermost-server make config-reset - make check-style BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}' + make check-style BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}' MM_NO_ENTERPRISE_LINT=true make build BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}' make package BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}' - store_artifacts: diff --git a/Makefile b/Makefile index 0f7454ad34..0f21ea7319 100644 --- a/Makefile +++ b/Makefile @@ -161,8 +161,10 @@ golangci-lint: ## Run golangci-lint on codebase @echo Running golangci-lint golangci-lint run ./... ifeq ($(BUILD_ENTERPRISE_READY),true) +ifneq ($(MM_NO_ENTERPRISE_LINT),true) golangci-lint run ./enterprise/... endif +endif i18n-extract: ## Extract strings for translation from the source code env GO111MODULE=off $(GO) get -u github.com/mattermost/mattermost-utilities/mmgotool @@ -456,8 +458,10 @@ vet: ## Run mattermost go vet specific checks $(GO) vet -vettool=$(GOPATH)/bin/mattermost-govet -license -structuredLogging ./... ifeq ($(BUILD_ENTERPRISE_READY),true) +ifneq ($(MM_NO_ENTERPRISE_LINT),true) $(GO) vet -vettool=$(GOPATH)/bin/mattermost-govet -enterpriseLicense -structuredLogging ./enterprise/... endif +endif todo: ## Display TODO and FIXME items in the source code. @! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime TODO diff --git a/build/Jenkinsfile.pr b/build/Jenkinsfile.pr index 2a1647c610..79ee6524bf 100644 --- a/build/Jenkinsfile.pr +++ b/build/Jenkinsfile.pr @@ -105,7 +105,7 @@ pipeline { echo "Installing mattermost-govet" GO111MODULE=off go get -u github.com/mattermost/mattermost-govet make config-reset - make check-style BUILD_NUMBER='${BRANCH_NAME}-${BUILD_NUMBER}' + make check-style BUILD_NUMBER='${BRANCH_NAME}-${BUILD_NUMBER}' MM_NO_ENTERPRISE_LINT=true make build BUILD_NUMBER='${BRANCH_NAME}-${BUILD_NUMBER}' make package BUILD_NUMBER='${BRANCH_NAME}-${BUILD_NUMBER}' """