Skip to content

Commit c7d83c1

Browse files
committed
Add feature: golangci-lint
1 parent 5914666 commit c7d83c1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,30 @@ jobs:
1818
- name: Set up Go env
1919
uses: actions/setup-go@v4
2020
with:
21+
# pick one Go version to check format
2122
go-version: '1.18'
2223
- name: Run go fmt
2324
run: |
2425
go version
2526
go fmt ./...
2627
28+
GoLint:
29+
name: GoLint
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Check out code
33+
uses: actions/checkout@v4
34+
- name: Set up Go env
35+
uses: actions/setup-go@v4
36+
with:
37+
# pick one Go version for linting
38+
go-version: '1.18'
39+
- name: golangci-lint
40+
uses: golangci/golangci-lint-action@v3
41+
with:
42+
version: latest
43+
only-new-issues: true
44+
2745
Test:
2846
runs-on: ubuntu-latest
2947
strategy:

0 commit comments

Comments
 (0)