summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2025-07-16 15:54:54 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-07-28 12:53:26 +0200
commit67e423edb25a3b565cd649a04ae73aa6446115d4 (patch)
tree405079ee7caa9a3fece445443db8721630a5a7dc /Makefile
parent7ee3dc9d74c845ad0c9cda52b300b7a4bb0da1c7 (diff)
[enh] CI - add shell script formatter
Implement rules and functions to format shell scripts: $ make format.shell or alternatively to format all source code: $ make format The formatter `shfmt` reads the rules from the editorconfig[1] If any EditorConfig files are found, they will be used to apply formatting options. If any parser or printer flags are given to the tool, no EditorConfig files will be used. [1] https://github.com/patrickvane/shfmt?tab=readme-ov-file#description Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4c633e1fc..860b91704 100644
--- a/Makefile
+++ b/Makefile
@@ -47,8 +47,8 @@ search.checker.%: install
$(Q)./manage pyenv.cmd searxng-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
PHONY += test ci.test test.shell
-ci.test: test.yamllint test.black test.types.ci test.pylint test.unit test.robot test.rst test.shell test.pybabel
-test: test.yamllint test.black test.types.dev test.pylint test.unit test.robot test.rst test.shell
+ci.test: test.yamllint test.black test.types.ci test.pylint test.unit test.robot test.rst test.shell test.shfmt test.pybabel
+test: test.yamllint test.black test.types.dev test.pylint test.unit test.robot test.rst test.shell test.shfmt
test.shell:
$(Q)shellcheck -x -s dash \
container/entrypoint.sh
@@ -64,6 +64,8 @@ test.shell:
utils/searxng.sh
$(Q)$(MTOOLS) build_msg TEST "$@ OK"
+PHONY += format
+format: format.python format.shell
# wrap ./manage script
@@ -77,8 +79,8 @@ MANAGE += gecko.driver
MANAGE += node.env node.env.dev node.clean
MANAGE += py.build py.clean
MANAGE += pyenv pyenv.install pyenv.uninstall
-MANAGE += format.python
-MANAGE += test.yamllint test.pylint test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean test.themes test.types.dev test.types.ci
+MANAGE += format.python format.shell
+MANAGE += test.yamllint test.pylint test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean test.themes test.types.dev test.types.ci test.shfmt
MANAGE += themes.all themes.simple themes.fix themes.lint themes.test
MANAGE += static.build.commit static.build.drop static.build.restore
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs