Skip to content

Commit e6bafb8

Browse files
committed
first submit attempt
1 parent 1b08bfa commit e6bafb8

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

go-lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Go Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
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+
run: |
35+
golangci-lint run

0 commit comments

Comments
 (0)