This commit is contained in:
Marc Beninca 2024-11-29 17:20:38 +01:00
parent 68a4d51870
commit f25059d159
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 8 additions and 2 deletions

View file

@ -132,7 +132,10 @@ rwx_main() {
sh_source_directory "${SH_USER}"
# run interactive extras
if sh_shell_interactive; then
# check
# check format
sh_log
rwx_shfmt "${SH_ROOT}"
# check syntax
sh_log
rwx_shellcheck_check "${SH_ROOT}"
# help

View file

@ -6,7 +6,6 @@ rwx_shellcheck_check() {
_sh_ifs_new
for module in ${modules}; do
path="${root}/${module}"
shfmt --diff "${path}"
echo ". \"${path}\"" >>"${file}"
done
_sh_ifs_pop

4
sh/shfmt.sh Normal file
View file

@ -0,0 +1,4 @@
rwx_shfmt_check() {
local root="${1}"
shfmt --diff "${root}"
}