File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,11 +89,18 @@ pre_commit/run:
8989test/parallel : $(TEST_SCRIPTS )
9090 @bash ./bashunit --parallel --simple $(TEST_SCRIPTS )
9191
92+ # sa: xargs (unlike `find -exec {} \;`) propagates shellcheck's exit code, so
93+ # findings actually fail the target; the excludes mirror the CI workflow's
94+ # SHELLCHECK_OPTS for local/CI parity. One file per invocation (like CI's
95+ # action) because shellcheck 0.11.0 can crash on multi-file batches with -x;
96+ # -P 4 keeps the wall time reasonable.
9297sa :
9398ifndef STATIC_ANALYSIS_CHECKER
9499 @printf "\e[1m\e[31m%s\e[0m\n" "Shellcheck not installed: Static analysis not performed!" && exit 1
95100else
96- @find . -name "*.sh" -not -path "./local/*" -exec shellcheck -xC {} \; && printf "\e[1m\e[32m%s\e[0m\n" "ShellCheck: OK!"
101+ @find . -name "*.sh" -not -path "./local/*" -print0 \
102+ | xargs -0 -n 1 -P 4 shellcheck -xC -e SC1091 -e SC2155 -e SC2016 \
103+ && printf "\e[1m\e[32m%s\e[0m\n" "ShellCheck: OK!"
97104endif
98105
99106lint :
You can’t perform that action at this time.
0 commit comments