go/internal/lsp/source
Iskander Sharipov ec14b29651 internal/lsp/source: fix all types in resolveInvalid
This CL teaches lsp to report `**T` instead of `**invalid type`,
`func (badParam) badResult` instead of `func (invalid type) invalid type`, etc.

To do that, we need to detect "invalid type" inside any part of a type.
I've added typeIsValid() function for that.

To simplify type formating code in resolveInvalid(), formatNode
function is added that can also format *ast.StarExpr (of any depth).
Since we already used AST printer in the same file, I
added formatNode function that is now used in both places.
While at it, replaced bytes.Buffer to strings.Builder there.

Change-Id: I3bb84c58c417b175cceefb410e238c48425f7cee
Reviewed-on: https://go-review.googlesource.com/c/tools/+/210357
Run-TryBot: Iskander Sharipov <quasilyte@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-12-11 23:00:51 +00:00
..
comment.go
comment_test.go
completion.go internal/lsp/source: fix all types in resolveInvalid 2019-12-11 23:00:51 +00:00
completion_format.go
completion_keywords.go internal/lsp: suggest "fallthrough" only inside switches 2019-12-10 22:10:49 +00:00
completion_labels.go
completion_literal.go
completion_snippet.go
deep_completion.go
diagnostics.go
errors.go
folding_range.go
format.go
highlight.go
hover.go
identifier.go internal/lsp: check all package variants in find-implementations 2019-12-11 21:44:05 +00:00
implementation.go internal/lsp: check all package variants in find-implementations 2019-12-11 21:44:05 +00:00
options.go
references.go
rename.go
rename_check.go
signature_help.go
source_test.go internal/lsp: check all package variants in find-implementations 2019-12-11 21:44:05 +00:00
suggested_fix.go
symbols.go
tidy.go
util.go internal/lsp/source: fix all types in resolveInvalid 2019-12-11 23:00:51 +00:00
view.go