go/internal/lsp/analysis
Jean de Klerk 0e8b1ee181 gopls, internal/lsp: support fillstruct for partially-filled structs
This updates fillstruct to work even when the struct is partially
filled. User supplied fields are preserved but comments are blown away.

Preserving comments appears to be very hard with the current ast
library. One possible option is to do manual string shenanigans, but
after exploring that path it seems like A Bad Idea.

Fixes golang/go#39804

Change-Id: Iec0bb93db05d4d726dfa6c77a8139f53b14bcc77
Reviewed-on: https://go-review.googlesource.com/c/tools/+/262018
Run-TryBot: Jean de Klerk <deklerk@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Jean de Klerk <deklerk@google.com>
2020-11-30 20:22:45 +00:00
..
fillreturns internal/lsp/analysis: update fillreturns title 2020-09-08 15:52:18 +00:00
fillstruct gopls, internal/lsp: support fillstruct for partially-filled structs 2020-11-30 20:22:45 +00:00
nonewvars internal/lsp: add type error fixes to existing diagnostics 2020-04-08 01:45:16 +00:00
noresultvalues internal/lsp: add type error fixes to existing diagnostics 2020-04-08 01:45:16 +00:00
simplifycompositelit gopls: fix various staticcheck errors 2020-09-29 17:30:36 +00:00
simplifyrange internal/lsp: make sure that `gofmt -s` analyses don't modify AST 2020-04-06 21:01:14 +00:00
simplifyslice internal/lsp: make sure that `gofmt -s` analyses don't modify AST 2020-04-06 21:01:14 +00:00
undeclaredname internal/lsp: support refactor.extract through commands 2020-07-27 19:25:51 +00:00
unusedparams internal/lsp: move undeclaredname suggested fix out of analysis 2020-07-23 23:54:27 +00:00