rwx/sh/shellcheck.sh

20 lines
368 B
Bash
Raw Normal View History

2024-11-25 17:39:25 +00:00
sh_shellcheck() {
local root="${1}"
local file module modules
file="$(mktemp)"
2024-11-25 19:46:09 +00:00
modules="$(sh_find_sh "${root}")"
2024-11-25 17:39:25 +00:00
_sh_ifs_new
for module in ${modules}; do
echo ". \"${root}/${module}\"" >>"${file}"
done
_sh_ifs_pop
shellcheck \
--check-sourced \
--enable "all" \
--exclude "3043" \
--external-sources \
--shell "dash" \
"${file}"
rm "${file}"
}