Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@e7fa5ac41e1cf5b7d48e45e42232ce7ada589601 # tag=v9.1.0
with:
version: v2.6.1
version: v2.7.2
args: --output.text.print-linter-name=true --output.text.colors=true --timeout 10m
working-directory: ${{matrix.working-directory}}
12 changes: 6 additions & 6 deletions pkg/builder/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ func (*TestDefaultValidatorList) DeepCopyObject() runtime.Object { return nil
type TestCustomDefaulter struct{}

func (*TestCustomDefaulter) Default(ctx context.Context, obj runtime.Object) error {
d := obj.(*TestDefaulterObject) //nolint:ifshort
d := obj.(*TestDefaulterObject)
return (&testDefaulter{}).Default(ctx, d)
}

Expand Down Expand Up @@ -1186,7 +1186,7 @@ var _ admission.CustomDefaulter = &TestCustomDefaulter{}
type TestCustomValidator struct{}

func (*TestCustomValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error) {
v := obj.(*TestValidatorObject) //nolint:ifshort
v := obj.(*TestValidatorObject)
return (&testValidator{}).ValidateCreate(ctx, v)
}

Expand All @@ -1197,7 +1197,7 @@ func (*TestCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj r
}

func (*TestCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) {
v := obj.(*TestValidatorObject) //nolint:ifshort
v := obj.(*TestValidatorObject)
return (&testValidator{}).ValidateDelete(ctx, v)
}

Expand Down Expand Up @@ -1280,7 +1280,7 @@ func (*TestCustomDefaultValidator) Default(ctx context.Context, obj runtime.Obje
return fmt.Errorf("expected Kind TestDefaultValidator got %q", req.Kind.Kind)
}

d := obj.(*TestDefaultValidator) //nolint:ifshort
d := obj.(*TestDefaultValidator)

if d.Replica < 2 {
d.Replica = 2
Expand All @@ -1303,7 +1303,7 @@ func (*TestCustomDefaultValidator) ValidateCreate(ctx context.Context, obj runti
return nil, fmt.Errorf("expected Kind TestDefaultValidator got %q", req.Kind.Kind)
}

v := obj.(*TestDefaultValidator) //nolint:ifshort
v := obj.(*TestDefaultValidator)
if v.Replica < 0 {
return nil, errors.New("number of replica should be greater than or equal to 0")
}
Expand Down Expand Up @@ -1341,7 +1341,7 @@ func (*TestCustomDefaultValidator) ValidateDelete(ctx context.Context, obj runti
return nil, fmt.Errorf("expected Kind TestDefaultValidator got %q", req.Kind.Kind)
}

v := obj.(*TestDefaultValidator) //nolint:ifshort
v := obj.(*TestDefaultValidator)
if v.Replica > 0 {
return nil, errors.New("number of replica should be less than or equal to 0 to delete")
}
Expand Down