-
Notifications
You must be signed in to change notification settings - Fork 31
/
.golangci.yml
149 lines (149 loc) · 4.83 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
147
148
149
linters-settings:
gocritic:
enabled-tags:
- performance
- style
- experimental
gocyclo:
min-complexity: 20
goconst:
min-len: 8
min-occurrences: 12
lll:
line-length: 175
funlen:
lines: 150
statements: 100
gomoddirectives:
replace-local: true
gocognit:
min-complexity: 35
exhaustive:
default-signifies-exhaustive: true
asasalint:
exclude:
- append
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
- gochecknoglobals
- gochecknoinits
- gofumpt
- nonamedreturns
- paralleltest
- perfsprint
- tagliatelle
- testpackage
- wsl
# deprecated
- exportloopref
issues:
max-same-issues: 0
max-issues-per-linter: 0
exclude-use-default: true
exclude:
- 'data.Options.Sub.*_raw_query.*is deeply nested'
- 'Expect WriteFile permissions to be 0600 or less'
- 'lines are duplicate of.*_test.go:'
- 'lines are duplicate of.*objects.go:'
- 'Magic number: 0o644\D '
- 'Magic number: 1\D '
- 'Magic number: 5\D '
- 'Magic number: 7\D '
- 'Magic number: 10\D '
- 'Magic number: 100\D '
- 'Magic number: 1024\D '
- 'Magic number: 16\D '
- 'Magic number: 2\D '
- 'Magic number: 200\D '
- 'Magic number: 3\D '
- 'Magic number: 30\D '
- 'Magic number: 32\D '
- 'Magic number: 4\D '
- 'Magic number: 60\D '
- 'Magic number: 64\D '
- 'Magic number: 120\D '
- 'Magic number: 1800\D '
- 'Magic number: 65536\D '
- 'missing cases in switch of type GroupOperator: _'
- 'missing cases in switch of type Operator: _'
- 'missing cases in switch of type SortDirection: _'
- 'package should be `main_test` instead of `main`'
- 'Top level comment should end in a period'
- "_checkErr contains underscore"
- "_checkErr2 contains underscore"
- "(RLIMIT_NOFILE|O_APPEND|O_WRONLY|O_CREATE) contains underscore"
- "`noCopy` is unused"
- "Build is a global variable"
- "can be `expvar.Var`"
- "cognitive complexity .* of func `.*..optimizeStatsGroups` is high"
- "cognitive complexity .* of func `.*Peer..waitcondition` is high"
- "cognitive complexity .* of func `.*Request..getDistributedResponse` is high"
- "cognitive complexity .* of func `appendIndexHostsFromServiceColumns` is high"
- "cognitive complexity .* of func `ProcessRequests` is high"
- "cognitive complexity .* of func `prepareTmpDataHostService` is high"
- "cognitive complexity .* of func `.*RawResultSet..Less` is high"
- "CompressionLevel is a global variable"
- "CompressionMinimumSize is a global variable"
- "cyclomatic complexity .* of func `.*Less` is high"
- "cyclomatic complexity .* of func `.*ParseRequestHeaderLine` is high"
- "cyclomatic complexity .* of func `.*String` is high"
- "cyclomatic complexity .* of func `appendIndexHostsFromServiceColumns` is high"
- "cyclomatic complexity .* of func `matchStringListFilter` is high"
- "cyclomatic complexity .* of func `TestNegate` is high"
- "cyclomatic complexity .* of func `TestNodeManager` is high"
- "cyclomatic complexity .* of func `TestRequestKeepalive` is high"
- "cyclomatic complexity .* of func `.*statusSet` is high"
- "cyclomatic complexity .* of func `.*statusGet` is high"
- "dedup is a global variable"
- "defaultParseOptimizer is a global variable"
- "empty.* is a global variable"
- "Error return value of `log.Output` is not checked"
- "func .*noCopy.* is unused"
- "Function 'NewHostsTable' has too many statements"
- "Function 'NewServicesTable' has too many statements"
- "G108: Profiling endpoint is automatically exposed"
- "G114: Use of net/http serve function that has no support for setting timeouts"
- "log is a global variable"
- "LogFormat is a global variable"
- "Objects is a global variable"
- "once is a global variable"
- "OptionalFlagsStrings is a global variable"
- "prom.* is a global variable"
- "ptrToRefParam: consider `commandsByPeer' to be of non-pointer type"
- "TLS InsecureSkipVerify may be true"
- "Use of weak random number generator"
- "VirtualColumnList is a global variable"
- "VirtualColumnMap is a global variable"
- "LogPrefixer.*does not support error-wrapping"
- "constant name 'Or' is too short"
- "variable name 'ok' is too short"
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test.*\.go
linters:
- dupword
- errcheck
- errorlint
- forcetypeassert
- funlen
- gomnd
- lll
- musttag