shfmt
This commit is contained in:
parent
68a4d51870
commit
f25059d159
3 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
4
sh/shfmt.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
rwx_shfmt_check() {
|
||||
local root="${1}"
|
||||
shfmt --diff "${root}"
|
||||
}
|
Loading…
Reference in a new issue