fix(ci): run golangci-lint v2, and fix the 46 issues it found (#6) #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - run: make check | |
| - run: make cover | |
| # v6 of this action installs golangci-lint v1, which cannot parse a v2 | |
| # config: it rejects `version`, `formatters`, `linters.default` and | |
| # `linters.settings` as unknown properties. v8 installs v2 and must be | |
| # pinned to a major line rather than "latest", or the next major bump | |
| # breaks the build again the same way. | |
| - uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.12 | |
| - name: Report the version this merge would produce | |
| run: go run ./cmd/kirobuff version next |