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
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
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
extract_redefine.go.golden
extract_return_basic.go
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
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
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
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
extract_scope.go.golden
extract_smart_initialization.go
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
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
extract_unnecessary_param.go.golden internal/lsp: print comments that would be lost during extract func 2021-04-28 01:46:37 +00:00