mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-30 12:59:32 +00:00
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>
36 lines
928 B
YAML
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
|