Closed CuteReimu closed 5 months ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
By default, we don't support GOEXPERIMENT
.
Even with the right way to compile and run golangci-lint with rangefunc
, it's not supported by linters.
@ldez the issue you mentioned is now completed, but on golangci-lint 1.59.1
with goexperiment.rangefunc
tag in linter's build tags the linter still fails:
stream/iter_test.go:26:23: cannot range over seq (variable of type iter.Seq2[*int, error])
stream/iter_test.go:44:23: cannot range over seq (variable of type iter.Seq2[*int, error])
stream/iter_test.go:66:23: cannot range over seq (variable of type iter.Seq2[*int, error]) (typecheck)
UPD: I've read that typecheck "is not a real linter but rather reports compilation failures", but this works for me when golangci-lint fails:
go build -tags goexperiment.rangefunc ./...
Will wait for another month or so then :) (1.23 release should make this non-experiment)
Welcome
Description of the problem
I tried to use the new experiment feature
Range-Over-Function
in Go1.22. I ensuredGOEXPERIMENT
is set correctly.I ensured the version of golangci-lint is latest.
I can build the whole package successfully by
go build
. But golangci-lint can't recognize it.Version of golangci-lint
Configuration
No configuration file.
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation