Skip to content

Commit 73d4077

Browse files
authored
chore: update linter to v2 (#544)
Signed-off-by: Sertac Ozercan <[email protected]>
1 parent 50b59f7 commit 73d4077

File tree

3 files changed

+35
-20
lines changed

3 files changed

+35
-20
lines changed

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ jobs:
4545
check-latest: true
4646

4747
- name: lint
48-
uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
48+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
4949
with:
50-
version: v1.64.5
50+
version: v2.1.6

.golangci.yaml

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,50 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
go: "1.24"
4-
5-
linters-settings:
6-
lll:
7-
line-length: 200
8-
misspell:
9-
locale: US
10-
114
linters:
12-
disable-all: true
5+
default: none
136
enable:
7+
- copyloopvar
148
- errcheck
159
- errorlint
16-
- copyloopvar
1710
- forcetypeassert
18-
- gci
19-
- gocritic
2011
- goconst
12+
- gocritic
2113
- godot
22-
- gofmt
23-
- gofumpt
24-
- goimports
2514
- gosec
26-
- gosimple
2715
- govet
2816
- ineffassign
2917
- misspell
3018
- revive
3119
- staticcheck
32-
- typecheck
3320
- unconvert
3421
- unused
3522
- whitespace
23+
settings:
24+
lll:
25+
line-length: 200
26+
misspell:
27+
locale: US
28+
exclusions:
29+
generated: lax
30+
presets:
31+
- comments
32+
- common-false-positives
33+
- legacy
34+
- std-error-handling
35+
paths:
36+
- third_party$
37+
- builtin$
38+
- examples$
39+
formatters:
40+
enable:
41+
- gci
42+
- gofmt
43+
- gofumpt
44+
- goimports
45+
exclusions:
46+
generated: lax
47+
paths:
48+
- third_party$
49+
- builtin$
50+
- examples$

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: gitleaks
66
- repo: https://github.com/golangci/golangci-lint
7-
rev: v1.62.0
7+
rev: v2.1.6
88
hooks:
99
- id: golangci-lint
1010
- repo: https://github.com/jumanjihouse/pre-commit-hooks

0 commit comments

Comments
 (0)