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}"
|
sh_source_directory "${SH_USER}"
|
||||||
# run interactive extras
|
# run interactive extras
|
||||||
if sh_shell_interactive; then
|
if sh_shell_interactive; then
|
||||||
# check
|
# check format
|
||||||
|
sh_log
|
||||||
|
rwx_shfmt "${SH_ROOT}"
|
||||||
|
# check syntax
|
||||||
sh_log
|
sh_log
|
||||||
rwx_shellcheck_check "${SH_ROOT}"
|
rwx_shellcheck_check "${SH_ROOT}"
|
||||||
# help
|
# help
|
||||||
|
|
|
@ -6,7 +6,6 @@ rwx_shellcheck_check() {
|
||||||
_sh_ifs_new
|
_sh_ifs_new
|
||||||
for module in ${modules}; do
|
for module in ${modules}; do
|
||||||
path="${root}/${module}"
|
path="${root}/${module}"
|
||||||
shfmt --diff "${path}"
|
|
||||||
echo ". \"${path}\"" >>"${file}"
|
echo ". \"${path}\"" >>"${file}"
|
||||||
done
|
done
|
||||||
_sh_ifs_pop
|
_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