Merge pull request #8496 from ktock/golangci-lint-1.52.2

Bump up golangci-lint to v1.52.2
This commit is contained in:
Phil Estes 2023-05-09 13:03:06 -07:00 committed by GitHub
commit c6d7e45c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 5 deletions

View File

@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
version: v1.52.2
skip-cache: true
args: --timeout=8m

View File

@ -32,6 +32,24 @@ issues:
- path: 'archive[\\/]tarheader[\\/]'
# conversion is necessary on Linux, unnecessary on macOS
text: "unnecessary conversion"
- linters:
- revive
text: "if-return"
- linters:
- revive
text: "empty-block"
- linters:
- revive
text: "superfluous-else"
- linters:
- revive
text: "unused-parameter"
- linters:
- revive
text: "unreachable-code"
- linters:
- revive
text: "redefines-builtin-id"
linters-settings:
gosec:

View File

@ -361,7 +361,8 @@ func (c *CRIImageService) getTLSConfig(registryTLSConfig criconfig.TLSConfig) (*
if len(cert.Certificate) != 0 {
tlsConfig.Certificates = []tls.Certificate{cert}
}
tlsConfig.BuildNameToCertificate() //nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
// TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
tlsConfig.BuildNameToCertificate() //nolint:staticcheck
}
if registryTLSConfig.CAFile != "" {

View File

@ -343,7 +343,8 @@ func (c *criService) getTLSConfig(registryTLSConfig criconfig.TLSConfig) (*tls.C
if len(cert.Certificate) != 0 {
tlsConfig.Certificates = []tls.Certificate{cert}
}
tlsConfig.BuildNameToCertificate() //nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
// TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
tlsConfig.BuildNameToCertificate() //nolint:staticcheck
}
if registryTLSConfig.CAFile != "" {

View File

@ -332,7 +332,6 @@ func parseHostsFile(baseDir string, b []byte) ([]hostConfig, error) {
// HACK: we want to keep toml parsing structures private in this package, however go-toml ignores private embedded types.
// so we remap it to a public type within the func body, so technically it's public, but not possible to import elsewhere.
//nolint:unused
type HostFileConfig = hostFileConfig
c := struct {

View File

@ -23,7 +23,7 @@ set -eu -o pipefail
go install github.com/containerd/protobuild@v0.3.0
go install github.com/containerd/protobuild/cmd/go-fix-acronym@v0.3.0
go install github.com/cpuguy83/go-md2man/v2@v2.0.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@5cc9169d1fc1a8292866224ae09dc47827801874