-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
146 lines (135 loc) · 2.55 KB
/
.golangci.yml
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
run:
concurrency: 4
go: '1.20'
timeout: 1m
issues-exit-code: 1
tests: true
skip-dirs:
- vendor
skip-dirs-use-default: true
skip-files:
- ".*_test\\.go$"
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
sort-results: true
linters-settings:
errcheck:
check-type-assertions: true
check-blank: false
ignore: fmt:.*,io/ioutil:^Read.*
exclude-functions:
- io/ioutil.ReadFile
- io.Copy(*bytes.Buffer)
- io.Copy(os.Stdout)
- (*net/http.Client).Do
- (io.ReadCloser).Close
- (*io.ReadCloser).Close
govet:
enable-all: true
disable-all: false
disable:
- fieldalignment
printing-suggested-fixes: true
gocyclo:
min-complexity: 10
depguard:
list-type: blacklist
include-go-root: false
lll:
line-length: 120
tab-width: 1
unused:
check-exported: true
unparam:
check-exported: false
gocritic:
enabled-tags:
- performance
settings: # settings passed to gocritic
captLocal: # must be valid enabled check name
paramsOnly: true
rangeValCopy:
sizeThreshold: 32
gosec:
excludes:
- G401
- G404
- G501
- G505
linters:
disable-all: true
enable:
- govet
- errcheck
- gosimple
- ineffassign
- staticcheck
- typecheck
- unused
- contextcheck
- bodyclose
- gosec
- exhaustive
- sqlclosecheck
- rowserrcheck
- reassign
- prealloc
- exportloopref
- errchkjson
- asciicheck
- asasalint
presets:
- bugs
fast: false
issues:
exclude:
- /bin
exclude-rules:
- path: _test\.go
linters:
- gomnd
- gocyclo
- errcheck
- dupl
- gosec
- scopelint
- path: internal/hmac/
text: "weak cryptographic primitive"
linters:
- gosec
- linters:
- musttag
text: "xml"
- linters:
- staticcheck
text: "SA9003:"
- linters:
- golint
text: "comment on exported"
- linters:
- golint
text: "should have comment"
- linters:
- stylecheck
text: "ST1020:"
- linters:
- stylecheck
text: "ST1000:"
- linters:
- stylecheck
text: "ST1021:"
- linters:
- stylecheck
text: "ST1022:"
- linters:
- lll
text: "line is"
- linters:
- gocritic
text: "unnecessaryDefer:"
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0