Skip to content

Commit

Permalink
[gopls-release-branch.0.6] internal/lsp: add titles to go mod tidy
Browse files Browse the repository at this point in the history
…and update go.sum fixes

These were missing titles, which was showing up empty for users in the
VS Code UI and leading people not to trust the fixes.

Also did a find references on SuggestedFix to confirm that we always
set the title in other cases.

Fixes golang/go#43234

Change-Id: I8d0f272c383a2e1a364aefcec6650988d18d4fb4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/278778
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
(cherry picked from commit 48e5bd1)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/278785
  • Loading branch information
stamblerre committed Dec 17, 2020
1 parent 2037813 commit c88dec5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/lsp/cache/mod_tidy.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,15 @@ See https://github.com/golang/go/issues/39164 for more detail on this issue.`,
Message: `go.sum is out of sync with go.mod. Please update it or run "go mod tidy".`,
SuggestedFixes: []source.SuggestedFix{
{
Title: source.CommandTidy.Title,
Command: &protocol.Command{
Command: source.CommandTidy.ID(),
Title: source.CommandTidy.Title,
Arguments: args,
},
},
{
Title: source.CommandUpdateGoSum.Title,
Command: &protocol.Command{
Command: source.CommandUpdateGoSum.ID(),
Title: source.CommandUpdateGoSum.Title,
Expand Down

0 comments on commit c88dec5

Please sign in to comment.