-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
135 lines (135 loc) · 3.07 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
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
linters-settings:
gosimple:
checks: [ "all" ]
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
staticcheck:
checks: [ "all" ]
revive:
ignore-generated-header: true
enable-all-rules: true
rules:
- name: add-constant
disabled: false
arguments:
- maxLitCount: "3"
allowInts: "0,1"
- name: argument-limit
arguments: [ 4 ]
- name: banned-characters
severity: warning
disabled: false
arguments: [ "Ω", "Σ", "σ", "7" ]
- name: cognitive-complexity
arguments: [ 9 ]
- name: context-as-argument
arguments:
- allowTypesBefore: "*testing.T"
- name: cyclomatic
arguments: [ 7 ]
- name: defer
arguments:
- [ "call-chain", "loop" ]
- name: file-header
disabled: true
- name: function-result-limit
arguments: [ 2 ]
- name: flag-parameter
disabled: false
- name: function-length
disabled: false
arguments: [ 20, 40 ]
- name: line-length-limit
arguments: [ 120 ]
- name: max-public-structs
arguments: [ 5 ]
- name: string-format
arguments:
- - 'core.WriteError[1].Message'
- '/^([^A-Z]|$)/'
- must not start with a capital letter
- - 'fmt.Errorf[0]'
- '/(^|[^\.!?])$/'
- must not end in punctuation
- - panic
- '/^[^\n]*$/'
- must not contain line breaks
- name: unhandled-error
arguments:
- "fmt.Printf"
stylecheck:
checks: [ "all" ]
gosec:
exclude-generated: true
severity: high
concurrency: 3
gocritic:
enabled-checks:
- hugeParam
- tooManyResultsChecker
- rangeValCopy
- rangeExprCopy
- nestingReduce
- unnamedResult
- truncateCmp
- ruleguard
- elseif
- captLocal
- underef
settings:
captLocal:
paramsOnly: false
elseif:
skipBalanced: false
hugeParam:
sizeThreshold: 256
truncateCmp:
skipArchDependent: false
underef:
skipRecvDeref: false
unnamedResult:
checkExported: true
rangeValCopy:
sizeThreshold: 256
linters:
disable-all: true
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
- revive
- stylecheck
- gosec
- godox
- dupl
- dupword
- goconst
- gocritic
- misspell
- wsl
- whitespace
- maintidx
- nolintlint
issues:
# See the dedicated "issues" documentation section.
exclude-rules:
- path: _test\.go
text: "add-constant:"
- path: _test\.go
text: "line-length-limit:"
- path: _test\.go
text: "function-length: maximum number of lines"
- path: _test\.go
text: "function-length: maximum number of statements"
- path: \.go
text: "undefined: "
- path: \.go
text: "missing type"
- path: \.go
text: "WriteString"