spawn/.github/workflows/lint.yml
Sprite 99e13e89ad ci: add shellcheck linting infrastructure
Added shellcheck to catch bash anti-patterns across 115 scripts:
- Created .shellcheckrc configuration
- Added GitHub Actions workflow (.github/workflows/lint.yml)
- Documented shellcheck usage in README

Currently found 3,598 warnings (expected for unlinted codebase).
Using || true temporarily to not block PRs - warnings will be fixed
incrementally in follow-up tasks.

Common issues: SC2250 (missing braces), SC2162 (read without -r),
SC2312 (command substitution masking), SC1091 (sourcing pattern).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 01:08:34 +00:00

36 lines
928 B
YAML

name: Lint
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install ShellCheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Run ShellCheck on all bash scripts
run: |
# Find all .sh files, excluding node_modules and other irrelevant directories
# Note: Using || true temporarily - 3,598 existing warnings need gradual fixes
find . -name "*.sh" \
! -path "*/node_modules/*" \
! -path "*/.git/*" \
! -path "*/dist/*" \
! -path "*/build/*" \
-print0 | xargs -0 shellcheck || true
- name: ShellCheck version info
if: always()
run: shellcheck --version