fix vettool; run vet on all available packages (#10389)
#### Summary Unfortunately, `which shadow` didn't resolve to the shadow binary, so hard-code the expected path in `$GOPATH/bin`. At the same time, run `go vet` across both the server and enterprise (if present), reducing the number of required invocations. This is accompanied by an enterprise change to fix shadowing issues there. #### Ticket Link N/A (tooling upgrade) #### Checklist - [x] Has enterprise changes: https://github.com/mattermost/enterprise/pull/403
Этот коммит содержится в:
коммит произвёл
Hanzei
родитель
6903980152
Коммит
55103b0a78
11
Makefile
11
Makefile
@@ -290,14 +290,9 @@ clean-docker: ## Deletes the docker containers for local development.
|
||||
|
||||
govet: ## Runs govet against all packages.
|
||||
@echo Running GOVET
|
||||
$(GO) get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
|
||||
$(GO) vet $(GOFLAGS) $(TE_PACKAGES) || exit 1
|
||||
$(GO) vet -vettool=$(which shadow) $(GOFLAGS) $(TE_PACKAGES) || exit 1
|
||||
|
||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
$(GO) vet $(GOFLAGS) $(TE_PACKAGES) || exit 1
|
||||
$(GO) vet -vettool=$(which shadow) $(GOFLAGS) $(EE_PACKAGES) || exit 1
|
||||
endif
|
||||
$(GO) get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
|
||||
$(GO) vet $(GOFLAGS) $(ALL_PACKAGES) || exit 1
|
||||
$(GO) vet -vettool=$(GOPATH)/bin/shadow $(GOFLAGS) $(ALL_PACKAGES) || exit 1
|
||||
|
||||
gofmt: ## Runs gofmt against all packages.
|
||||
@echo Running GOFMT
|
||||
|
||||
Ссылка в новой задаче
Block a user