-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds protobuf linting hooks using Buf: https://docs.buf.build/ Expects buf to be installed locally.
- Loading branch information
Showing
4 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Protobuf breaking change detection with Buf: https://docs.buf.build/ | ||
# | ||
# To run the checks locally: | ||
# buf breaking | ||
# | ||
# To view the breaking change lints: | ||
# buf config ls-breaking-rules | ||
|
||
set -euo pipefail | ||
|
||
# Default to checking against the local master Git branch | ||
against=${1-'.git#branch=master'}; | ||
|
||
buf breaking "${against}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Protobuf linting with Buf: https://docs.buf.build/ | ||
# | ||
# To run the lints locally: | ||
# buf lint | ||
# | ||
# To view the available lints and their descriptions: | ||
# buf config ls-lint-rules | ||
|
||
set -euo pipefail | ||
|
||
buf lint "$@" |