Skip to content

Commit 6139cad

Browse files
ulises-cclaude
andcommitted
Add pre-commit hooks mirroring CI (shellcheck + JSON + formatting)
- .pre-commit-config.yaml: shellcheck, check-json, end-of-file-fixer, trailing-whitespace — excludes macOS/ (zsh scripts unsupported) - CI lint.yml: exclude macOS/ from shellcheck to match - Fix missing trailing newlines in macOS/zshrc.example and bookmarks.yaml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3142350 commit 6139cad

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
scandir: .
1818
severity: warning
19+
ignore_paths: macOS
1920

2021
json-validate:
2122
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/shellcheck-py/shellcheck-py
3+
rev: v0.10.0.1
4+
hooks:
5+
- id: shellcheck
6+
args: [--severity=warning]
7+
exclude: ^macOS/
8+
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v5.0.0
11+
hooks:
12+
- id: check-json
13+
- id: end-of-file-fixer
14+
- id: trailing-whitespace
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

macOS/zshrc.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ export PATH="$PATH:/Users/ulises/.local/bin"
120120

121121
# zsh auto suggestions & syntax highlighting (installed via Homebrew)
122122
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
123-
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
123+
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

0 commit comments

Comments
 (0)