Skip to content

Commit d4b50ca

Browse files
authored
Merge pull request #5543 from jackfrancis/lint-revive-targeted
chore: remove revive lint ignore statements
2 parents b18718c + 0fe9357 commit d4b50ca

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

azure/services/availabilitysets/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (
6060
// CreateOrUpdateAsync creates or updates an availability set asynchronously.
6161
// It sends a PUT request to Azure and if accepted without error, the func will return a Poller which can be used to track the ongoing
6262
// progress of the operation.
63-
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, _resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armcompute.AvailabilitySetsClientCreateOrUpdateResponse], err error) { //nolint:revive // keeping _resumeToken for understanding purposes
63+
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, _ string, parameters interface{}) (result interface{}, poller *runtime.Poller[armcompute.AvailabilitySetsClientCreateOrUpdateResponse], err error) { // ignore the resumeToken (3rd arg) as availability sets do not support polling in the same way as other resources
6464
ctx, _, done := tele.StartSpanWithLogger(ctx, "availabilitySets.AzureClient.CreateOrUpdateAsync")
6565
defer done()
6666

@@ -82,7 +82,7 @@ func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.Resou
8282
// DeleteAsync deletes a availability set asynchronously. DeleteAsync sends a DELETE
8383
// request to Azure and if accepted without error, the func will return a Poller which can be used to track the ongoing
8484
// progress of the operation.
85-
func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, _resumeToken string) (poller *runtime.Poller[armcompute.AvailabilitySetsClientDeleteResponse], err error) { //nolint:revive // keeping _resumeToken for understanding purposes
85+
func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, _ string) (poller *runtime.Poller[armcompute.AvailabilitySetsClientDeleteResponse], err error) { // ignore the resumeToken (3rd arg) as availability sets do not support polling in the same way as other resources
8686
ctx, _, done := tele.StartSpanWithLogger(ctx, "availabilitysets.AzureClient.DeleteAsync")
8787
defer done()
8888

azure/services/networkinterfaces/client.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ import (
2929
"sigs.k8s.io/cluster-api-provider-azure/util/tele"
3030
)
3131

32-
// azureClient contains the Azure go-sdk Client.
33-
type azureClient struct {
32+
// AzureClient contains the Azure go-sdk Client.
33+
type AzureClient struct {
3434
interfaces *armnetwork.InterfacesClient
3535
apiCallTimeout time.Duration
3636
}
3737

3838
// NewClient creates a new network interfaces client from an authorizer.
39-
func NewClient(auth azure.Authorizer, apiCallTimeout time.Duration) (*azureClient, error) { //nolint:revive // leave it as is
39+
func NewClient(auth azure.Authorizer, apiCallTimeout time.Duration) (*AzureClient, error) {
4040
opts, err := azure.ARMClientOptions(auth.CloudEnvironment())
4141
if err != nil {
4242
return nil, errors.Wrap(err, "failed to create networkinterfaces client options")
@@ -45,11 +45,11 @@ func NewClient(auth azure.Authorizer, apiCallTimeout time.Duration) (*azureClien
4545
if err != nil {
4646
return nil, errors.Wrap(err, "failed to create armnetwork client factory")
4747
}
48-
return &azureClient{factory.NewInterfacesClient(), apiCallTimeout}, nil
48+
return &AzureClient{factory.NewInterfacesClient(), apiCallTimeout}, nil
4949
}
5050

5151
// Get gets the specified network interface.
52-
func (ac *azureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error) {
52+
func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error) {
5353
ctx, _, done := tele.StartSpanWithLogger(ctx, "networkinterfaces.AzureClient.Get")
5454
defer done()
5555

@@ -63,7 +63,7 @@ func (ac *azureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (
6363
// CreateOrUpdateAsync creates or updates a network interface asynchronously.
6464
// It sends a PUT request to Azure and if accepted without error, the func will return a poller which can be used to track the ongoing
6565
// progress of the operation.
66-
func (ac *azureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armnetwork.InterfacesClientCreateOrUpdateResponse], err error) {
66+
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armnetwork.InterfacesClientCreateOrUpdateResponse], err error) {
6767
ctx, _, done := tele.StartSpanWithLogger(ctx, "networkinterfaces.AzureClient.CreateOrUpdateAsync")
6868
defer done()
6969

@@ -96,7 +96,7 @@ func (ac *azureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.Resou
9696
// DeleteAsync deletes a network interface asynchronously. DeleteAsync sends a DELETE
9797
// request to Azure and if accepted without error, the func will return a poller which can be used to track the ongoing
9898
// progress of the operation.
99-
func (ac *azureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armnetwork.InterfacesClientDeleteResponse], err error) {
99+
func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armnetwork.InterfacesClientDeleteResponse], err error) {
100100
ctx, _, done := tele.StartSpanWithLogger(ctx, "networkinterfaces.AzureClient.DeleteAsync")
101101
defer done()
102102

azure/services/roleassignments/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (ac *azureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (
5959

6060
// CreateOrUpdateAsync creates a roleassignment.
6161
// Creating a roleassignment is not a long running operation, so we don't ever return a poller.
62-
func (ac *azureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armauthorization.RoleAssignmentsClientCreateResponse], err error) { //nolint:revive // keeping resumeToken for readability
62+
func (ac *azureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, _ string, parameters interface{}) (result interface{}, poller *runtime.Poller[armauthorization.RoleAssignmentsClientCreateResponse], err error) { // ignore resumeToken (3rd arg) since this is not a long-running operation
6363
ctx, _, done := tele.StartSpanWithLogger(ctx, "roleassignments.azureClient.CreateOrUpdateAsync")
6464
defer done()
6565

test/e2e/cni.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ const (
4545
// EnsureCNI installs the CNI plugin depending on the input.CNIManifestPath
4646
func EnsureCNI(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, installHelmChart bool, cidrBlocks []string, hasWindows bool) {
4747
if input.CNIManifestPath != "" {
48-
InstallCNIManifest(ctx, input, cidrBlocks, hasWindows)
48+
InstallCNIManifest(ctx, input)
4949
} else {
5050
EnsureCalicoIsReady(ctx, input, installHelmChart, cidrBlocks, hasWindows)
5151
}
5252
}
5353

5454
// InstallCNIManifest installs the CNI manifest provided by the user
55-
func InstallCNIManifest(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput, cidrBlocks []string, hasWindows bool) { //nolint:revive // leaving unused cidrBlocks and hasWindows for understanding
55+
func InstallCNIManifest(ctx context.Context, input clusterctl.ApplyCustomClusterTemplateAndWaitInput) {
5656
By("Installing a CNI plugin to the workload cluster")
5757
workloadCluster := input.ClusterProxy.GetWorkloadCluster(ctx, input.Namespace, input.ClusterName)
5858

0 commit comments

Comments
 (0)