forked from ConSol-Monitoring/snclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
141 lines (141 loc) · 3.98 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
linters-settings:
gocritic:
enabled-tags:
- performance
- style
- experimental
gocyclo:
min-complexity: 27
goconst:
min-len: 8
min-occurrences: 12
lll:
line-length: 200
funlen:
lines: 80
statements: 45
gomoddirectives:
replace-local: true
ireturn:
allow: "error,empty,Module,CheckHandler"
govet:
enable-all: true
settings:
printf:
funcs:
- Tracef
- Infof
- Warnf
- Errorf
- Fatalf
- Criticalf
- Panicf
linters:
enable-all: true
fast: false
disable:
- cyclop
- depguard
- exhaustruct
- err113
- gci
- gochecknoglobals
- gochecknoinits
- godot
- gofumpt
- gomoddirectives
- nonamedreturns
- paralleltest
- perfsprint
- tagliatelle
- testpackage
- wsl
# deprecated
- execinquery
- gomnd
issues:
max-same-issues: 0
max-issues-per-linter: 0
exclude-use-default: true
exclude:
- "`noCopy` is unused"
- "Magic number: 0.1, in"
- "Magic number: 0.01, in"
- "Magic number: 0.001, in"
- "Magic number: 2, in"
- "Magic number: 3, in"
- "Magic number: 4, in"
- "Magic number: 5, in"
- "Magic number: 6, in"
- "Magic number: 7, in"
- "Magic number: 10, in"
- "Magic number: 12, in"
- "Magic number: 14, in"
- "Magic number: 15, in"
- "Magic number: 16, in"
- "Magic number: 20, in"
- "Magic number: 24, in"
- "Magic number: 32, in"
- "Magic number: 50, in"
- "Magic number: 60, in"
- "Magic number: 64, in"
- "Magic number: 100, in"
- "Magic number: 126, in"
- "Magic number: 127, in"
- "Magic number: 365, in"
- "Magic number: 500, in"
- "Magic number: 512, in"
- "Magic number: 1000, in"
- "Magic number: 1024, in"
- "Magic number: 3600, in"
- "Magic number: 86400, in"
- "Magic number: 1e3, in"
- "Magic number: 1e6, in"
- "Magic number: 1e7, in"
- "Magic number: 1e9, in"
- "Magic number: 1e12, in"
- "Magic number: 1e15, in"
- "Magic number: 0o600, in"
- "Magic number: 0o700, in"
- "noCopy is missing in"
- "variable name 'ok' is too short"
- "Function 'setListenTLSConfig' has too many statements"
- "Function 'ParseArgs' has too many statements"
- "Function 'parseAnyArg' has too many statements"
- "complexity.*setListenTLSConfig"
- "complexity.*checkFlags"
- "complexity.*ParseArgs"
- "Function 'readConfiguration' has too many statements"
- "complexity.*readConfiguration"
- "Function 'Check' has too many statements"
- "Function 'Check' is too long"
- "Function 'fetchProcs' is too long"
- "Function 'buildListMacros' is too long"
- "Function 'fetchProcs' has too many statements"
- "Function 'ReplaceConditionals' has too many statements"
- "cognitive complexity .* of func .*.Check"
- "cognitive complexity .* of func .*conditionAdd"
- "cognitive complexity .* of func .*.matchSingle"
- "cognitive complexity .* of func .*splitToken"
- "cognitive complexity .* of func .*ReplaceConditionals"
- "Function 'matchSingle' has too many statements"
- "cyclomatic complexity .* of func .*.matchSingle"
- "Function 'ParseINI' has too many statements"
- "Function 'buildListMacros' has too many statements"
- "cognitive complexity .* of func .*ParseINI`"
- "cognitive complexity .* of func .*ThresholdString"
- "appendAssign: append result not assigned to the same slice"
- "parameter name 'a' is too short for the scope of its usage"
- "parameter name 'b' is too short for the scope of its usage"
- ".execCommand` - `timeout` always receives `DefaultCmdTimeout"
- "fieldalignment: struct"
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test.*\.go
linters:
- dupword
- funlen
- copyloopvar
- path: (check_tcp|check_dns|nameserver.*)\.go
linters:
- nolintlint