1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:04:46 -07:00
go/internal/lsp
Rebecca Stambler f87c222f14 internal/lsp: fix and add tests for formatting
The go/format.Node function fails silently on malformed ASTs, even
though it writes out an invalid tree containing the strings "BadExpr"
and "BadStmt". We fix this by checking for *ast.Bad{Expr,Decl,Stmt}
before running the function. Ultimately, this should be fixed upstream
and just return an error from format.Node.

Change-Id: I2ba25551f0e97c0321d8e757de67360af44044d7
Reviewed-on: https://go-review.googlesource.com/c/149613
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2018-11-15 19:42:43 +00:00
..
protocol internal/jsonrpc2: change to a more synchronous dispatch model 2018-11-14 19:09:51 +00:00
source internal/lsp: fix and add tests for formatting 2018-11-15 19:42:43 +00:00
testdata internal/lsp: fix and add tests for formatting 2018-11-15 19:42:43 +00:00
completion.go internal/lsp: add a preliminary test for completion 2018-11-12 19:56:38 +00:00
diagnostics.go internal/lsp: move diagnostics logic to source directory 2018-11-12 22:54:56 +00:00
lsp_test.go internal/lsp: fix and add tests for formatting 2018-11-15 19:42:43 +00:00
position.go internal/lsp: make format work on the ast not the source 2018-11-12 21:02:38 +00:00
server.go internal/lsp: fix and add tests for formatting 2018-11-15 19:42:43 +00:00
signature_help.go internal/lsp: implement signature help 2018-11-13 20:09:34 +00:00