diff --git a/.golangci.yml b/.golangci.yml index 48ef790f93..4fab014d47 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,12 +1,12 @@ linters: enable: - bodyclose + - copyloopvar # Detects places where loop variables are copied. - depguard - dogsled - dupword # Detects duplicate words. - durationcheck - errchkjson - - exportloopref # Detects pointers to enclosing loop variables. - gocritic # Metalinter; detects bugs, performance, and styling issues. - gocyclo - gofumpt # Detects whether code was gofumpt-ed. @@ -58,6 +58,7 @@ linters-settings: excludes: - G104 # G104: Errors unhandled; (TODO: reduce unhandled errors, or explicitly ignore) - G113 # G113: Potential uncontrolled memory consumption in Rat.SetString (CVE-2022-23772); (only affects go < 1.16.14. and go < 1.17.7) + - G115 # G115: integer overflow conversion; (TODO: verify these: https://github.com/docker/cli/issues/5584) - G306 # G306: Expect WriteFile permissions to be 0600 or less (too restrictive; also flags "0o644" permissions) - G307 # G307: Deferring unsafe method "*os.File" on type "Close" (also EXC0008); (TODO: evaluate these and fix where needed: G307: Deferring unsafe method "*os.File" on type "Close") govet: diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index 05d9fca576..00a851ec23 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -2,7 +2,7 @@ ARG GO_VERSION=1.22.9 ARG ALPINE_VERSION=3.20 -ARG GOLANGCI_LINT_VERSION=v1.59.1 +ARG GOLANGCI_LINT_VERSION=v1.61.0 FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint