-
Notifications
You must be signed in to change notification settings - Fork 13
/
.golangci.yaml
106 lines (102 loc) · 1.79 KB
/
.golangci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
run:
go: "1.21"
timeout: 30m
skip-dirs:
- .cache
skip-files:
- ".*pb\\.go"
tests: false
issues:
max-same-issues: 200
linters:
disable-all: true
enable:
# 必须
- errcheck
- govet
- ineffassign
- staticcheck
- bodyclose
- durationcheck
- exportloopref
- gomodguard
- gosec
# 建议
- gosimple
- decorder
- dogsled
- errchkjson
- errorlint
- goprintffuncname
- makezero
- misspell
- nakedret
- nestif
- nilerr # 后期建议放入,所有err均需要有处理
- nilnil
- noctx
- unconvert
linters-settings:
gosec:
excludes:
- G401
- G505
- G501
- G402
- G204
- G101
- G107
- G114
gosimple:
go: "1.21"
checks: ["all", "-SA1019", "-S1039", "-S1025", "-S1008"]
staticcheck:
go: "1.21"
checks: ["all", "-SA5008", "-SA9003", "-SA1029", "-SA4006"]
errcheck:
check-type-assertions: true
check-blank: false
revie:
enable-all-rules: true
ignore-generated-header: true
rules:
- name: var-naming
disabled: true
govet:
disable-all: true
enable:
- asmdecl
- assign
- atomic
- atomicalign
- bools
- buildtag
- cgocall
- composites
- copylocks
- deepequalerrors
- errorsas
- findcall
- framepointer
- httpresponse
- ifaceassert
- loopclosure
- lostcancel
- nilfunc
- nilness
- printf
- reflectvaluecompare
# - shadow
- shift
- sigchanyzer
- sortslice
- stdmethods
- stringintconv
- structtag
- testinggoroutine
- tests
- unmarshal
- unreachable
- unsafeptr
- unusedresult
# - unusedwrite