bazelbuild / rules_go

Go rules for Bazel
Apache License 2.0
1.36k stars 635 forks source link

nogo not populating Go version in analysis pass #3924

Open zakcutner opened 2 months ago

zakcutner commented 2 months ago

What version of rules_go are you using?

0.46.0

What version of gazelle are you using?

0.36.0

What version of Bazel are you using?

7.1.1

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

macOS (arm64)

Any other potentially useful information about your toolchain?

No

What did you do?

I ran nogo with Go version 1.22.

What did you expect to see?

No linting errors.

What did you see instead?

Linting errors from the loopclosure linter.

The loopclosure linter detects the Go version and disables itself for Go 1.22 and later. For this, it checks pass.TypesInfo.FileVersions, but this field does not appear to be populated by nogo.