build: run erlfmt with files name by `$(FIND)`

This commit is contained in:
JimMoen 2024-06-04 16:25:22 +08:00
parent 3d992e4501
commit 023bb5e766
No known key found for this signature in database
1 changed files with 10 additions and 4 deletions

View File

@ -317,10 +317,16 @@ $(foreach tt,$(ALL_ELIXIR_TGZS),$(eval $(call gen-elixir-tgz-target,$(tt))))
.PHONY: fmt .PHONY: fmt
fmt: $(REBAR) fmt: $(REBAR)
@$(SCRIPTS)/erlfmt -w 'apps/*/{src,include,priv,test,integration_test}/**/*.{erl,hrl,app.src,eterm}' @$(FIND) . \( -name '*.app.src' -o \
@$(SCRIPTS)/erlfmt -w 'apps/*/rebar.config' 'apps/emqx/rebar.config.script' '.ci/fvt_tests/http_server/rebar.config' -name '*.erl' -o \
@$(SCRIPTS)/erlfmt -w 'rebar.config' 'rebar.config.erl' -name '*.hrl' -o \
@$(SCRIPTS)/erlfmt -w 'scripts/*.escript' 'bin/*.escript' 'bin/nodetool' -name 'rebar.config' -o \
-name '*.eterm' -o \
-name '*.escript' \) -not -path '*/_build/*' -type f \
| xargs $(SCRIPTS)/erlfmt -w
@$(SCRIPTS)/erlfmt -w 'apps/emqx/rebar.config.script'
@$(SCRIPTS)/erlfmt -w 'elvis.config'
@$(SCRIPTS)/erlfmt -w 'bin/nodetool'
@mix format @mix format
.PHONY: clean-test-cluster-config .PHONY: clean-test-cluster-config