Skip to content

Commit 969f8fe

Browse files
ktockestesp
authored andcommitted
Bump up golangci-lint to v1.52.2
Signed-off-by: Kohei Tokunaga <[email protected]> (cherry picked from commit 6e2c915)
1 parent 6cee15b commit 969f8fe

5 files changed

Lines changed: 22 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- uses: actions/checkout@v3
4848
- uses: golangci/golangci-lint-action@v3
4949
with:
50-
version: v1.51.1
50+
version: v1.52.2
5151
skip-cache: true
5252
args: --timeout=8m
5353

.golangci.yml

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

3250
linters-settings:
3351
gosec:

pkg/cri/server/image_pull.go

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

323324
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
@@ -22,7 +22,7 @@ set -eu -o pipefail
2222
# install `protobuild` and other commands
2323
go install github.com/stevvooe/[email protected]
2424
go install github.com/cpuguy83/go-md2man/[email protected]
25-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
25+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
2626

2727
# the following packages need to exist in $GOPATH so we can't use
2828
# go modules-aware mode of `go get` for these includes used during

0 commit comments

Comments
 (0)