mirror of
https://github.com/sony/sonyflake.git
synced 2026-02-07 00:30:42 +00:00
Introduce golangci-lint
This commit is contained in:
19
.github/workflows/test-v1.yml
vendored
19
.github/workflows/test-v1.yml
vendored
@@ -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
|
||||
|
||||
21
.github/workflows/test-v2.yml
vendored
21
.github/workflows/test-v2.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user