OpenAPI Mattermost Go Vet integration (#14216)
* integrating govet * added api spec check to CI
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f92d3fa518
Коммит
92380d83fc
9
Makefile
9
Makefile
@@ -517,9 +517,14 @@ 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;
|
||||
@VET_CMD="-license -structuredLogging -inconsistentReceiverName -tFatal"; \
|
||||
if ! [ -z "${MM_VET_OPENSPEC_PATH}" ] && [ -f "${MM_VET_OPENSPEC_PATH}" ]; then \
|
||||
VET_CMD="$$VET_CMD -openApiSync -openApiSync.spec=$$MM_VET_OPENSPEC_PATH"; \
|
||||
else \
|
||||
echo "MM_VET_OPENSPEC_PATH not set or spec yaml path in it is incorrect. Skipping API check"; \
|
||||
fi; \
|
||||
|
||||
$(GO) vet -vettool=$(GOBIN)/mattermost-govet -license -structuredLogging -inconsistentReceiverName -tFatal ./...
|
||||
$(GO) vet -vettool=$(GOBIN)/mattermost-govet $$VET_CMD ./...
|
||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
ifneq ($(MM_NO_ENTERPRISE_LINT),true)
|
||||
$(GO) vet -vettool=$(GOBIN)/mattermost-govet -enterpriseLicense -structuredLogging -tFatal ./enterprise/...
|
||||
|
||||
Ссылка в новой задаче
Block a user