-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.golangci.yml
More file actions
103 lines (103 loc) · 2.2 KB
/
.golangci.yml
File metadata and controls
103 lines (103 loc) · 2.2 KB
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
version: "2"
run:
concurrency: 4
modules-download-mode: vendor
issues-exit-code: 1
tests: true
output:
formats:
text:
path: stdout
print-linter-name: true
print-issued-lines: true
colors: true
linters:
default: none
enable:
- errcheck
- gosec
- ineffassign
- misspell
- nakedret
- revive
- staticcheck
- unparam
- unused
- misspell
- unparam
- revive
- unconvert
- unparam
settings:
dupl:
threshold: 100
errcheck:
check-type-assertions: false
check-blank: true
goconst:
min-len: 3
min-occurrences: 3
gocyclo:
min-complexity: 10
lll:
line-length: 120
tab-width: 1
misspell:
locale: US
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true
for-loops: false
unparam:
check-exported: false
revive:
rules:
- name: package-comments
disabled: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples
rules:
- linters:
- staticcheck
text: "QF1003:" # could use tagged switch on errCode (staticcheck)
- linters:
- staticcheck
text: "ST1005:" # error strings should not be capitalized (staticcheck)
- linters:
- staticcheck
text: "QF1008:" # could remove embedded field "Common" from selector (staticcheck)
- linters:
- staticcheck
text: "QF1001:" # could apply De Morgan's law (staticcheck)
- linters:
- staticcheck
text: "QF1002:" # could use tagged switch on rs.Type (staticcheck)
- linters:
- staticcheck
text: "QF1010:" # could convert argument to string (staticcheck)
- linters:
- staticcheck
text: "QF1004:" # could use strings.ReplaceAll instead (staticcheck)
- linters:
- staticcheck
text: "QF1006:" # could lift into loop condition (staticcheck)
issues:
new: false
formatters:
enable:
- gofmt
settings:
gofmt:
simplify: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$