/ go Public
x/tools/gopls: copylock warning not shown/detected by the language server #51328
Issues related to running analysis in gopls
Issues related to the Go language server, gopls.
This label describes issues relating to any tools in the x/tools repository.
What version of Go, VS Code & VS Code Go extension are you using?
go versionto get version of Go from the VS Code integrated terminal.
gopls -v versionto get version of Gopls from the VS Code integrated terminal.
code-insiders -vto get version of VS Code or VS Code Insiders.
Go: Locate Configured Go Toolscommand.
Share the Go related settings you have added/edited
Preferences: Open Settings (JSON)command to open your settings.json file.
Share all the settings with the
Describe the bug
Using the language server, I expected to see the same warnings as using
go vetmanually, but the extension isn't showing the following warning the command line tool detects.
However, when I change the function above to the following, the self-assignment is detected correctly by the extension.
Also, if I set the following setting, the "return copies lock value" warning is shown as expected by the extension on save.
Full code example under https://github.com/katexochen/vscode-vet-problem
Might be related to golang/vscode-go#1991?
The text was updated successfully, but these errors were encountered: