Skip to content

Commit 3b73d65

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

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,15 @@ repos:
2424
rev: v8.21.2
2525
hooks:
2626
- id: gitleaks
27+
28+
# --- Pre-Push: Full Check Gate ---
29+
# Runs make check before every push. Skip with: git push --no-verify
30+
- repo: local
31+
hooks:
32+
- id: make-check
33+
name: make check
34+
entry: make check
35+
language: system
36+
always_run: true
37+
pass_filenames: false
38+
stages: [pre-push]

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ check: ## Run all checks (lint, format, test, security, docs)
4343

4444
install-hooks: ## Install pre-commit hooks
4545
pre-commit install
46+
pre-commit install --hook-type pre-push
4647

4748
# Internal targets
4849
_lint:

content/docs/getting-started/new-project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Supported languages: `python`, `bash`, `terraform`, `ansible`, `ruby`, `go`, `ja
4444
make install-hooks
4545
```
4646

47-
This sets up pre-commit hooks that run formatting checks and secret detection on every commit.
47+
This sets up pre-commit hooks that run formatting checks and secret detection on every commit, plus a pre-push hook that runs `make check` before every push.
4848

4949
### Step 4: Run Your First Check
5050

content/docs/getting-started/retrofit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Thumbs.db
9191
make install-hooks
9292
```
9393

94-
This command runs `pre-commit install` to set up hooks that check formatting, linting, and secret detection on every commit.
94+
This command sets up pre-commit hooks for formatting, linting, and secret detection on every commit, plus a pre-push hook that runs `make check` before every push.
9595

9696
## Step 5: Run Your First Check
9797

0 commit comments

Comments
 (0)