Skip to content

Commit 3672cc1

Browse files
committed
Run shellcheck in CI
1 parent baef6fe commit 3672cc1

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/shellcheck-exceptions.txt

Whitespace-only changes.

.github/workflows/shellcheck.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: shellcheck
2+
# This pipeline runs shellcheck on all files with extension .sh,
3+
# except the ones listed in .github/workflows/shellcheck-exceptions.txt.
4+
5+
on:
6+
push:
7+
merge_group:
8+
pull_request:
9+
10+
jobs:
11+
shellcheck:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v5
15+
16+
- name: Shellcheck
17+
run: |
18+
for file in $(git ls-files "*.sh")
19+
do
20+
if grep -q "$file" ".github/workflows/shellcheck-exceptions.txt"
21+
then
22+
echo "⚠️ $file is ignored from shellcheck's verifications. Please consider fixing it."
23+
else
24+
echo "shellcheck \"$file\""
25+
shellcheck "$file"
26+
fi
27+
done

0 commit comments

Comments
 (0)