go/internal/lsp/testdata/extract/extract_function
Suzy Mueller 16b25d25b9 internal/lsp: print comments that would be lost during extract func
Due to the limitations of comments in ast, it is difficult to move
comments. The extract function feature currently does not handle
comments at all. This change instead prints the comments that would
have been lost above the call to the function, so that the user can
easily recover them. Otherwise, it was possible for users to lose
comments and not notice.

Updates golang/go#37170

Change-Id: I1e2d865f5deddefbb0417732490decbdfcde5f3d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/313211
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-04-28 01:46:37 +00:00
..
extract_args_returns.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_args_returns.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_basic.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_basic.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_basic_comment.go internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_basic_comment.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_issue_44813.go internal/lsp/source: skip blank identifiers during the function extraction 2021-03-29 19:56:10 +00:00
extract_issue_44813.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_redefine.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_redefine.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_return_basic.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_return_basic.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_return_basic_nonnested.go internal/lsp: add support for extracting non-nested returns 2021-04-27 20:37:52 +00:00
extract_return_basic_nonnested.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_return_complex.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_return_complex.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_return_complex_nonnested.go internal/lsp: add support for extracting non-nested returns 2021-04-27 20:37:52 +00:00
extract_return_complex_nonnested.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_return_func_lit.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_return_func_lit.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_return_func_lit_nonnested.go internal/lsp: add support for extracting non-nested returns 2021-04-27 20:37:52 +00:00
extract_return_func_lit_nonnested.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_return_init.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_return_init.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_return_init_nonnested.go internal/lsp: add support for extracting non-nested returns 2021-04-27 20:37:52 +00:00
extract_return_init_nonnested.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_scope.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_scope.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_smart_initialization.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_smart_initialization.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_smart_return.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_smart_return.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00
extract_unnecessary_param.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract_unnecessary_param.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00