Skip to content

Commit bdd4a37

Browse files
Introduce golangci-lint
1 parent 8cab4fa commit bdd4a37

2 files changed

Lines changed: 10 additions & 28 deletions

File tree

.github/workflows/test-v1.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,13 @@ jobs:
3030
with:
3131
go-version: ${{matrix.go-version}}
3232

33-
- name: gofmt
34-
run: test -z "`gofmt -l .`"
35-
36-
- name: Install golint
37-
run: go install golang.org/x/lint/golint@latest
38-
39-
- name: golint
40-
run: test -z "`$(go env GOPATH)/bin/golint ./...`"
33+
- name: Lint Code
34+
uses: golangci/golangci-lint-action@v6
4135

42-
- name: Install staticcheck
43-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
44-
45-
- name: staticcheck
46-
run: $(go env GOPATH)/bin/staticcheck ./...
36+
- name: Check format
37+
run: test -z "`gofmt -l .`"
4738

48-
- name: go test
39+
- name: Run tests
4940
run: go test -v ./...
5041

5142
- name: Build example

.github/workflows/test-v2.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,14 @@ jobs:
3333
- name: Tidy modules
3434
run: go mod tidy
3535

36-
- name: Run tests
37-
run: go test ./... -v
36+
- name: Lint Code
37+
uses: golangci/golangci-lint-action@v6
3838

39-
- name: gofmt
39+
- name: Check format
4040
run: test -z "`gofmt -l .`"
4141

42-
- name: Install golint
43-
run: go install golang.org/x/lint/golint@latest
44-
45-
- name: golint
46-
run: test -z "`$(go env GOPATH)/bin/golint ./...`"
47-
48-
- name: Install staticcheck
49-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
50-
51-
- name: staticcheck
52-
run: $(go env GOPATH)/bin/staticcheck ./...
42+
- name: Run tests
43+
run: go test ./... -v
5344

5445
- name: Build example
5546
run: cd example && ./linux64_build.sh

0 commit comments

Comments
 (0)