This is a pre-comit hook for buf.
For pre-commit: see https://github.com/pre-commit/pre-commit
For buf: see https://github.com/bufbuild/buf
Add this to your .pre-commit-config.yaml
:
- repo: https://github.com/johnor/pre-commit-buf
rev: '' # Use the tag you want to point at
hooks:
- id: buf-lint
- id: buf-breaking-master
Run buf lint on proto files.
New in v1.3.1
Run buf format on proto files.
Run buf breaking on proto files. Add args: ["--agsinst", BRANCH]
where BRANCH
could for example be ".git#branch=origin/master"
to your
.pre-commit-config.yaml file.
Run buf breaking on proto files against the master branch.