.github/workflows/staticcheck.yml
raw| 1 | name: staticcheck |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | pull_request: |
| 8 | branches: |
| 9 | - '*' |
| 10 | |
| 11 | jobs: |
| 12 | build: |
| 13 | runs-on: ubuntu-latest |
| 14 | |
| 15 | steps: |
| 16 | - name: Set up Go |
| 17 | uses: actions/setup-go@v2 |
| 18 | with: |
| 19 | go-version: '1.21' |
| 20 | |
| 21 | - name: Check out code |
| 22 | uses: actions/checkout@v3 |
| 23 | |
| 24 | - name: Print staticcheck version |
| 25 | run: go run honnef.co/go/tools/cmd/staticcheck -version |
| 26 | |
| 27 | - name: Run staticcheck |
| 28 | run: go run honnef.co/go/tools/cmd/staticcheck -- ./... |