Skip to content

Commit 29e0a9d

Browse files
smuppandmwasilew
authored andcommitted
This commit introduces a GitHub Actions workflow that runs ShellCheck on all shell scripts within the repository.
It helps enforce shell scripting best practices and maintain consistent code quality across test suites. Key additions: - defines the CI job using latest stable ShellCheck. - Targets scripts recursively from the root. - Fails the job if any warnings or errors are detected. This integration ensures early feedback during pull requests and prevents merging poorly formatted or unsafe shell code. Signed-off-by: Srikanth Muppandam <[email protected]>
1 parent a932bc1 commit 29e0a9d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/shellcheck.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Shell Lint
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
shellcheck:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Install ShellCheck 0.9.0-1
11+
run: sudo apt-get install -y shellcheck=0.9.0-1
12+
- name: Run ShellCheck with exclusions
13+
run: |
14+
find . -name '*.sh' -print0 | xargs -0 shellcheck -S warning -e SC1091,SC2230,SC3043

0 commit comments

Comments
 (0)