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:
@@ -97,6 +97,16 @@ yamllint -d "{extends: relaxed, rules: {document-start: disable, line-length: di
|
||||
`packages.x86_64` syntax: one package per line, `[a-zA-Z0-9._@+\-]+` only, no trailing
|
||||
whitespace.
|
||||
|
||||
A **pre-commit hook** (`githooks/pre-commit`) runs the same ShellCheck pass on every
|
||||
commit, so CI failures surface before you push. Enable it once per clone:
|
||||
|
||||
```bash
|
||||
git config core.hooksPath githooks
|
||||
```
|
||||
|
||||
It skips linting (with a warning) when `shellcheck` is missing rather than blocking the
|
||||
commit; CI remains the enforcer. Bypass it with `git commit --no-verify`.
|
||||
|
||||
## Gotchas
|
||||
|
||||
- The profile root is the **repo root** (not a `releng/` subdirectory). CI builds with `mkarchiso -v -w "$PWD/work" -o "$PWD/out" -- "$PWD"` (`.gitea/workflows/build-iso.yaml`), and the local build command above does the same — never pass a `releng` path.
|
||||
|
||||
Reference in New Issue
Block a user