Skip to content

Commit 52ab795

Browse files
fix: Improve goimports check in CI
Co-Authored-By: [email protected] <[email protected]>
1 parent 8a5dfa2 commit 52ab795

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ jobs:
2121
- name: Run staticcheck
2222
run: staticcheck ./...
2323
- name: Check code formatting
24-
run: test -z $(goimports -l .)
24+
run: |
25+
files=$(goimports -l .)
26+
if [ -n "$files" ]; then
27+
echo "The following files need formatting:"
28+
echo "$files"
29+
exit 1
30+
fi
2531
- name: Run Test
2632
run: go test ./...

0 commit comments

Comments
 (0)