-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
Go version
Output of go env in your module/workspace:
win10, amd64What did you do?
in the settings.json add the fieldalignment flag:
"gopls": {
"analyses": {
"fieldalignment": true
}
}What did you see happen?
It now gives a popup warning in the bottom right corner:
Invalid settings: setting option "analyses": the 'fieldalignment' analyzer was removed in gopls/v0.17.0; instead, hover over struct fields to see size/offset information (https://go.dev/issue/66861)
It links to a completly unrelated issue #66861
What did you expect to see?
I expect a visual warnings when struct fields are misaligned by underlining the struct with a yellow line and a warning in the bottom panel.
note
I saw that there is a new way of hovering over the fields to check the alignment and offset, but this feels clunky and like a step back from an already good system where you would get visual feedback when you misaligned things.
Now I need to manually check the struct fields and must not forget to do so, since there is no visual feedback any more, when fields are misaligned.
Is there a way to get the old way back or add an option to give visual feedback for when fields are misaligned?