Skip to content

Commit b16ca72

Browse files
ktockakhilerm
authored andcommitted
Bump up golangci-lint to v1.54.2
Signed-off-by: Kohei Tokunaga <[email protected]> (cherry picked from commit 6e2c915) Signed-off-by: Akhil Mohan <[email protected]>
1 parent 8d849a2 commit b16ca72

6 files changed

Lines changed: 24 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- uses: actions/checkout@v4
4242
- uses: golangci/golangci-lint-action@v4
4343
with:
44-
version: v1.51.1
44+
version: v1.54.2
4545
skip-cache: true
4646
args: --timeout=8m
4747

.golangci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ issues:
3232
- path: 'archive[\\/]tarheader[\\/]'
3333
# conversion is necessary on Linux, unnecessary on macOS
3434
text: "unnecessary conversion"
35+
- linters:
36+
- revive
37+
text: "if-return"
38+
- linters:
39+
- revive
40+
text: "empty-block"
41+
- linters:
42+
- revive
43+
text: "superfluous-else"
44+
- linters:
45+
- revive
46+
text: "unused-parameter"
47+
- linters:
48+
- revive
49+
text: "unreachable-code"
50+
- linters:
51+
- revive
52+
text: "redefines-builtin-id"
3553

3654
# FIXME temporarily suppress deprecation warnings for the logs package. See https://github.com/containerd/containerd/pull/9086
3755
- text: "SA1019: log\\.(G|L|Fields|Entry|RFC3339NanoFixed|Level|TraceLevel|DebugLevel|InfoLevel|WarnLevel|ErrorLevel|FatalLevel|PanicLevel|SetLevel|GetLevel|OutputFormat|TextFormat|JSONFormat|SetFormat|WithLogger|GetLogger)"

pkg/cri/sbserver/image_pull.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ func (c *criService) getTLSConfig(registryTLSConfig criconfig.TLSConfig) (*tls.C
379379
if len(cert.Certificate) != 0 {
380380
tlsConfig.Certificates = []tls.Certificate{cert}
381381
}
382-
tlsConfig.BuildNameToCertificate() //nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
382+
// TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
383+
tlsConfig.BuildNameToCertificate() //nolint:staticcheck
383384
}
384385

385386
if registryTLSConfig.CAFile != "" {

pkg/cri/server/image_pull.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ func (c *criService) getTLSConfig(registryTLSConfig criconfig.TLSConfig) (*tls.C
381381
if len(cert.Certificate) != 0 {
382382
tlsConfig.Certificates = []tls.Certificate{cert}
383383
}
384-
tlsConfig.BuildNameToCertificate() //nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
384+
// TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
385+
tlsConfig.BuildNameToCertificate() //nolint:staticcheck
385386
}
386387

387388
if registryTLSConfig.CAFile != "" {

remotes/docker/config/hosts.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ func parseHostsFile(baseDir string, b []byte) ([]hostConfig, error) {
365365

366366
// HACK: we want to keep toml parsing structures private in this package, however go-toml ignores private embedded types.
367367
// so we remap it to a public type within the func body, so technically it's public, but not possible to import elsewhere.
368-
//nolint:unused
369368
type HostFileConfig = hostFileConfig
370369

371370
c := struct {

script/setup/install-dev-tools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set -eu -o pipefail
2323
go install github.com/containerd/[email protected]
2424
go install github.com/containerd/protobuild/cmd/[email protected]
2525
go install github.com/cpuguy83/go-md2man/[email protected]
26-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
26+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2
2727
go install google.golang.org/protobuf/cmd/[email protected]
2828
go install google.golang.org/grpc/cmd/[email protected]
2929
go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@5cc9169d1fc1a8292866224ae09dc47827801874

0 commit comments

Comments
 (0)