@@ -49,12 +49,13 @@ linters:
49
49
- wastedassign
50
50
- whitespace
51
51
settings :
52
+ # TODO(sbuerin) fix remaining findings and set to 20 afterwards
52
53
cyclop :
53
54
max-complexity : 30
54
55
gocritic :
55
56
disabled-checks :
56
57
- appendAssign
57
- - dupImport
58
+ - dupImport # https://github.com/go-critic/go-critic/issues/845
58
59
- evalOrder
59
60
- ifElseChain
60
61
- octalLiteral
@@ -74,6 +75,7 @@ linters:
74
75
- performance
75
76
importas :
76
77
alias :
78
+ # Kubernetes
77
79
- pkg : k8s.io/api/core/v1
78
80
alias : corev1
79
81
- pkg : k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
@@ -84,14 +86,17 @@ linters:
84
86
alias : apierrors
85
87
- pkg : k8s.io/apimachinery/pkg/util/errors
86
88
alias : kerrors
89
+ # Controller Runtime
87
90
- pkg : sigs.k8s.io/controller-runtime
88
91
alias : ctrl
92
+ # CAPO
89
93
- pkg : sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1
90
94
alias : infrav1alpha1
91
95
- pkg : sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1
92
96
alias : infrav1
93
97
- pkg : sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors
94
98
alias : capoerrors
99
+ # CAPI
95
100
- pkg : sigs.k8s.io/cluster-api/api/v1alpha3
96
101
alias : clusterv1alpha3
97
102
- pkg : sigs.k8s.io/cluster-api/api/v1alpha4
@@ -110,24 +115,31 @@ linters:
110
115
alias : v1beta1patch
111
116
- pkg : sigs.k8s.io/cluster-api/api/ipam/v1beta2
112
117
alias : ipamv1
118
+ # CABPK
113
119
- pkg : sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3
114
120
alias : bootstrapv1alpha3
115
121
- pkg : sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4
116
122
alias : bootstrapv1alpha4
117
123
- pkg : sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1
118
124
alias : bootstrapv1
125
+ # KCP
119
126
- pkg : sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3
120
127
alias : controlplanev1alpha3
121
128
- pkg : sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4
122
129
alias : controlplanev1alpha4
123
130
- pkg : sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1
124
131
alias : controlplanev1
132
+ # ORC
125
133
- pkg : github.com/k-orc/openstack-resource-controller/api/v1alpha1
126
134
alias : orcv1alpha1
127
135
no-unaliased : true
128
136
nestif :
137
+ # minimal complexity of if statements to report, 5 by default
138
+ # TODO(sbuerin) fix remaining findings and set to 5 after:
139
+ # https://github.com/kubernetes-sigs/cluster-api-provider-openstack/pull/778
129
140
min-complexity : 13
130
141
nolintlint :
142
+ # https://github.com/golangci/golangci-lint/issues/3228
131
143
allow-unused : true
132
144
exclusions :
133
145
generated : lax
@@ -136,13 +148,15 @@ linters:
136
148
- common-false-positives
137
149
- legacy
138
150
- std-error-handling
151
+ # List of regexps of issue texts to exclude, empty list by default.
139
152
rules :
140
153
- linters :
141
154
- gosec
142
155
text : ' G108: Profiling endpoint is automatically exposed on /debug/pprof'
143
156
- linters :
144
157
- gosec
145
158
text : ' G108: Profiling endpoint is automatically exposed on /debug/pprof'
159
+ # This directive allows the embed package to be imported with an underscore everywhere.
146
160
- linters :
147
161
- revive
148
162
source : _ "embed"
0 commit comments