-
Notifications
You must be signed in to change notification settings - Fork 593
34 lines (30 loc) · 999 Bytes
/
lint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Linters
on:
pull_request:
jobs:
golangci-lint:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: stable }
- uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m
# Count issues reported by disabled linters. The command always
# exits zero to ensure it does not fail the pull request check.
- name: Count non-blocking issues
run: |
golangci-lint run --config .golangci.next.yaml \
--issues-exit-code 0 \
--max-issues-per-linter 0 \
--max-same-issues 0 \
--out-format json |
jq --sort-keys 'reduce .Issues[] as $i ({}; .[$i.FromLinter] += 1)' |
awk >> "${GITHUB_STEP_SUMMARY}" '
NR == 1 { print "```json" } { print } END { if (NR > 0) print "```" }
' || true