.pre-commit-config.yaml
Purpose
Defines local checks that CI also runs, so contributors can catch problems before pushing.
Hooks
pre-commit-hooks
trailing-whitespace(excludingvendor/)end-of-file-fixer(excludingvendor/)check-merge-conflictcheck-yaml
Local hooks
zig fmt --check build.zig src cmd examples docszig build -Doptimize=Debugzig build test
Usage
Install once:
pip install pre-commit
pre-commit install
Run on demand:
pre-commit run --all-files --show-diff-on-failure