Skip to content

Commit 94befdc

Browse files
feat(makefile): add make check pre-push hook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3155c9b commit 94befdc

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,15 @@ repos:
8585
# hooks:
8686
# - id: terraform-docs-go
8787
# args: [--output-file, README.md]
88+
89+
# --- Pre-Push: Full Check Gate ---
90+
# Runs make check before every push. Skip with: git push --no-verify
91+
- repo: local
92+
hooks:
93+
- id: make-check
94+
name: make check
95+
entry: make check
96+
language: system
97+
always_run: true
98+
pass_filenames: false
99+
stages: [pre-push]

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Every DevRail-managed repo exposes these public targets:
5454
| `make docs` | Generate documentation (terraform-docs, tool version report) |
5555
| `make changelog` | Generate CHANGELOG.md from conventional commits (git-cliff) |
5656
| `make check` | Run all of the above in sequence |
57-
| `make install-hooks` | Install pre-commit hooks |
57+
| `make install-hooks` | Install pre-commit and pre-push hooks |
5858
| `make init` | Scaffold config files for declared languages |
5959

6060
### Naming Rules

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ install-hooks: ## Install pre-commit hooks
9191
fi
9292
@pre-commit install
9393
@pre-commit install --hook-type commit-msg
94-
@echo "Pre-commit hooks installed successfully. Hooks will run on every commit."
94+
@pre-commit install --hook-type pre-push
95+
@echo "Pre-commit hooks installed successfully. Hooks will run on commit and push."
9596

9697
lint: ## Run all linters
9798
$(DOCKER_RUN) make _lint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The Makefile is the universal execution interface. Every target produces consist
3232
| `make scan` | Run universal scanning (trivy, gitleaks) |
3333
| `make docs` | Generate documentation |
3434
| `make check` | Run all of the above; report composite summary |
35-
| `make install-hooks` | Install pre-commit hooks |
35+
| `make install-hooks` | Install pre-commit and pre-push hooks |
3636

3737
All targets except `help` and `install-hooks` delegate to the dev-toolchain Docker container (`ghcr.io/devrail-dev/dev-toolchain:v1`).
3838

0 commit comments

Comments
 (0)