Skip to content

Commit 4bece8c

Browse files
committed
ci: bump to golangci-lint v2
1 parent e5dd406 commit 4bece8c

File tree

2 files changed

+33
-23
lines changed

2 files changed

+33
-23
lines changed

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: go build -v ./...
3434

3535
- name: Lint
36-
uses: golangci/golangci-lint-action@v6
36+
uses: golangci/golangci-lint-action@v7
3737
with:
3838
version: latest
3939

.golangci.yml

+32-22
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,47 @@
1-
run:
2-
timeout: 2m
1+
version: "2"
32

43
linters:
54
enable:
6-
# enabled by default
7-
# https://golangci-lint.run/usage/linters/
8-
- govet
9-
- errcheck
10-
- staticcheck
11-
- unused
12-
- gosimple
13-
- ineffassign
14-
- typecheck
155
# project additions
166
# keep this list alphabetically sorted
177
- bodyclose
188
- goconst
19-
# - gofmt -- goimports contains this
20-
- goimports
219
- gosec
2210
- misspell
2311
- nakedret
2412
- nolintlint
2513
- prealloc
2614
- revive
2715
- unconvert
16+
settings:
17+
misspell:
18+
locale: US
19+
nakedret:
20+
max-func-lines: 1
21+
exclusions:
22+
generated: lax
23+
presets:
24+
- comments
25+
- common-false-positives
26+
- legacy
27+
- std-error-handling
28+
paths:
29+
- third_party$
30+
- builtin$
31+
- examples$
2832

29-
linters-settings:
30-
gofmt:
31-
simplify: true
32-
goimports:
33-
local-prefixes: github.com/xen0n/go-workwx
34-
misspell:
35-
locale: US
36-
nakedret:
37-
max-func-lines: 1
33+
formatters:
34+
enable:
35+
- goimports
36+
settings:
37+
gofmt:
38+
simplify: true
39+
goimports:
40+
local-prefixes:
41+
- github.com/xen0n/go-workwx
42+
exclusions:
43+
generated: lax
44+
paths:
45+
- third_party$
46+
- builtin$
47+
- examples$

0 commit comments

Comments
 (0)