diff --git a/sh/shellcheck.sh b/sh/shellcheck.sh index 567568c..7b04827 100644 --- a/sh/shellcheck.sh +++ b/sh/shellcheck.sh @@ -1,11 +1,13 @@ sh_shellcheck() { local root="${1}" - local file module modules + local file module modules path file="$(mktemp)" modules="$(sh_find_sh "${root}")" _sh_ifs_new for module in ${modules}; do - echo ". \"${root}/${module}\"" >>"${file}" + path="${root}/${module}" + shfmt --diff "${path}" + echo ". \"${path}\"" >>"${file}" done _sh_ifs_pop shellcheck \