golanci-lint: upgrade to 1.60.3, fix one issue and ignore conversion errors

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
This commit is contained in:
Tuomas Katila 2024-08-22 14:00:03 +03:00 committed by Mikko Ylinen
parent fa6d027b24
commit 7e5b280cd1
4 changed files with 7 additions and 5 deletions

View File

@ -42,7 +42,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6
with:
version: v1.57.2
version: v1.60.3
args: -v --timeout 5m
build:
name: Build and check device plugins

View File

@ -12,12 +12,12 @@ linters:
- bodyclose
- dogsled
- errcheck
- exportloopref
- copyloopvar
- gocognit
- goconst
- gocyclo
- godot
- goerr113
- err113
- gofmt
- goimports
- gomodguard
@ -62,6 +62,9 @@ linters-settings:
issues:
exclude-rules:
- linters:
- gosec
text: "G115"
- path: _test\.go
linters:
- gocognit

View File

@ -10,7 +10,7 @@ EXTRA_BUILD_ARGS ?= ""
CERT_MANAGER_VERSION ?= v1.15.2
CONTROLLER_GEN_VERSION ?= v0.16.1
GOLANGCI_LINT_VERSION ?= v1.57.2
GOLANGCI_LINT_VERSION ?= v1.60.3
KIND_VERSION ?= v0.23.0
GOLICENSES_VERSION ?= v1.6.0
# Default bundle image tag

View File

@ -638,7 +638,6 @@ func TestLabeling(t *testing.T) {
t.Fatalf("can't create temporary subroot directory: %+v", err)
}
tc := tc
t.Run(tc.name, func(t *testing.T) {
err := os.MkdirAll(path.Join(subroot, "0"), 0750)
if err != nil {