Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Shell Script Linting

on:
push:
branches: [main]
paths:
- '.loom/scripts/**/*.sh'
- '.shellcheckrc'
- '.github/workflows/shellcheck.yml'
pull_request:
branches: [main]
paths:
- '.loom/scripts/**/*.sh'
- '.shellcheckrc'
- '.github/workflows/shellcheck.yml'

jobs:
shellcheck:
name: Shellcheck Validation
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
run: |
echo "Running shellcheck on all shell scripts in .loom/scripts/"
find .loom/scripts -type f -name "*.sh" -print0 | \
xargs -0 shellcheck --severity=warning --shell=bash

- name: Verify all scripts passed
run: |
echo "✅ All shell scripts passed shellcheck validation"
18 changes: 18 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Shellcheck configuration for Loom repository
#
# Target bash 3.2 for macOS compatibility
# See: https://github.com/koalaman/shellcheck/wiki/SC1090

# Specify shell dialect
shell=bash

# Disable specific rules that don't apply to our use case

# SC1090: Can't follow non-constant source
# We use dynamic sourcing patterns (e.g., source "${SCRIPT_DIR}/common.sh")
# which shellcheck can't statically analyze
disable=SC1090

# SC1091: Not following: file not found
# Similar to SC1090 - we source files that may not exist at check time
disable=SC1091
Loading