From 580c87e282ede744c278e403f66a40176d8a9ed7 Mon Sep 17 00:00:00 2001 From: Srikanth Muppandam Date: Wed, 14 May 2025 23:22:03 +0530 Subject: [PATCH] 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 --- .github/workflows/shellcheck.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/shellcheck.yml diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 00000000..ff790cd5 --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,14 @@ +name: Shell Lint + +on: [pull_request, push] + +jobs: + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install ShellCheck 0.9.0-1 + run: sudo apt-get install -y shellcheck=0.9.0-1 + - name: Run ShellCheck with exclusions + run: | + find . -name '*.sh' -print0 | xargs -0 shellcheck -S warning -e SC1091,SC2230,SC3043