1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:58:34 -06:00
go/internal/lsp/testdata
hartzell 5eefd052ad tools/gopls: add command line support for rename
This commit adds support for calling rename from the gopls command
line, e.g.

$ gopls rename -w ~/tmp/foo/main.go:8:6
$ gopls rename -w ~/tmp/foo/main.go:#53

Optional arguments are:

- -w, which writes the changes back to the original file; and
- -d, which prints a unified diff to stdout

With no arguments, the changed files are printed to stdout.

It:

- adds internal/lsp/cmd/rename.go, which implements the command;
- adds "rename" to the list of commands in internal/lsp/cmd/cmd.go;
- removes the dummy test from internal/lsp/cmd/cmd_test.go; and
- adds internal/lsp/cmd/rename_test.go, which uses the existing
  "golden" data to implement its tests.

Updates #32875

Change-Id: I5cab5a40b4aa26357b26b0caf4ed54dbd2284d0f
GitHub-Last-Rev: fe853d325ef91f8f911987790fcba7a5a777b6ce
GitHub-Pull-Request: golang/tools#157
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194878
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-20 22:57:31 +00:00
..
analyzer internal/lsp: fix badly formatted error messages from go vet 2019-04-16 19:41:54 +00:00
anon internal/lsp: add additional tests for completion 2018-12-19 22:27:14 +00:00
bad internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
badstmt internal/lsp: fix infinite recursion while fixing AST 2019-09-19 16:27:28 +00:00
bar internal/lsp: fix documentation for completion items 2019-08-12 17:13:29 +00:00
basiclit internal/lsp: suppress more completions in comments and literals 2019-04-24 20:52:08 +00:00
baz internal/lsp: suppress more completions in comments and literals 2019-04-24 20:52:08 +00:00
builtins internal/lsp: omit "iota" completion outside const decls 2019-09-15 20:16:06 +00:00
cast internal/lsp: add more testdata for completion and diagnostics 2018-11-20 06:06:34 +00:00
channel internal/lsp: apply type modifiers to completion candidate 2019-06-19 20:27:14 +00:00
comments internal/lsp: suppress more completions in comments and literals 2019-04-24 20:52:08 +00:00
complit internal/lsp/source: fixes completion for slice literals of pointers 2019-08-30 17:14:47 +00:00
constant internal/lsp: remove constant value from label and add tests 2019-05-15 19:19:14 +00:00
deepcomplete internal/lsp: reduce completion candidate volume 2019-09-17 02:23:53 +00:00
errors internal/lsp: match completions case-insensitively 2019-06-28 03:43:36 +00:00
folding internal/lsp: fold contained lines when lineFoldingOnly 2019-09-05 23:56:50 +00:00
foo internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
format internal/lsp: switch golden files to use txtar 2019-05-08 14:59:27 +00:00
func_rank internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
funcvalue internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
generated internal/lsp: show "do not edit" message when user opens generated file 2019-08-07 16:44:42 +00:00
godef internal/lsp: use the explicit import spec name as ident 2019-08-22 17:46:33 +00:00
good internal/lsp: add prepare rename support 2019-08-29 20:19:46 +00:00
highlights internal/lsp: add support for document highlight 2019-03-26 19:08:20 +00:00
importedcomplit internal/lsp: fix composite literal completion 2019-05-13 22:24:33 +00:00
imports internal/lsp: add some basic tests for imports 2019-06-03 23:13:51 +00:00
index internal/lsp: handle more expected type cases 2019-05-16 16:26:11 +00:00
interfacerank internal/lsp: apply type modifiers to completion candidate 2019-06-19 20:27:14 +00:00
links internal/lsp: add links search in comments and string literals 2019-07-12 18:53:41 +00:00
nested_complit internal/lsp: add literal completion candidates 2019-09-18 17:13:17 +00:00
nodisk internal/lsp/testdata: delete nodisk/newdisk_exists.go 2019-08-06 20:59:09 +00:00
noparse internal/lsp: connect basic analysis functionality 2019-02-06 21:48:25 +00:00
noparse_format internal/lsp: format files in packages with errors 2019-07-26 23:07:22 +00:00
rank internal/lsp: improve completion support for untyped constants 2019-07-03 16:30:32 +00:00
references internal/lsp: fix declarations in references 2019-09-05 03:51:44 +00:00
rename tools/gopls: add command line support for rename 2019-09-20 22:57:31 +00:00
selector internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
signature internal/lsp: hide signature help in function literals 2019-07-02 15:22:45 +00:00
snippets internal/lsp: support function literal completions 2019-09-18 23:49:17 +00:00
suggestedfix internal/lsp: enable suggested fixes by default 2019-09-09 19:40:07 +00:00
symbols internal/lsp: make interface methods children of the interface symbol 2019-04-24 02:46:01 +00:00
testy internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
typeassert internal/lsp: improve completion support for type assertions 2019-06-26 23:33:08 +00:00
types internal/lsp: add more testdata for completion and diagnostics 2018-11-20 06:06:34 +00:00
unimported internal/imports: add all interfaces in mkstdlib 2019-09-10 20:25:02 +00:00
unresolved internal/lsp: fix function value completions 2019-06-20 15:43:39 +00:00
unsafe internal/lsp: fix type checking for unsafe package 2019-06-11 19:41:53 +00:00