Skip to content

Commit

Permalink
feat: add lint
Browse files Browse the repository at this point in the history
  • Loading branch information
0num4 committed May 7, 2024
1 parent e7c9f8e commit a7d92cc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,24 @@ jobs:
go-version-file: ./go.mod
- name: Run tests
run: go test -v ./...
lint:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# golintci-lintはgoのバージョンとの組み合わせでエラーが発生する場合がありました。
# そのため、雑にlatestを指定することはおすすめしません。
version: latest
args: --timeout=5m
- name: Run gofumpt
# gofmt及びgofumptにはエラー終了するオプションがないため、diffで差分があるかで確認する
run: |
gofumpt -l . | diff -u /dev/null -

0 comments on commit a7d92cc

Please sign in to comment.