Skip to content

Commit 137e785

Browse files
committed
ci: run ShellCheck only on .sh files
1 parent c27f61a commit 137e785

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ jobs:
1919
sudo apt-get install -y shellcheck
2020
2121
- name: Run ShellCheck
22-
run: shellcheck $(git ls-files '*.sh' '*.zsh')
22+
run: |
23+
# Lint only POSIX‑compatible shell scripts; ShellCheck
24+
# doesn’t understand pure zsh files.
25+
sh_files=$(git ls-files '*.sh')
26+
if [ -n "$sh_files" ]; then
27+
shellcheck $sh_files
28+
else
29+
echo "No .sh files to lint"
30+
fi
2331
2432
- name: Set up Bats
2533
uses: mig4/setup-bats@v1

0 commit comments

Comments
 (0)