x/tools/gopls: Printf wrappers not checked when implemented in a different package than caller #53131
Labels
gopls/analysis
Issues related to running analysis in gopls
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
go env
What did you do?
While using VSCode with gopls, I found that Printf wrappers are not checked when the Printf wrapper is in a different package than the code that calls it.
What did you expect to see?
I'm expecting that Printf wrappers to be checked even if they are implemented in a different go package.
What did you see instead?
(https://go.dev/play/p/9GMssNuK7rZ)
In the image, in main.go file:
log.Printf
(the go's log package) is properly checked (a diagnostic is reported for a missing argument to match the%s
)logWrapper.Debugf
is not checked and I expect it to be checked given it callslog.Printf
(the same waylogWrapper.Testf
is checked)I'm expecting to have a
printf
diagnostic for the line main.go:11 too.Editor and settings
I'm using default settings in VS Code.
VS Code version 1.67.1
vscode-go plugin version v0.33.1
Logs
Language server logs:
gopls logs:
The text was updated successfully, but these errors were encountered: