We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b08bfa commit e6bafb8Copy full SHA for e6bafb8
go-lint.yml
@@ -0,0 +1,35 @@
1
+name: Go Lint
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
9
10
11
+jobs:
12
+ lint:
13
+ name: Lint Code Base
14
+ runs-on: ubuntu-latest
15
16
+ steps:
17
+ # 检出代码仓库
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v3
20
21
+ # 设置 Go 环境
22
+ - name: Set up Go
23
+ uses: actions/setup-go@v4
24
+ with:
25
+ go-version: '1.21' # 根据 Go 版本进行变化
26
27
+ # 安装 golangci-lint 工具
28
+ - name: Install golangci-lint
29
+ run: |
30
+ go install github.com/golangci/golangci-lint/cmd/[email protected]
31
32
+ # 运行代码风格检查
33
+ - name: Run golangci-lint
34
35
+ golangci-lint run
0 commit comments