-
-
Notifications
You must be signed in to change notification settings - Fork 45
19 lines (19 loc) · 878 Bytes
/
code-scanning.yml
File metadata and controls
19 lines (19 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
name: Code Scanning
on: [push]
jobs:
golangci-lint-code-scanning:
name: Code Scanning with errorformat / golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: "1.21"
- run: go install ./cmd/errorformat/
- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
- run: golangci-lint run --out-format=line-number | errorformat -name=golangci-lint -w=sarif > results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@5f8171a638ada777af81d42b55959a643bb29017 # v3.28.12
with:
sarif_file: results.sarif