Closed ashtishad closed 8 months ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Hello,
To be able to use golangci-lint with go 1.22 you should use a version built go1.22.
Our official binaries and Docker images are built with go1.22:
$ golangci-lint version
golangci-lint has version 1.56.2 built with go1.22.0 from 58a724a0 on 2024-02-15T18:01:51Z
Also the first version that support go1.22 is golangci-lint v1.56.0.
From your description:
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265f on 2023-11-03T12:59:25Z
This means that you have built golangci-lint v1.55.2 built with go1.21.
You should use golangci-lint v1.56.0 built with go1.22.
Welcome
Description of the problem
As of Go 1.22 "For" loops may now range over integers. Official Doc
However, When I am running the linter it's giving me this error: "cannot range over n (variable of type int) (typecheck)"
Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation