-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/lsp/regtest: add @suggestedfix marker
This change adds a suggestedfix marker type similar to the one in the LSP tests. Like @diag, it creates an expectation of a diagnostic, which it then consumes; but it goes on to apply the suggested fix of the specified kind and assert (like a @rename marker) that the files were edited correctly. Porting the existing test cases (and adding suggestedfixerr) will be done in a follow-up. Also: - define an OnApplyEdit client hook that intercepts server downcalls. The marker test uses this to capture edits that occur as a side effect of an RPC (such as the ExecuteCommand of a suggestedfix) rather than the result of an RPC (such as rename). The existing main regtest runner does not use the hook. (Can we avoid this subtlety?) - fix two latent "loopclosure" bugs Change-Id: I5b352f8108f630b4be46aa1d25fd9a88938448ad Reviewed-on: https://go-review.googlesource.com/c/tools/+/470677 Reviewed-by: Robert Findley <[email protected]> Run-TryBot: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]>
- Loading branch information
Showing
13 changed files
with
232 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.