|
31 | 31 | GOFUMPT_PACKAGE ?= mvdan.cc/ [email protected]
|
32 | 32 | GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/ [email protected]
|
33 | 33 | GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/ [email protected]
|
34 |
| -MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/ [email protected] |
35 | 34 | SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/ [email protected]
|
36 | 35 | XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
37 | 36 | GO_LICENSES_PACKAGE ?= github.com/google/ [email protected]
|
@@ -263,7 +262,7 @@ clean:
|
263 | 262 |
|
264 | 263 | .PHONY: fmt
|
265 | 264 | fmt:
|
266 |
| - @MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}' |
| 265 | + @./build/gitea-fmt.sh -w |
267 | 266 | $(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
|
268 | 267 | @# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
|
269 | 268 | @$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)
|
@@ -314,7 +313,7 @@ errcheck:
|
314 | 313 | .PHONY: fmt-check
|
315 | 314 | fmt-check:
|
316 | 315 | @# get all go files and run gitea-fmt (with gofmt) on them
|
317 |
| - @diff=$$(MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -l '{file-list}'); \ |
| 316 | + @diff=$$(@./build/gitea-fmt.sh -l); \ |
318 | 317 | if [ -n "$$diff" ]; then \
|
319 | 318 | echo "Please run 'make fmt' and commit the result:"; \
|
320 | 319 | echo "$${diff}"; \
|
@@ -812,7 +811,6 @@ deps-backend:
|
812 | 811 | $(GO) install $(GOFUMPT_PACKAGE)
|
813 | 812 | $(GO) install $(GOLANGCI_LINT_PACKAGE)
|
814 | 813 | $(GO) install $(GXZ_PAGAGE)
|
815 |
| - $(GO) install $(MISSPELL_PACKAGE) |
816 | 814 | $(GO) install $(SWAGGER_PACKAGE)
|
817 | 815 | $(GO) install $(XGO_PACKAGE)
|
818 | 816 | $(GO) install $(GO_LICENSES_PACKAGE)
|
|
0 commit comments