Skip to content

Commit 071bc68

Browse files
committed
Remove unnecessary nolints
The bump to x/tools v0.39.0 changes the behaviour of the gosec linter, which no longer complains about these valid conversions.
1 parent 3b84b3f commit 071bc68

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

pkg/controllers/infracluster/azure.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ func (r *InfraClusterController) newAzureCluster(providerSpec *mapiv1beta1.Azure
276276
ResourceGroup: providerSpec.ResourceGroup,
277277
ControlPlaneEndpoint: clusterv1beta1.APIEndpoint{
278278
Host: apiURL.Hostname(),
279-
// Port numbers are less than 65536, ignore gosec.
280-
Port: int32(port), //nolint:gosec
279+
Port: int32(port),
281280
},
282281
},
283282
}

pkg/conversion/capi2mapi/aws.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ func convertAWSVolumeToMAPI(fldPath *field.Path, volume awsv1.Volume) (mapiv1bet
525525
if *volume.Throughput > math.MaxInt32 {
526526
return mapiv1beta1.BlockDeviceMappingSpec{}, field.Invalid(fldPath.Child("throughput"), *volume.Throughput, "throughput exceeds maximum int32 value")
527527
}
528-
//nolint:gosec
529528
bdm.EBS.ThroughputMib = ptr.To(int32(*volume.Throughput))
530529
}
531530

@@ -548,8 +547,6 @@ func convertAWSPlacementGroupPartition(in int64) *int32 {
548547
if in == 0 {
549548
return nil
550549
}
551-
// We know the value is between 0 and 7 based on API validation. Ignore gosec.
552-
//nolint:gosec
553550
return ptr.To(int32(in))
554551
}
555552

0 commit comments

Comments
 (0)