x/tools/gopls: copylock warning not shown/detected by the language server #51328
Labels
gopls/analysis
Issues related to running analysis in gopls
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
Using the language server, I expected to see the same warnings as using
go vet
manually, 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: