We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26f8898 commit 0fc1547Copy full SHA for 0fc1547
1 file changed
.github/workflows/ci.yml
@@ -62,9 +62,12 @@ jobs:
62
63
- name: Check formatting
64
run: |
65
- if ! gofmt -d . | grep -q .; then
+ # Only check .go files, not go.mod or other config files
66
+ if ! gofmt -l *.go ./... 2>/dev/null | grep -q .; then
67
+ echo "Code is properly formatted"
68
+ else
69
echo "Code needs formatting"
- gofmt -d .
70
+ gofmt -d *.go ./...
71
exit 1
72
fi
73
0 commit comments