[pretty] shfmt only git files (#5395)

This commit is contained in:
Simon Lin
2020-08-14 22:17:45 -07:00
committed by GitHub
parent 8370395c47
commit d7a025cb91
+3 -3
View File
@@ -133,7 +133,7 @@ do_shell_format()
echo -e ' format shell'
echo -e '====================='
shfmt -f . | grep -v -E "^($(echo "${OT_EXCLUDE_DIRS[@]}" | tr ' ' '|'))" \
git ls-files | xargs shfmt -f | grep -v -E "^($(echo "${OT_EXCLUDE_DIRS[@]}" | tr ' ' '|'))" \
| xargs -n10 -P"$OT_BUILD_JOBS" shfmt -i 4 -bn -ci -fn -s -w
}
@@ -143,10 +143,10 @@ do_shell_check()
echo -e ' check shell'
echo -e '====================='
shfmt -f . | grep -v -E "^($(echo "${OT_EXCLUDE_DIRS[@]}" | tr ' ' '|'))" \
git ls-files | xargs shfmt -f | grep -v -E "^($(echo "${OT_EXCLUDE_DIRS[@]}" | tr ' ' '|'))" \
| xargs -n10 -P"$OT_BUILD_JOBS" shfmt -i 4 -bn -ci -fn -s -d
shfmt -f . | grep -v -E "^($(echo "${OT_EXCLUDE_DIRS[@]}" | tr ' ' '|'))" \
git ls-files | xargs shfmt -f | grep -v -E "^($(echo "${OT_EXCLUDE_DIRS[@]}" | tr ' ' '|'))" \
| xargs -n10 -P"$OT_BUILD_JOBS" shellcheck
}