fork of https://github.com/sourcegraph/zoekt
1#!/usr/bin/env bash
2
3cd "$(dirname "${BASH_SOURCE[0]}")/../.."
4set -euo pipefail
5
6find . -name "*.proto" -not -path ".git" | while read -r proto_file; do
7 buf format -w --path "$proto_file"
8done
9
10if ! git diff --exit-code; then
11 echo "buf format produced changes, please run buf format -w and commit the changes"
12 exit 1
13fi