This commit is contained in:
Marc Beninca 2024-11-29 17:21:19 +01:00
parent f25059d159
commit 57da8c6212
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 0 additions and 0 deletions

20
sh/lint/shellcheck.sh Normal file
View file

@ -0,0 +1,20 @@
rwx_shellcheck_check() {
local root="${1}"
local file module modules path
file="$(mktemp)"
modules="$(sh_find_sh "${root}")"
_sh_ifs_new
for module in ${modules}; do
path="${root}/${module}"
echo ". \"${path}\"" >>"${file}"
done
_sh_ifs_pop
shellcheck \
--check-sourced \
--enable "all" \
--exclude "3043" \
--external-sources \
--shell "dash" \
"${file}"
rm "${file}"
}