Skip to content

Commit b883c94

Browse files
committed
Re-add comments to golangci-lint config
These were dropped during the migration to v2. Re-add them. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 5754576 commit b883c94

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.golangci.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ linters:
4949
- wastedassign
5050
- whitespace
5151
settings:
52+
# TODO(sbuerin) fix remaining findings and set to 20 afterwards
5253
cyclop:
5354
max-complexity: 30
5455
gocritic:
5556
disabled-checks:
5657
- appendAssign
57-
- dupImport
58+
- dupImport # https://github.com/go-critic/go-critic/issues/845
5859
- evalOrder
5960
- ifElseChain
6061
- octalLiteral
@@ -74,6 +75,7 @@ linters:
7475
- performance
7576
importas:
7677
alias:
78+
# Kubernetes
7779
- pkg: k8s.io/api/core/v1
7880
alias: corev1
7981
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
@@ -84,14 +86,17 @@ linters:
8486
alias: apierrors
8587
- pkg: k8s.io/apimachinery/pkg/util/errors
8688
alias: kerrors
89+
# Controller Runtime
8790
- pkg: sigs.k8s.io/controller-runtime
8891
alias: ctrl
92+
# CAPO
8993
- pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1
9094
alias: infrav1alpha1
9195
- pkg: sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1
9296
alias: infrav1
9397
- pkg: sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors
9498
alias: capoerrors
99+
# CAPI
95100
- pkg: sigs.k8s.io/cluster-api/api/v1alpha3
96101
alias: clusterv1alpha3
97102
- pkg: sigs.k8s.io/cluster-api/api/v1alpha4
@@ -110,24 +115,31 @@ linters:
110115
alias: v1beta1patch
111116
- pkg: sigs.k8s.io/cluster-api/api/ipam/v1beta2
112117
alias: ipamv1
118+
# CABPK
113119
- pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3
114120
alias: bootstrapv1alpha3
115121
- pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4
116122
alias: bootstrapv1alpha4
117123
- pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1
118124
alias: bootstrapv1
125+
# KCP
119126
- pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3
120127
alias: controlplanev1alpha3
121128
- pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4
122129
alias: controlplanev1alpha4
123130
- pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1
124131
alias: controlplanev1
132+
# ORC
125133
- pkg: github.com/k-orc/openstack-resource-controller/api/v1alpha1
126134
alias: orcv1alpha1
127135
no-unaliased: true
128136
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
129140
min-complexity: 13
130141
nolintlint:
142+
# https://github.com/golangci/golangci-lint/issues/3228
131143
allow-unused: true
132144
exclusions:
133145
generated: lax
@@ -136,13 +148,15 @@ linters:
136148
- common-false-positives
137149
- legacy
138150
- std-error-handling
151+
# List of regexps of issue texts to exclude, empty list by default.
139152
rules:
140153
- linters:
141154
- gosec
142155
text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof'
143156
- linters:
144157
- gosec
145158
text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof'
159+
# This directive allows the embed package to be imported with an underscore everywhere.
146160
- linters:
147161
- revive
148162
source: _ "embed"

0 commit comments

Comments
 (0)