rwx/sh/shellcheck.sh
2024-11-29 17:20:38 +01:00

20 lines
397 B
Bash

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}"
}