mirror of https://github.com/fluxcd/cli-utils.git
Update linter and fix warnings
This commit is contained in:
parent
542546c01d
commit
ac3bd31c1f
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
run:
|
||||
deadline: 5m
|
||||
deadline: 30m
|
||||
|
||||
linters:
|
||||
# please, do not use `enable-all`: it's deprecated and will be removed soon.
|
||||
|
@ -10,7 +10,7 @@ linters:
|
|||
disable-all: true
|
||||
enable:
|
||||
- bodyclose
|
||||
- depguard
|
||||
# - depguard
|
||||
- dogsled
|
||||
- dupl
|
||||
- errcheck
|
||||
|
@ -53,4 +53,5 @@ issues:
|
|||
# it can be disabled by `exclude-use-default: false`. To list all
|
||||
# excluded by default patterns execute `golangci-lint run --help`
|
||||
exclude:
|
||||
- Using the variable on range scope `tc` in function literal
|
||||
- "Using the variable on range scope `tc` in function literal"
|
||||
- "unused-parameter: parameter"
|
2
Makefile
2
Makefile
|
@ -16,7 +16,7 @@ all: generate license fix vet fmt test lint tidy
|
|||
go install github.com/google/addlicense@v1.0.0
|
||||
|
||||
"$(MYGOBIN)/golangci-lint":
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.0
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
|
||||
|
||||
"$(MYGOBIN)/deepcopy-gen":
|
||||
go install k8s.io/code-generator/cmd/deepcopy-gen@v0.25.2
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
run:
|
||||
deadline: 5m
|
||||
deadline: 30m
|
||||
|
||||
linters:
|
||||
# please, do not use `enable-all`: it's deprecated and will be removed soon.
|
||||
|
@ -11,7 +11,7 @@ linters:
|
|||
enable:
|
||||
- bodyclose
|
||||
- deadcode
|
||||
- depguard
|
||||
# - depguard
|
||||
- dogsled
|
||||
- dupl
|
||||
- errcheck
|
||||
|
|
|
@ -81,11 +81,10 @@ func SetNamespaces(mapper meta.RESTMapper, objs []*unstructured.Unstructured,
|
|||
// of unknown types.
|
||||
unknownGVKs = append(unknownGVKs, unknownTypeError.GroupVersionKind)
|
||||
continue
|
||||
} else {
|
||||
// If something went wrong when looking up the scope, just
|
||||
// give up.
|
||||
return err
|
||||
}
|
||||
// If something went wrong when looking up the scope, just
|
||||
// give up.
|
||||
return err
|
||||
}
|
||||
|
||||
switch scope {
|
||||
|
|
Loading…
Reference in New Issue