Skip to content

Commit 47bb5e8

Browse files
authored
chore: upgrade golangci-lint version (#213)
* Bump golangci-lint * Bump golangci-lint action
1 parent 89be6b0 commit 47bb5e8

File tree

2 files changed

+57
-43
lines changed

2 files changed

+57
-43
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
go-version-file: './go.mod'
2121

2222
- name: Run lint
23-
uses: golangci/golangci-lint-action@v6
23+
uses: golangci/golangci-lint-action@v7
2424
with:
25-
version: v1.64.5
25+
version: v2.0.2

.golangci.yml

Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,68 @@
1+
version: "2"
12
run:
23
# The default concurrency value is the number of available CPU.
34
concurrency: 4
4-
# Timeout for analysis, e.g. 30s, 5m.
5-
# Default: 1m
6-
timeout: 5m
7-
# Which dirs to skip: issues from them won't be reported.
8-
# Can use regexp here: `generated.*`, regexp is applied on full path,
9-
# including the path prefix if one is set.
10-
# Default value is empty list,
11-
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
12-
# "/" will be replaced by current OS file path separator to properly work on Windows.
13-
# skip-dirs:
14-
# Which files to skip: they will be analyzed, but issues from them won't be reported.
15-
# Default value is empty list,
16-
# but there is no need to include all autogenerated files,
17-
# we confidently recognize autogenerated files.
18-
# If it's not please let us know.
19-
# "/" will be replaced by current OS file path separator to properly work on Windows.
20-
# skip-files:
215

226
output:
237
formats:
24-
- format: colored-line-number
8+
text:
259
path: stdout
2610

2711
# linters-settings:
2812

2913
linters:
30-
# Disable all linters.
31-
# Default: false
32-
disable-all: false
33-
# Enable specific linter
34-
# https://golangci-lint.run/usage/linters/#enabled-by-default
35-
# enable:
36-
# Enable all available linters.
37-
# Default: false
38-
enable-all: false
39-
# Disable specific linter
40-
# https://golangci-lint.run/usage/linters/#disabled-by-default
14+
enable:
15+
- asasalint
16+
- asciicheck
17+
- bidichk
18+
- bodyclose
19+
- contextcheck
20+
- durationcheck
21+
- err113
22+
- errchkjson
23+
- errorlint
24+
- exhaustive
25+
- fatcontext
26+
- gocheckcompilerdirectives
27+
- gochecksumtype
28+
- gocritic
29+
- gosec
30+
- gosmopolitan
31+
- loggercheck
32+
- makezero
33+
- musttag
34+
- nilerr
35+
- nilnesserr
36+
- noctx
37+
- perfsprint
38+
- prealloc
39+
- protogetter
40+
- reassign
41+
- recvcheck
42+
- revive
43+
- rowserrcheck
44+
- spancheck
45+
- sqlclosecheck
46+
- testifylint
47+
- unparam
48+
- zerologlint
4149
disable:
4250
- wrapcheck
43-
# Enable presets.
44-
# https://golangci-lint.run/usage/linters
45-
presets:
46-
- bugs
47-
- error
48-
- metalinter
49-
- performance
50-
- unused
51-
52-
# issues:
53-
54-
# severity:
51+
exclusions:
52+
generated: lax
53+
presets:
54+
- comments
55+
- common-false-positives
56+
- legacy
57+
- std-error-handling
58+
paths:
59+
- third_party$
60+
- builtin$
61+
- examples$
62+
formatters:
63+
exclusions:
64+
generated: lax
65+
paths:
66+
- third_party$
67+
- builtin$
68+
- examples$

0 commit comments

Comments
 (0)