chore: Add pre-commit hook running shellcheck on every commit
Tests / tests (push) Successful in 3m11s
Tests / tests (push) Successful in 3m11s
This commit is contained in:
@@ -384,11 +384,25 @@ sudo mkarchiso -v -w work -o out/ .
|
||||
|
||||
### CI Checks (must pass before merge)
|
||||
|
||||
- **ShellCheck**: all `.sh` files checked with `shellcheck -x -s bash`
|
||||
- **ShellCheck**: all `.sh` files, plus extensionless bash scripts in `airootfs/usr/local/bin/`, checked with `shellcheck -x -s bash`
|
||||
- **yamllint**: all `.yml`/`.yaml` files (relaxed config)
|
||||
- **packages.x86_64 syntax**: one package per line, no trailing whitespace, `[a-zA-Z0-9._@+\-]+` only
|
||||
- **Package repo check**: every package in `packages.x86_64` must be resolvable via `pacman -Si` in allowed repos (`cachyos`, `extra`, `multilib`, `chaotic-aur`), OR have a pre-built `.pkg.tar.zst` in `localrepo/`, OR appear in `localrepo/build-end4-deps.sh`
|
||||
|
||||
### Git Hooks
|
||||
|
||||
A pre-commit hook (`githooks/pre-commit`) runs the ShellCheck pass on every commit, so lint failures surface before you push instead of in CI.
|
||||
|
||||
```bash
|
||||
# Enable once per clone
|
||||
git config core.hooksPath githooks
|
||||
|
||||
# Bypass the hook for a single commit
|
||||
git commit --no-verify
|
||||
```
|
||||
|
||||
If `shellcheck` is not installed the hook warns and skips rather than blocking the commit; CI remains the enforcer.
|
||||
|
||||
### Recommended VirtualBox Settings (for testing)
|
||||
|
||||
- RAM: 4GB minimum, 8GB recommended
|
||||
|
||||
Reference in New Issue
Block a user