quasilyte / go-consistent

Source code analyzer that helps you to make your Go programs more consistent.
MIT License
334 stars 16 forks source link

fix panic on go 1.22.x #44

Closed peczenyj closed 5 months ago

peczenyj commented 5 months ago

This fixes issue #43

there is a panic when using golang.org/x/tools@v0.11.0 on go 1.22

the minimal version that works is golang.org/x/tools@v0.13.0 -- the latest seems ok but it does not works on go 1.18

I add tests with go from 1.18 to 1.22

however I advise to bump go.mod to use 1.21 or 1.22 and drop support to older go versions - but this is not my call

changelog of tools

[v0.13.0: go/analysis/analysistest: give better hint in SuggestedFix assertion](https://github.com/golang/tools/releases/tag/v0.13.0)
@[adonovan](https://github.com/adonovan) adonovan tagged this Sep 5, 2023
Also, better documentation on the underlying cause.

Change-Id: I0ee93b6e9f2ada52d9a32a322b77fda783ddf076
Reviewed-on: https://go-review.googlesource.com/c/tools/+/525215
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>

[v0.12.0: gopls/internal/lsp/source: enable new defers analyzer](https://github.com/golang/tools/releases/tag/v0.12.0)
@[adonovan](https://github.com/adonovan) adonovan tagged this Aug 7, 2023
This change enables the new defers analyzer in gopls.
It also adds it to the vet compatibility test.
A follow-up change will add it to vet itself.

Also, remove stray backquote in doc comment.

Updates golang/go#60048

Change-Id: I42f09bb79fcbe4e48593dd32fd066ddd39b9626f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/502975
Run-TryBot: Alan Donovan <adonovan@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>