Skip to content

Commit 9fa0f07

Browse files
committed
🌱 Update golangci-lint to v1.50.1
Signed-off-by: Vince Prignano <[email protected]>
1 parent f40b846 commit 9fa0f07

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@v3
2121
with:
22-
version: v1.49.0
22+
version: v1.50.1
2323
working-directory: ${{matrix.working-directory}}

.golangci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ linters:
33
enable:
44
- asciicheck
55
- bodyclose
6-
- deadcode
76
- depguard
87
- dogsled
98
- errcheck
@@ -18,7 +17,6 @@ linters:
1817
- gosec
1918
- gosimple
2019
- govet
21-
- ifshort
2220
- importas
2321
- ineffassign
2422
- misspell
@@ -29,19 +27,14 @@ linters:
2927
- revive
3028
- rowserrcheck
3129
- staticcheck
32-
- structcheck
3330
- stylecheck
3431
- typecheck
3532
- unconvert
3633
- unparam
3734
- unused
38-
- varcheck
3935
- whitespace
4036

4137
linters-settings:
42-
ifshort:
43-
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
44-
max-decl-chars: 50
4538
importas:
4639
no-unaliased: true
4740
alias:

pkg/builder/webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ func (*TestCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj r
892892
}
893893

894894
v := newObj.(*TestValidator)
895-
old := oldObj.(*TestValidator) //nolint:ifshort
895+
old := oldObj.(*TestValidator)
896896
if v.Replica < 0 {
897897
return errors.New("number of replica should be greater than or equal to 0")
898898
}

pkg/client/apiutil/apimachinery.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func GVKForObject(obj runtime.Object, scheme *runtime.Scheme) (schema.GroupVersi
8181
// (unstructured, partial, etc)
8282

8383
// check for PartialObjectMetadata, which is analogous to unstructured, but isn't handled by ObjectKinds
84-
_, isPartial := obj.(*metav1.PartialObjectMetadata) //nolint:ifshort
84+
_, isPartial := obj.(*metav1.PartialObjectMetadata)
8585
_, isPartialList := obj.(*metav1.PartialObjectMetadataList)
8686
if isPartial || isPartialList {
8787
// we require that the GVK be populated in order to recognize the object

pkg/controller/controllerutil/controllerutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f M
207207
return OperationResultCreated, nil
208208
}
209209

210-
existing := obj.DeepCopyObject() //nolint
210+
existing := obj.DeepCopyObject()
211211
if err := mutate(f, key, obj); err != nil {
212212
return OperationResultNone, err
213213
}

0 commit comments

Comments
 (0)