-
Notifications
You must be signed in to change notification settings - Fork 597
39 lines (34 loc) · 1.1 KB
/
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
35
36
37
38
39
name: Linters
on:
pull_request:
env:
# Use the Go toolchain installed by setup-go
# https://github.com/actions/setup-go/issues/457
GOTOOLCHAIN: local
jobs:
golangci-lint:
runs-on: ubuntu-24.04
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