ci: make gofmt check fail for a non-empty diff (#7131)

Fixes #7130.

Change-Id: If47eb472ea98a8d8b250c5c681c7862d252645fb
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
pull/7133/head
M. J. Fromberger 2 years ago committed by GitHub
parent 100d8e909e
commit 3eae75b1b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,7 +24,9 @@ jobs:
with:
go-version-file: go.mod
- name: Run gofmt (goimports)
run: go run golang.org/x/tools/cmd/goimports -d --format-only .
run: |
OUT=$(go run golang.org/x/tools/cmd/goimports -d --format-only .)
[ -z "$OUT" ] || (echo "Not gofmt'ed: $OUT" && exit 1)
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |

Loading…
Cancel
Save