16 lines
406 B
Bash
Executable File
16 lines
406 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
actual=$(mktemp)
|
|
trap 'rm -f "$actual"' EXIT HUP INT TERM
|
|
|
|
cd "$repo_root"
|
|
buf lint --error-format=text >"$actual" 2>&1 || true
|
|
LC_ALL=C sort -o "$actual" "$actual"
|
|
|
|
if ! diff -u config/buf-lint-baseline.txt "$actual"; then
|
|
echo "Buf lint findings changed; only the reviewed first-draft findings are accepted." >&2
|
|
exit 1
|
|
fi
|