mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 22:35:39 +03:00
Make sure fmt catches all templates (#20979)
* Make sure fmt catches all templates Make's `wildcard` is not recursive so it missed many template files, fix that by using `find`. * Update Makefile
This commit is contained in:
parent
c80ca94ab1
commit
647b2649b1
62 changed files with 251 additions and 251 deletions
2
Makefile
2
Makefile
|
@ -243,7 +243,7 @@ clean:
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
|
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
|
||||||
$(eval TEMPLATES := $(wildcard templates/**/*.tmpl))
|
$(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
|
||||||
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
|
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
|
||||||
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)
|
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue