Skip to content

Commit

Permalink
Add pre-commit hook for buildifier (#1169)
Browse files Browse the repository at this point in the history
Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
  • Loading branch information
alexeagle and keith committed Jun 2, 2021
1 parent fbfc7dd commit 61bc7c0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See CONTRIBUTING.md for instructions.
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/keith/pre-commit-buildifier
rev: 4.0.1.1
hooks:
- id: buildifier
- id: buildifier-lint
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

## Formatting

Starlark files should be formatted by buildifier.
We suggest using a pre-commit hook to automate this.
First [install pre-commit](https://pre-commit.com/#installation),
then run

```shell
pre-commit install
```

Otherwise the Buildkite CI will yell at you about formatting/linting violations.

## File or claim an issue

Please let us know what you're working on if you want to change or add to the
Expand Down

0 comments on commit 61bc7c0

Please sign in to comment.