From 2be1aa781dbbc2462ca717f3b763053fb8cd2810 Mon Sep 17 00:00:00 2001 From: Ekaterina Lebedeva Date: Fri, 13 Sep 2024 15:44:23 +0300 Subject: [PATCH] [#1266] .forgejo: Make 'fumpt' job fail on changed files `gofumpt` always returns an exit code of 0, even when it finds misformatted files. To make `fumpt` action behave as expected we need to check if `gofumpt` changed any files. Signed-off-by: Ekaterina Lebedeva --- .forgejo/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml index a908c6278..07ba5c268 100644 --- a/.forgejo/workflows/tests.yml +++ b/.forgejo/workflows/tests.yml @@ -106,4 +106,6 @@ jobs: run: make fumpt-install - name: Run gofumpt - run: make fumpt + run: | + make fumpt + git diff --exit-code --quiet