From 9d45c0285c06b56f21f51cb94dae3609a1ed094a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 31 Jan 2025 23:34:44 +0100 Subject: [PATCH] lint/shell --- sh/lint/lint.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sh/lint/lint.sh b/sh/lint/lint.sh index bdee7bc..a41a166 100644 --- a/sh/lint/lint.sh +++ b/sh/lint/lint.sh @@ -1,5 +1,5 @@ # lint python code -rwx_python_lint() { +rwx_lint_python() { local path="${1}" local action set \ @@ -12,3 +12,16 @@ rwx_python_lint() { "rwx_${action}" "${path}" done } + +# lint shell code +rwx_lint_shell() { + local path="${1}" + local action + set \ + "shellcheck" \ + "shfmt" + for action in "${@}"; do + rwx_log "${action}" + "rwx_${action}" "${path}" + done +}