Skip to content

Bump up golangci-lint to v1.52.2#8496

Merged
estesp merged 1 commit intocontainerd:mainfrom
ktock:golangci-lint-1.52.2
May 9, 2023
Merged

Bump up golangci-lint to v1.52.2#8496
estesp merged 1 commit intocontainerd:mainfrom
ktock:golangci-lint-1.52.2

Conversation

@ktock
Copy link
Copy Markdown
Member

@ktock ktock commented May 9, 2023

Release note: https://github.com/golangci/golangci-lint/releases/tag/v1.52.2

revive seems to become (very) strict by the following newly added rules (seems related to mgechev/revive#799). Especially unused-parameter reports a lot of "unused-parameter" errors (e.g. unused ctx context.Context argument on a function)

  • if-return
  • empty-block
  • superfluous-else
  • unused-parameter
  • unreachable-code
  • redefines-builtin-id

This commit disables them for now but let me know if we need them.

This commit also addresses the following linter errors:

remotes/docker/config/hosts.go:335:2: directive `//nolint:unused` is unused for linter "unused" (nolintlint)
	//nolint:unused
	^
pkg/cri/server/image_pull.go:346:38: directive `//nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833` is unused for linter "staticcheck" (nolintlint)
		tlsConfig.BuildNameToCertificate() //nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833
		                                   ^
pkg/cri/sbserver/images/image_pull.go:364:38: directive `//nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833` is unused for linter "staticcheck" (nolintlint)
		tlsConfig.BuildNameToCertificate() //nolint:staticcheck // TODO(thaJeztah): verify if we should ignore the deprecation; see https://github.com/containerd/containerd/pull/7349/files#r990644833

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@estesp estesp merged commit c6d7e45 into containerd:main May 9, 2023
@ktock ktock deleted the golangci-lint-1.52.2 branch May 10, 2023 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants