Add the old fmt and vet targets to legacy.mk (#13202)
* Add the old fmt and vet targets to legacy.mk This is to ease the transition until a time when everybody has moved to using golangci-lint. * Just run golangci-lint for make vet
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d8f5b2a4da
Коммит
bc496a0d96
@@ -4,6 +4,26 @@ test-te: test-server
|
||||
# test-ee used to just run the enterprise edition tests, but now runs whatever is available
|
||||
test-ee: test-server
|
||||
|
||||
## Old target to run go vet. Now it just invokes golangci-lint.
|
||||
govet: golangci-lint
|
||||
|
||||
gofmt: ## Runs gofmt against all packages. This is now subsumed by make golangci-lint.
|
||||
@echo Running GOFMT
|
||||
|
||||
@for package in $(TE_PACKAGES) $(EE_PACKAGES); do \
|
||||
echo "Checking "$$package; \
|
||||
files=$$($(GO) list $(GOFLAGS) -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' $$package); \
|
||||
if [ "$$files" ]; then \
|
||||
gofmt_output=$$(gofmt -d -s $$files 2>&1); \
|
||||
if [ "$$gofmt_output" ]; then \
|
||||
echo "$$gofmt_output"; \
|
||||
echo "gofmt failure"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
@echo "gofmt success"; \
|
||||
|
||||
# check-licenses was used to check the license of the files, but now is done through mattermost-govet
|
||||
check-licenses: vet
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user