refactor: fix linting errors #2
Workflow file for this run
This file contains 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: Lint | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.55.1 | |
check-mod-tidy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- run: go mod tidy | |
- run: | | |
if ! git diff --exit-code; then | |
echo "::error::Found changes in code, don't forget to run 'go mod tidy' before you commit." | |
fi | |
check-generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- run: make generate | |
- run: | | |
if ! git diff --exit-code; then | |
echo "::error::Found changes in generated code, don't forget to run 'make generate' before you commit." | |
fi |