hooks/pre-push-check
Full check runs before push
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | any |
| Scope | root |
| Kind | outcome |
| Source | library v0.2.0 |
| Selected by | fleetlint-recommended@v0.2.0 |
Requirement
The task runner’s check (make check, just check, task check, npm run check, ./gradlew check and the like) or a check script (./scripts/check.sh) runs as a pre-push hook: a pre-commit/prek hook with stages: [pre-push], or a command in lefthook’s pre-push. check-fast does not count.
Why
Pushing red is what breaks main for everyone else; the hook makes it impossible to do by accident.
Applies when
[".pre-commit-config.yaml", "lefthook.yml", "lefthook.yaml", "lefthook.toml", "lefthook.json", "lefthook.jsonc",
".lefthook.yml", ".lefthook.yaml", ".lefthook.toml", ".lefthook.json", ".lefthook.jsonc"].exists(f, file(f))Fix
Add a local hook whose entry is the task runner’s check (make check, just check, npm run check, …), with stages: [pre-push] and always_run: true.
Agent instruction: Add a repo: local hook running the repository’s task runner check (the command fleetlint check reports as the task runner, e.g. just check) at stage pre-push with pass_filenames: false and always_run: true.
See: https://fleetlint.org/baseline/#git-hooks
Generated by fleetlint docs from catalog v0.2.0.