Skip to content

Commit f56581a

Browse files
authored
chore: update golangci-lint (#1116)
1 parent fb1eaf3 commit f56581a

File tree

2 files changed

+37
-25
lines changed

2 files changed

+37
-25
lines changed

.github/workflows/_golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1313
- name: golangci-lint
14-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # 6.5.2
14+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # 8.0.0
1515
with:
16-
version: latest
16+
version: "v2.1.6"
1717

1818
# Optional: working directory, useful for monorepos
1919
# working-directory: somedir

.golangci.yml

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,43 @@
1-
# Docs: https://golangci-lint.run/usage/configuration/#config-file
2-
3-
run:
4-
timeout: 5m
5-
6-
issues:
7-
max-issues-per-linter: 0
8-
max-same-issues: 0
9-
exclude-dirs:
10-
- internal/mocks
11-
12-
linters-settings:
13-
gofmt:
14-
simplify: true
15-
govet:
16-
enable-all: true
17-
disable:
18-
- fieldalignment
19-
1+
version: "2"
202
linters:
21-
disable-all: true
3+
default: none
224
enable:
235
- copyloopvar
24-
- gofmt
25-
- gosimple
26-
# - govet # Re-enable when all shadow declarations are fixed
276
- ineffassign
287
- predeclared
298
- staticcheck
309
- unconvert
3110
- unused
11+
settings:
12+
govet:
13+
disable:
14+
- fieldalignment
15+
enable-all: true
16+
exclusions:
17+
generated: lax
18+
presets:
19+
- comments
20+
- common-false-positives
21+
- legacy
22+
- std-error-handling
23+
paths:
24+
- internal/mocks
25+
- third_party$
26+
- builtin$
27+
- examples$
28+
issues:
29+
max-issues-per-linter: 0
30+
max-same-issues: 0
31+
formatters:
32+
enable:
33+
- gofmt
34+
settings:
35+
gofmt:
36+
simplify: true
37+
exclusions:
38+
generated: lax
39+
paths:
40+
- internal/mocks
41+
- third_party$
42+
- builtin$
43+
- examples$

0 commit comments

Comments
 (0)