| 1 |
name: Code Scanning |
| 2 |
on: [push] |
| 3 |
jobs: |
| 4 |
golangci-lint-code-scanning: |
| 5 |
name: Code Scanning with errorformat / golangci-lint |
| 6 |
runs-on: ubuntu-latest |
| 7 |
steps: |
| 8 |
- uses: actions/checkout@v4 |
| 9 |
- uses: actions/setup-go@v5 |
| 10 |
with: |
| 11 |
go-version: "1.21" |
| 12 |
- run: go install ./cmd/errorformat/ |
| 13 |
- name: Install golangci-lint |
| 14 |
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin |
| 15 |
- run: golangci-lint run --out-format=line-number | errorformat -name=golangci-lint -w=sarif > results.sarif |
| 16 |
- name: Upload SARIF file |
| 17 |
uses: github/codeql-action/upload-sarif@v3 |
| 18 |
with: |
| 19 |
sarif_file: results.sarif |