Skip to content

Commit e115f87

Browse files
authored
Merge pull request #3399 from dongjiang1989/update-golangci-lint
🌱Chore: Update golangci-lint version to v2.7.2
2 parents 607e772 + baa698c commit e115f87

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
- name: golangci-lint
3535
uses: golangci/golangci-lint-action@e7fa5ac41e1cf5b7d48e45e42232ce7ada589601 # tag=v9.1.0
3636
with:
37-
version: v2.6.1
37+
version: v2.7.2
3838
args: --output.text.print-linter-name=true --output.text.colors=true --timeout 10m
3939
working-directory: ${{matrix.working-directory}}

pkg/builder/webhook_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ func (*TestDefaultValidatorList) DeepCopyObject() runtime.Object { return nil
11531153
type TestCustomDefaulter struct{}
11541154

11551155
func (*TestCustomDefaulter) Default(ctx context.Context, obj runtime.Object) error {
1156-
d := obj.(*TestDefaulterObject) //nolint:ifshort
1156+
d := obj.(*TestDefaulterObject)
11571157
return (&testDefaulter{}).Default(ctx, d)
11581158
}
11591159

@@ -1186,7 +1186,7 @@ var _ admission.CustomDefaulter = &TestCustomDefaulter{}
11861186
type TestCustomValidator struct{}
11871187

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

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

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

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

1283-
d := obj.(*TestDefaultValidator) //nolint:ifshort
1283+
d := obj.(*TestDefaultValidator)
12841284

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

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

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

0 commit comments

Comments
 (0)