Skip to content

Commit fafed11

Browse files
committed
[.github] Update shellcheck CI job for manifest/gencode-* directories
1 parent b588f7c commit fafed11

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

.github/workflows/shellcheck.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,20 @@ jobs:
8686
"${type}"/gencode-local \
8787
"${type}"/gencode-remote
8888
do
89-
test -e "${c}" || continue
90-
91-
shellcheck ${SHELLCHECKOPTS-} "${c}" || rc=1
89+
set --
90+
if test -d "${c}"
91+
then
92+
if test -f "${c}/init"
93+
then
94+
set -- "$@" "${c}/init"
95+
else
96+
set -- "$@" "${c}"/*
97+
fi
98+
elif test -f "${c}"
99+
then
100+
set -- "$@" "${c}"
101+
fi
102+
shellcheck ${SHELLCHECKOPTS-} "$@" || rc=1
92103
done
93104
94105
if test -d "${type}/explorer"
@@ -169,9 +180,20 @@ jobs:
169180
"${type}"/gencode-local \
170181
"${type}"/gencode-remote
171182
do
172-
test -e "${c}" || continue
173-
174-
shellcheck -f gcc ${SHELLCHECKOPTS-} "${c}" \
183+
set --
184+
if test -d "${c}"
185+
then
186+
if test -f "${c}/init"
187+
then
188+
set -- "$@" "${c}/init"
189+
else
190+
set -- "$@" "${c}"/*
191+
fi
192+
elif test -f "${c}"
193+
then
194+
set -- "$@" "${c}"
195+
fi
196+
shellcheck -f gcc ${SHELLCHECKOPTS-} "$@" \
175197
| proc_shellcheck_output \
176198
|| rc=1
177199
done

0 commit comments

Comments
 (0)