Introduce golangci-lint

This commit is contained in:
Yoshiyuki Mineo
2025-05-02 01:27:00 +09:00
parent 8cab4fa3ea
commit bdd4a37407
2 changed files with 11 additions and 29 deletions

View File

@@ -30,22 +30,13 @@ jobs:
with:
go-version: ${{matrix.go-version}}
- name: gofmt
- name: Lint Code
uses: golangci/golangci-lint-action@v6
- name: Check format
run: test -z "`gofmt -l .`"
- name: Install golint
run: go install golang.org/x/lint/golint@latest
- name: golint
run: test -z "`$(go env GOPATH)/bin/golint ./...`"
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: staticcheck
run: $(go env GOPATH)/bin/staticcheck ./...
- name: go test
- name: Run tests
run: go test -v ./...
- name: Build example

View File

@@ -33,23 +33,14 @@ jobs:
- name: Tidy modules
run: go mod tidy
- name: Lint Code
uses: golangci/golangci-lint-action@v6
- name: Check format
run: test -z "`gofmt -l .`"
- name: Run tests
run: go test ./... -v
- name: gofmt
run: test -z "`gofmt -l .`"
- name: Install golint
run: go install golang.org/x/lint/golint@latest
- name: golint
run: test -z "`$(go env GOPATH)/bin/golint ./...`"
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: staticcheck
run: $(go env GOPATH)/bin/staticcheck ./...
- name: Build example
run: cd example && ./linux64_build.sh