Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
# Pre-commit hook: run `make check` to keep the inner loop honest.
# Installed by `make hooks`, which sets core.hooksPath to .githooks.
# Bypass with `git commit --no-verify` if you must — CI will still catch you.
# Bypass: git commit --no-verify
set -euo pipefail
exec make check
exec make check-fast
7 changes: 2 additions & 5 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env bash
# pre-push hook: run `make ci` so the moment of truth is `git push`, not the
# wait for GitHub Actions. Catches what `make check` (the pre-commit gate)
# deliberately skips: license-check, full build, govulncheck-adjacent checks.
# Bypass with `git push --no-verify` if you must — CI will still catch you.
# Bypass: git push --no-verify
set -euo pipefail
exec make ci
exec make check-medium
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help build build-ocb run test test-extras test-extras-sustained test-extras-fuzz test-extras-fuzz-kmsg test-extras-fuzz-journald test-extras-fuzz-nccl-fr test-extras-race bench bench-check fmt fmt-fix vet lint lint-fix tidy tidy-check mod-verify license-check license-fix govulncheck dco-check hooks clean check ci ci-fuzz-nccl-fr nccl-fr-rce-gate register-lint actionlint zizmor generate generate-check generate-fixtures generate-fixtures-check coverage coverage-check doc-check no-autoupdate-check smoke validator-recipe build-tags
.PHONY: help build build-ocb run test test-extras test-extras-sustained test-extras-fuzz test-extras-fuzz-kmsg test-extras-fuzz-journald test-extras-fuzz-nccl-fr test-extras-race bench bench-check fmt fmt-fix vet lint lint-fix tidy tidy-check mod-verify license-check license-fix govulncheck dco-check hooks clean check check-fast check-medium ci ci-fuzz-nccl-fr nccl-fr-rce-gate register-lint actionlint zizmor generate generate-check generate-fixtures generate-fixtures-check coverage coverage-check doc-check no-autoupdate-check smoke validator-recipe build-tags

BIN := tracecore
PKG := ./cmd/tracecore
Expand Down Expand Up @@ -152,7 +152,11 @@ coverage: ## Run all tests under the race detector with coverage profiling; emi
coverage-check: coverage ## Fail if any internal/* package <70% or components/* package <60%.
@go run ./tools/coverage-check -profile=coverage.out

check: fmt tidy-check lint test ## Fast inner-loop validation (no build, no license-check). Run continuously while editing.
check: fmt tidy-check lint test ## Inner-loop validation (no build, no license-check). Run continuously while editing. Equivalent to check-fast + test.

check-fast: fmt tidy-check lint vet mod-verify ## Pre-commit gate. Fast (<10s); no test, no build. Catches typos, format, deps drift.

check-medium: check-fast license-check generate-check generate-fixtures-check build-tags nccl-fr-rce-gate register-lint actionlint zizmor doc-check no-autoupdate-check ## Pre-push gate. Medium (<30s); CI handles heavy gates (test, coverage, govulncheck, fuzz, build).

test-extras-sustained: ## (sub-target) sustained-load (5 min); see `make test-extras`.
go test -tags=sustained -timeout 8m -count=1 ./components/receivers/kernelevents/...
Expand Down