Upgrade linter version to the latest (#1253)

* upgrade golangci-lint version to latest

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>

* fix tests

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>

---------

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
This commit is contained in:
Mukundan Sundararajan 2023-02-28 23:43:28 +05:30 committed by GitHub
parent 06a4c6bddc
commit 56ba05982e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -30,7 +30,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
GOVER: 1.19.6
GOLANG_CI_LINT_VER: v1.49.0
GOLANG_CI_LINT_VER: v1.51.2
GOOS: ${{ matrix.target_os }}
GOARCH: ${{ matrix.target_arch }}
GOPROXY: https://proxy.golang.org

View File

@ -24,6 +24,7 @@ run:
skip-dirs:
- ^pkg.*client.*clientset.*versioned.*
- ^pkg.*client.*informers.*externalversions.*
- pkg.*mod.*k8s.io.*
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
@ -244,7 +245,7 @@ linters:
- goerr113
- nlreturn
- exhaustive
- gci
- gci
- noctx
- exhaustivestruct
- exhaustruct

View File

@ -111,8 +111,10 @@ func Uninstall(uninstallAll bool, dockerNetwork string, containerRuntime string,
return nil
}
// TODO move to use errors.Join once we move to go 1.20.
for _, e := range containerErrs {
err = fmt.Errorf("%w \n %s", err, e)
// For 1.19 only one %w is allowed.
err = fmt.Errorf("%w \n %s", err, e) //nolint: errorlint
}
return err
}