dominikh / go-tools

Staticcheck - The advanced Go linter
https://staticcheck.dev
MIT License
6.21k stars 377 forks source link

Go install returns invalid go version '1.22.1': must match format 1.23 #1592

Closed hrak closed 3 months ago

hrak commented 3 months ago

A go install honnef.co/go/tools/cmd/staticcheck@latest returns the following:

03:44:42  0.638 go: downloading honnef.co/go/tools v0.5.1
03:44:42  1.071 go: honnef.co/go/tools/cmd/staticcheck@latest (in honnef.co/go/tools@v0.5.1): go.mod:3: invalid go version '1.22.1': must match format 1.23

Seems to be similar to this issue. Looks like the version in go.mod should not be major.minor.patch but major.minor.

Latest is currently at commit 915b568 This is in our CI which uses the latest docker.io/library/golang:1.19

dominikh commented 3 months ago

Staticcheck currently requires at least Go 1.22.1. You're using Go 1.19, which is not supported.

Looks like the version in go.mod should not be major.minor.patch but major.minor.

This changed several versions ago. See https://tip.golang.org/doc/toolchain#version.

hrak commented 3 months ago

Ah sorry, that makes total sense. Sorry for the noise, it was Monday morning clearly :)