batmac/pre-commit-zig
Zig hooks for pre-commit
Zig pre-commit hooks for http://pre-commit.com/
you need first to install pre-commit:
brew install pre-commit or pipx install pre-commit or pip install pre-commit
install pre-commit into your git repo:
pre-commit install
Add a file named .pre-commit-config.yaml into the root directory of your repository:
repos:
- repo: https://github.com/batmac/pre-commit-zig
rev: master
hooks:
- id: zig-fmt
- id: zig-build
- id: zig-build-test
zig-fmt - runs zig fmt on the changed files.zig-fmt-check - runs zig fmt --check (doesn't modify files).zig-build - ensure zig build passes in your repository.zig-build-test - ensure zig build test passes in your repository.