Skip to content

Possible wrong Go version of Docker image #5403

@skwair

Description

@skwair

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

Description of the problem

Hello! 👋

I'm using golangci-lint as a container and during the process of migrating a project to the recently released version of Go 1.24, I noticed that the latest version of the golangci-lint container (v1.64.2 at the moment of writing this issue) is not built using Go 1.24?

It of course fails to run when using new features of Go 1.24 (e.g., t.Context() in tests).

Version of golangci-lint

$ docker run --rm -it golangci/golangci-lint:v1.64.2 go version
go version go1.23.6 linux/arm64

Configuration

Not relevant

Go environment

Not relevant

Verbose output of running

$ docker volume rm golangci-lint-cache
$ docker run --rm -u $(id -u):$(id -g) -t -v $(pwd):/src -w /src -v golangci-lint-cache:/tmp -e "GOLANGCI_LINT_CACHE=/tmp/golangci-lint-cache" -e "GOCACHE=/tmp/go-cache" golangci/golangci-lint:v1.64.2 golangci-lint run --fix
pkg/migration/migration_test.go:1: : # github.com/xxx/xxx/pkg/migration_test [github.com/xxx/xxx/pkg/migration.test]
pkg/migration/migration_test.go:31:25: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:34:36: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:42:33: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:52:35: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:60:32: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:72:35: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:80:34: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:92:35: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:99:34: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:109:35: t.Context undefined (type *testing.T has no field or method Context, but does have unexported field context)
pkg/migration/migration_test.go:109:35: too many errors (typecheck)

A minimal reproducible example or link to a public repository

Try to lint any project that makes use of any new feature of Go 1.24 (`t.Context()` in tests for example) using the containerized version of golangci-lint.

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdockerPR that update Docker code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions