mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-29 04:19:30 +00:00
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>
70 lines
1.6 KiB
YAML
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
|