Skip to content

Add repo-managed git hooks for local validation #554

@enoodle

Description

@enoodle

What you would like to be added?

Add tracked Git hooks to this repository, plus Make targets to install and uninstall them locally.

The hook behavior should be:

  • pre-commit runs make validate
  • pre-push runs make test

The local setup should be:

  • make install-hooks sets core.hooksPath to .githooks
  • make uninstall-hooks removes the local hook configuration

This keeps the hook logic versioned in the repository and aligned with the existing Make-based validation workflow.

Why is this needed?

This adds a local guardrail against committing code that fails generation, formatting, linting, API doc generation, or docs verification, and against pushing code that fails tests.

It also helps keep AI agents in check by preventing them from committing or pushing code that does not meet the repository's standards. That should reduce avoidable CI load and let the CI system spend more time on changes that have already passed the local baseline checks.

The approach is intentionally local and opt-in per clone, so contributors can enable or remove it with a single Make target while still using the repository’s standard validation commands.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions