spawn/.github/workflows/lint.yml
A 58c91571f1
fix: make macOS compat linter blocking and add 6 missing rules (#1867)
The linter was running in CI with --warn-only, meaning it never
blocked anything — effectively vaporware. This removes --warn-only
to make it a real gate.

Also adds rules for bash 4.0+ features that were documented in
CLAUDE.md but not enforced:
- MC014: readarray/mapfile (bash 4.0+)
- MC015: coproc (bash 4.0+)
- MC016: &>> redirect (bash 4.0+)
- MC017: relative source paths (breaks curl|bash)
- MC018: wait -n (bash 4.3+)
- MC019: declare -g (bash 4.2+)

Excludes .claude/worktrees/ from scanning (temp copies, not
committed code).

Co-authored-by: spawn-bot <spawn-bot@openrouter.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:50:12 -05:00

70 lines
1.6 KiB
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
biome:
name: Biome Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: packages/cli
run: bun install
- name: Run Biome format check
working-directory: packages/cli
run: bunx @biomejs/biome format src/
- name: Run Biome lint
working-directory: packages/cli
run: bunx @biomejs/biome lint src/
macos-compat:
name: macOS Compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run macOS compat linter
run: bash sh/test/macos-compat.sh