gopls diagnostics clear linter/Problems output #3511
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
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.go version go1.23.0 darwin/arm64
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.v0.42.0
Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Describe the bug
When saving a Go file,
golangci-lint
runs and shows warnings in the Problems pane. But whengopls
diagnostics are applied, the Problems list is completely cleared of all Go issues. Other linter issues (e.g., for JSON) remain in the Problems pane.The OUTPUT pane shows the successful run of the linter and its output, and PROBLEMS shows the errors. But when
gopls.diagnosticsDelay
is hit, the PROBLEMS pane is erased, and no additional output appears in the OUTPUT pane.REALIZATION: Only
golangci-lint
output from thestaticcheck
linter seems to be affected. Other linter issues for Go or other languages remain.Even if the
staticcheck
linter has become deprecated, this behavior is super confusing. ;) Additionally, our CI/CD is gated by a standalonegolangci-lint
run, so it's more than cosmetic.Steps to reproduce the behavior:
Create a file that fails the
staticcheck
linter (ingolangci-lint
), save it, andgopls
diagnostics will quickly clear these entries..golangci.yaml
:The text was updated successfully, but these errors were encountered: