Skip to content

Commit d9bef83

Browse files
committed
Add whitespace linter
1 parent 2679730 commit d9bef83

28 files changed

+1
-51
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ linters:
3030
- unconvert
3131
- unused
3232
- varcheck
33+
- whitespace
3334
# Run with --fast=false for more extensive checks
3435
fast: true
3536
issues:

api/v1alpha4/azurecluster_default.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ func (c *AzureCluster) setAPIServerLBDefaults() {
155155
},
156156
}
157157
}
158-
159158
} else if lb.Type == Internal {
160159
if lb.Name == "" {
161160
lb.Name = generateInternalLBName(c.ObjectMeta.Name)
@@ -214,7 +213,6 @@ func (c *AzureCluster) setNodeOutboundLBDefaults() {
214213
},
215214
}
216215
}
217-
218216
}
219217
}
220218

api/v1alpha4/azurecluster_validation_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ func TestClusterNameValidation(t *testing.T) {
8686
}
8787
for _, tc := range tests {
8888
t.Run(tc.name, func(t *testing.T) {
89-
9089
azureCluster := AzureCluster{
9190
ObjectMeta: metav1.ObjectMeta{
9291
Name: tc.clusterName,

api/v1alpha4/azuremachine_default_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ func TestAzureMachine_SetDataDisksDefaults(t *testing.T) {
248248
}
249249
})
250250
}
251-
252251
}
253252

254253
func createMachineWithSSHPublicKey(t *testing.T, sshPublicKey string) *AzureMachine {

api/v1alpha4/azuremachine_webhook_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ func createMachineWithSharedImage(t *testing.T, subscriptionID, resourceGroup, n
569569
OSDisk: validOSDisk,
570570
},
571571
}
572-
573572
}
574573

575574
func createMachineWithtMarketPlaceImage(t *testing.T, publisher, offer, sku, version string) *AzureMachine {

api/v1alpha4/azuremachinetemplate_webhook.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ func (r *AzureMachineTemplate) ValidateUpdate(oldRaw runtime.Object) error {
6565
return nil
6666
}
6767
return apierrors.NewInvalid(GroupVersion.WithKind("AzureMachineTemplate").GroupKind(), r.Name, allErrs)
68-
6968
}
7069

7170
// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

api/v1alpha4/azuremachinetemplate_webhook_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,4 @@ func TestAzureMachineTemplate_ValidateUpdate(t *testing.T) {
125125
}
126126
})
127127
}
128-
129128
}

azure/converters/image.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727

2828
// ImageToSDK converts a CAPZ Image (as RawExtension) to a Azure SDK Image Reference.
2929
func ImageToSDK(image *infrav1.Image) (*compute.ImageReference, error) {
30-
3130
if image.ID != nil {
3231
return specificImageToSDK(image)
3332
}
@@ -39,7 +38,6 @@ func ImageToSDK(image *infrav1.Image) (*compute.ImageReference, error) {
3938
}
4039

4140
return nil, errors.New("unable to convert image as no options set")
42-
4341
}
4442

4543
func mpImageToSDK(image *infrav1.Image) (*compute.ImageReference, error) {
@@ -49,7 +47,6 @@ func mpImageToSDK(image *infrav1.Image) (*compute.ImageReference, error) {
4947
Sku: &image.Marketplace.SKU,
5048
Version: &image.Marketplace.Version,
5149
}, nil
52-
5350
}
5451

5552
func sigImageToSDK(image *infrav1.Image) (*compute.ImageReference, error) {

azure/converters/vmss.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func SDKToVMSS(sdkvmss compute.VirtualMachineScaleSet, sdkinstances []compute.Vi
5454
if sdkvmss.VirtualMachineProfile != nil &&
5555
sdkvmss.VirtualMachineProfile.StorageProfile != nil &&
5656
sdkvmss.VirtualMachineProfile.StorageProfile.ImageReference != nil {
57-
5857
imageRef := sdkvmss.VirtualMachineProfile.StorageProfile.ImageReference
5958
vmss.Image = SDKImageToImage(imageRef, sdkvmss.Plan != nil)
6059
}

azure/scope/identity.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ func getAzureIdentityType(identity *infrav1.AzureClusterIdentity) (aadpodv1.Iden
161161
}
162162

163163
return 0, errors.New("AzureIdentity does not have a vaild type")
164-
165164
}
166165

167166
// IsClusterNamespaceAllowed indicates if the cluster namespace is allowed.

0 commit comments

Comments
 (0)