Skip to content

Commit 87a0848

Browse files
committed
chore: make lint happy
1 parent 80312b7 commit 87a0848

1 file changed

Lines changed: 47 additions & 53 deletions

File tree

.golangci.yml

Lines changed: 47 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,66 @@
1-
linters-settings:
2-
errcheck:
3-
exclude-functions:
4-
- fmt:.*
5-
- io/ioutil:^Read.*
6-
7-
goimports:
8-
local-prefixes: github.com/LagrangeDev/LagrangeGo
9-
10-
forbidigo:
11-
forbid:
12-
- p: ^errors\.Errorf.*$
13-
msg: Use fmt.Errorf with %w to replace it.
14-
1+
version: "2"
2+
run:
3+
go: "1.24"
4+
issues-exit-code: 1
5+
tests: false
156
linters:
16-
# please, do not use `enable-all`: it's deprecated and will be removed soon.
17-
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
18-
disable-all: true
19-
fast: false
7+
default: none
208
enable:
9+
- asciicheck
2110
- bodyclose
22-
#- depguard
11+
- copyloopvar
2312
- dogsled
2413
- errcheck
25-
- copyloopvar
2614
- exhaustive
27-
#- funlen
28-
#- goconst
15+
- forbidigo
2916
- gocritic
30-
#- gocyclo
31-
- gofmt
32-
- goimports
3317
- goprintffuncname
34-
#- gosec
35-
- gosimple
3618
- govet
3719
- ineffassign
38-
#- misspell
20+
- makezero
3921
- nolintlint
22+
- prealloc
23+
- predeclared
24+
- revive
4025
- rowserrcheck
4126
- staticcheck
42-
- stylecheck
43-
- typecheck
4427
- unconvert
4528
- unparam
4629
- unused
4730
- whitespace
48-
- prealloc
49-
- predeclared
50-
- asciicheck
51-
- revive
52-
- forbidigo
53-
- makezero
54-
55-
56-
run:
57-
# default concurrency is a available CPU number.
58-
# concurrency: 4 # explicitly omit this value to fully utilize available resources.
59-
timeout: 5m
60-
issues-exit-code: 1
61-
tests: false
62-
go: '1.24'
63-
64-
# output configuration options
65-
output:
66-
print-issued-lines: true
67-
print-linter-name: true
68-
uniq-by-line: true
69-
31+
settings:
32+
errcheck:
33+
exclude-functions:
34+
- fmt:.*
35+
- io/ioutil:^Read.*
36+
forbidigo:
37+
forbid:
38+
- pattern: ^errors\.Errorf.*$
39+
msg: Use fmt.Errorf with %w to replace it.
40+
exclusions:
41+
generated: lax
42+
presets:
43+
- comments
44+
- common-false-positives
45+
- legacy
46+
- std-error-handling
47+
paths:
48+
- third_party$
49+
- builtin$
50+
- examples$
7051
issues:
71-
# Fix found issues (if it's supported by the linter)
7252
fix: true
53+
formatters:
54+
enable:
55+
- gofmt
56+
- goimports
57+
settings:
58+
goimports:
59+
local-prefixes:
60+
- github.com/LagrangeDev/LagrangeGo
61+
exclusions:
62+
generated: lax
63+
paths:
64+
- third_party$
65+
- builtin$
66+
- examples$

0 commit comments

Comments
 (0)