Skip to content

Commit ac3bd31

Browse files
committed
Update linter and fix warnings
1 parent 542546c commit ac3bd31

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.golangci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
run:
5-
deadline: 5m
5+
deadline: 30m
66

77
linters:
88
# please, do not use `enable-all`: it's deprecated and will be removed soon.
99
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
1010
disable-all: true
1111
enable:
1212
- bodyclose
13-
- depguard
13+
# - depguard
1414
- dogsled
1515
- dupl
1616
- errcheck
@@ -53,4 +53,5 @@ issues:
5353
# it can be disabled by `exclude-use-default: false`. To list all
5454
# excluded by default patterns execute `golangci-lint run --help`
5555
exclude:
56-
- Using the variable on range scope `tc` in function literal
56+
- "Using the variable on range scope `tc` in function literal"
57+
- "unused-parameter: parameter"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ all: generate license fix vet fmt test lint tidy
1616
go install github.com/google/[email protected]
1717

1818
"$(MYGOBIN)/golangci-lint":
19-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.0
19+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
2020

2121
"$(MYGOBIN)/deepcopy-gen":
2222
go install k8s.io/code-generator/cmd/[email protected]

pkg/kstatus/.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
run:
5-
deadline: 5m
5+
deadline: 30m
66

77
linters:
88
# please, do not use `enable-all`: it's deprecated and will be removed soon.
@@ -11,7 +11,7 @@ linters:
1111
enable:
1212
- bodyclose
1313
- deadcode
14-
- depguard
14+
# - depguard
1515
- dogsled
1616
- dupl
1717
- errcheck

pkg/manifestreader/common.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,10 @@ func SetNamespaces(mapper meta.RESTMapper, objs []*unstructured.Unstructured,
8181
// of unknown types.
8282
unknownGVKs = append(unknownGVKs, unknownTypeError.GroupVersionKind)
8383
continue
84-
} else {
85-
// If something went wrong when looking up the scope, just
86-
// give up.
87-
return err
8884
}
85+
// If something went wrong when looking up the scope, just
86+
// give up.
87+
return err
8988
}
9089

9190
switch scope {

0 commit comments

Comments
 (0)