Skip to content

Commit f987235

Browse files
committed
ci: fail PR if Go code is not formatted with gofumpt
1 parent 2145a3f commit f987235

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/gofumpt.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Go Format
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
gofumpt:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version: "1.24"
17+
18+
- name: Install gofumpt
19+
run: go install mvdan.cc/gofumpt@latest
20+
21+
- name: Check formatting
22+
run: gofumpt -l -d .

0 commit comments

Comments
 (0)