Skip to content

Possible wrong Go version of Docker image #5403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 of 7 tasks
skwair opened this issue Feb 12, 2025 · 1 comment · Fixed by #5405
Closed
6 of 7 tasks

Possible wrong Go version of Docker image #5403

skwair opened this issue Feb 12, 2025 · 1 comment · Fixed by #5405
Assignees
Labels
bug Something isn't working docker PR that update Docker code

Comments

@skwair
Copy link

skwair commented Feb 12, 2025

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

@skwair skwair added the bug Something isn't working label Feb 12, 2025
Copy link

boring-cyborg bot commented Feb 12, 2025

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added the docker PR that update Docker code label Feb 12, 2025
@ldez ldez self-assigned this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker PR that update Docker code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants