Skip to content

Commit 551cac0

Browse files
committed
fix: Correct gofmt check syntax in GitHub Actions
1 parent cadc108 commit 551cac0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,11 @@ jobs:
3434
3535
- name: Check formatting
3636
run: |
37-
test -z $(gofmt -s -l gateway/ processor/)
37+
unformatted=$(gofmt -s -l gateway/ processor/)
38+
if [ -n "$unformatted" ]; then
39+
echo "Code is not formatted. Run: gofmt -w gateway/ processor/"
40+
echo "Unformatted files:"
41+
echo "$unformatted"
42+
exit 1
43+
fi
3844

0 commit comments

Comments
 (0)