Skip to content

Commit 4197d22

Browse files
committed
lint
1 parent 73acdc8 commit 4197d22

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

internal/controller/linodemachine_controller_helpers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,9 @@ func getVPCInterfaceIPv6Config(machineScope *scope.MachineScope, numIPv6RangesIn
905905

906906
// Unfortunately, this is necessary since DeepCopy can't be generated for linodego.LinodeInterfaceCreateOptions
907907
// so here we manually create the options for Linode interfaces.
908+
// /
909+
//
910+
//nolint:gocognit,cyclop,gocritic,nestif,nolintlint // Also, unfortunately, this cannot be made any reasonably simpler with how complicated the linodego struct is
908911
func constructLinodeInterfaceCreateOpts(createOpts []infrav1alpha2.LinodeInterfaceCreateOptions) []linodego.LinodeInterfaceCreateOptions {
909912
linodeInterfaces := make([]linodego.LinodeInterfaceCreateOptions, len(createOpts))
910913
for idx, iface := range createOpts {

internal/webhook/v1alpha2/linodemachine_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (r *linodeMachineValidator) ValidateDelete(ctx context.Context, obj runtime
128128
func (r *linodeMachineValidator) validateLinodeMachineSpec(ctx context.Context, linodeclient clients.LinodeClient, spec infrav1alpha2.LinodeMachineSpec, skipAPIValidation bool) field.ErrorList {
129129
var errs field.ErrorList
130130

131-
if !skipAPIValidation {
131+
if !skipAPIValidation { //nolint:nestif // too simple for switch
132132
if spec.LinodeInterfaces != nil {
133133
if err := validateRegion(ctx, linodeclient, spec.Region, field.NewPath("spec").Child("region"), linodego.CapabilityLinodeInterfaces); err != nil {
134134
errs = append(errs, err)

0 commit comments

Comments
 (0)