File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ golangci-lint :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - uses : actions/setup-go@v5
18+ with :
19+ go-version-file : go.mod
20+
21+ - uses : golangci/golangci-lint-action@v7
22+ with :
23+ version : v2.9.0
24+
25+ gofumpt :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - uses : actions/checkout@v4
29+
30+ - uses : actions/setup-go@v5
31+ with :
32+ go-version-file : go.mod
33+
34+ - name : Install gofumpt
35+ run : go install mvdan.cc/gofumpt@latest
36+
37+ - name : Check formatting
38+ run : |
39+ unformatted=$(gofumpt -l .)
40+ if [ -n "$unformatted" ]; then
41+ echo "Files not formatted with gofumpt:"
42+ echo "$unformatted"
43+ echo ""
44+ echo "Run 'gofumpt -w .' to fix."
45+ exit 1
46+ fi
You can’t perform that action at this time.
0 commit comments