Skip to content
Merged
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
10 changes: 7 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*.ps1 -text diff
*.sh -text diff
*.cmd -text diff
# Shell scripts MUST be LF: they run on Linux/macOS/WSL and are served raw via
# `curl | bash`. CRLF here makes bash choke on the trailing \r.
*.sh text eol=lf

# Windows scripts keep CRLF.
*.ps1 text eol=crlf diff
*.cmd text eol=crlf
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on:
push:
branches: [main]
pull_request:

jobs:
shell:
name: Shell scripts parse + shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Regression guard: install.sh once shipped unparseable (broken line
# continuations). `bash -n` catches that class before it merges.
- name: bash -n (syntax check)
run: |
bash -n install.sh
bash -n cli/clawde.sh

- name: shellcheck
run: |
sudo apt-get update && sudo apt-get install -y shellcheck
shellcheck --severity=error install.sh cli/clawde.sh
Loading
Loading