Newer
Older
# `pre-commit-hooks`
> Bazel `pre-commit` hooks
## Getting Started
Add the following to `MODULE.bazel`:
```py
bazel_dep(name = "pre-commit", version = "<version>")
bazel_dep(name = "pre-commit-hooks", version = "<version>")
```
Create a `hooks` directory to create the `pre-commit` configuration:
```py
load("@pre-commit//pre-commit:defs.bzl", "pre_commit")
)
```
## Usage
Install the hooks with `bazelisk run -- hooks:install`.
Run the hooks with `bazelisk run -- hooks`.
## Hermeticity
The project uses `rules_python` which is hermetic when `--@rules_python//python/config_settings:bootstrap_impl` is set to `script`.
All hooks provided are hermetic.