Skip to content

Commit

Permalink
Bump up golangci-lint to v1.52.2
Browse files Browse the repository at this point in the history
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
(cherry picked from commit 6e2c915)
  • Loading branch information
ktock authored and estesp committed Dec 1, 2023
1 parent 6cee15b commit 969f8fe
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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

Expand Down
18 changes: 18 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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:
Expand Down
3 changes: 2 additions & 1 deletion pkg/cri/server/image_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,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 != "" {
Expand Down
1 change: 0 additions & 1 deletion remotes/docker/config/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,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 {
Expand Down
2 changes: 1 addition & 1 deletion script/setup/install-dev-tools
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -eu -o pipefail
# install `protobuild` and other commands
go install github.com/stevvooe/protobuild@v0.1.0
go install github.com/cpuguy83/go-md2man/v2@v2.0.1
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

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

0 comments on commit 969f8fe

Please sign in to comment.