Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/batmac/pre-commit-zig
Zig hooks for pre-commit
https://github.com/batmac/pre-commit-zig
fmt pre-commit pre-commit-hook pre-commit-hooks zig ziglang
Last synced: 3 months ago
JSON representation
Zig hooks for pre-commit
- Host: GitHub
- URL: https://github.com/batmac/pre-commit-zig
- Owner: batmac
- License: mit
- Created: 2022-07-16T00:12:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T22:35:05.000Z (3 months ago)
- Last Synced: 2024-11-01T10:51:28.889Z (3 months ago)
- Topics: fmt, pre-commit, pre-commit-hook, pre-commit-hooks, zig, ziglang
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pre-commit-zig
Zig pre-commit hooks for
## install
you need first to install [pre-commit](https://pre-commit.com/#install):
`brew install pre-commit` or `pipx install pre-commit` or `pip install pre-commit`install pre-commit into your git repo:
`pre-commit install`## Usage
Add a file named `.pre-commit-config.yaml` into the root directory of your repository:
```yaml
repos:
- repo: https://github.com/batmac/pre-commit-zig
rev: master
hooks:
- id: zig-fmt
- id: zig-build
- id: zig-build-test
```## Available hooks
- `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.## Credits
- [dnephin/pre-commit-golang](https://github.com/dnephin/pre-commit-golang)
- [Bahjat/pre-commit-golang](https://github.com/Bahjat/pre-commit-golang)