-
Notifications
You must be signed in to change notification settings - Fork 716
/
.golangci.yml
110 lines (110 loc) · 4.75 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
run:
deadline: 300s
skip-dirs:
- config
- hack/licence\-detector
skip-files:
- utils/chrono/millis\.test\.go
linters:
enable-all: true
disable:
- dupl
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit # added in 1.20
- godot # added in 1.25
- godox # added in 1.19
- goerr113
- gomnd # added in 1.23
- interfacer
- lll
- nestif # added in 1.25
- scopelint
- testpackage # added in 1.25
- whitespace # added in 1.19
- wsl # added in 1.20
linters-settings:
maligned:
suggest-new: true
issues:
exclude-rules:
- linters:
- golint
text: 'name .* stutters'
- path: (^test/.*\.go|.*_test\.go)
linters:
- goconst
- unparam
- linters:
- gosec
# this was added in https://github.com/securego/gosec/issues/438 but for our use case is more or less entirely false positives
text: 'G601: Implicit memory aliasing in for loop.'
- path: cmd/manager/main\.go
text: 'cyclomatic complexity \d+ of func `execute` is high'
- path: pkg/controller/apmserver/config/reconcile\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/common/settings/canonical_config\.go
text: 'Consider preallocating `result`'
- path: pkg/controller/common/user/external\.go
text: 'method Id should be ID'
- path: pkg/controller/elasticsearch/certificates/transport/csr\.go
text: '`buildGeneralNames` \- `svcs` is unused'
- path: pkg/controller/elasticsearch/certificates/transport/reconcile\.go
text: 'Consider preallocating `names`'
- path: pkg/controller/elasticsearch/client/base\.go
text: '`\(\*baseClient\)\.put` \- `out` always receives `nil`'
- path: pkg/controller/elasticsearch/client/client\.go
text: 'G402: TLS InsecureSkipVerify set true'
- path: pkg/controller/elasticsearch/client/model\.go
text: 'struct of size 136 bytes could be of size 128 bytes'
- path: pkg/controller/elasticsearch/driver/default.go
text: 'cyclomatic complexity \d+ of func `\(\*defaultDriver\)\.Reconcile` is high'
- path: pkg/controller/elasticsearch/keystore/environment\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/elasticsearch/mutation/comparison/pvc\.go
text: 'Consider preallocating `volumeAndPVCs`'
- path: pkg/controller/elasticsearch/name/name\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/elasticsearch/processmanager/client\.go
text: '`\(\*DefaultClient\)\.doRequest` \- `method` always receives `\"GET\"`'
- path: pkg/controller/elasticsearch/processmanager/client\.go
text: 'G402: TLS InsecureSkipVerify set true'
- path: pkg/controller/elasticsearch/processmanager/config\.go
text: 'struct of size 96 bytes could be of size 80 bytes'
- path: pkg/controller/elasticsearch/reconcile/resources_state\.go
text: 'ifElseChain: rewrite if\-else to switch statement'
- path: pkg/apis/elasticsearch/v1beta1/fields\.go
text: 'const .* should be'
- path: pkg/apis/elasticsearch/v1/fields\.go
text: 'const .* should be'
- path: pkg/controller/elasticsearch/user/reconciler\.go
text: 'Consider preallocating `allUsers`'
- path: pkg/controller/elasticsearch/user/user\.go
text: 'method Id should be ID'
- path: pkg/controller/elasticsearch/validation/validation\.go
text: 'Consider preallocating `errs`'
- path: pkg/controller/elasticsearch/version/running_versions\.go
text: 'Consider preallocating `vs`'
- path: pkg/controller/elasticsearch/version/version6/zen1_test\.go
text: 'struct of size 1048 bytes could be of size 1040 bytes'
- path: pkg/controller/elasticsearch/version/version7/initial_master_nodes_test\.go
text: 'ifElseChain: rewrite if\-else to switch statement'
- path: pkg/controller/elasticsearch/volume/names\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/kibana/volume/volumes\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/kibanaassociation/ca\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/kibanaassociation/user_test\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/license/validation/validations\.go
text: 'Consider preallocating `errs`'
- path: test/e2e/test/elasticsearch/steps_license\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/apis/elasticsearch/v1beta1/name\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/apis/elasticsearch/v1/name\.go
text: 'G101: Potential hardcoded credentials'
- path: pkg/controller/elasticsearch/driver/version\.go
text: 'Consider preallocating `vs`'