1
0
mirror of https://github.com/golang/go synced 2024-09-30 14:28:33 -06:00
go/internal
Rebecca Stambler e31b568ad1 internal/lsp: plumb fillstruct through analysis
Now that fillstruct is an analyzer, we can simplify the code that calls
it in code_action.go. We introduce a new class of analyzer --
convenience analyzers, which are closer to commands. These represent
suggestions that won't necessarily improve the quality or correctness of
your code, but they offer small helper functions for the user.

This CL also combines the refactor rewrite tests with the suggested fix
tests, since they are effectively the same.

For now, we only support convenience analyzers when a code action was
requested on the same line as the fix. I'm not sure how to otherwise
handle this without bothering the user with unnecessary diagnostics.

Change-Id: I7f0aa198b5ee9964a907d709bae6380093d4ef21
Reviewed-on: https://go-review.googlesource.com/c/tools/+/237687
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-15 21:22:08 +00:00
..
analysisinternal internal/lsp: add goreturns like functionality as quickfix 2020-04-01 19:27:44 +00:00
apidiff all: fix more typos 2019-09-11 15:13:14 +00:00
event internal/event: improve the logging of events 2020-05-11 17:49:55 +00:00
fakenet internal/fakenet: add a fake network connection 2020-05-27 14:27:59 +00:00
fastwalk internal/fastwalk: attempt Symlink tests on Windows 2020-05-21 21:19:27 +00:00
gocommand cmd/godoc: support automatic vendoring 2020-06-09 06:04:08 +00:00
gopathwalk internal: rationalize debug logging 2020-03-03 16:59:18 +00:00
imports internal/imports: continue past parse errors 2020-06-12 22:08:49 +00:00
jsonrpc2 internal/jsonrpc2: try to suppress unnecessary errors on shutdown 2020-06-11 19:17:06 +00:00
lsp internal/lsp: plumb fillstruct through analysis 2020-06-15 21:22:08 +00:00
memoize internal/lsp/debug: show per-package memory usage 2020-06-12 20:10:52 +00:00
packagesinternal go/packages: move TypecheckCgo to packagesinternal 2020-06-10 22:20:39 +00:00
proxydir all: remove version-specific test files 2020-05-28 17:13:50 +00:00
span internal/span: handle URI escaping better 2020-02-18 20:59:02 +00:00
stack internal/stack: add the leak test 2020-05-27 14:25:42 +00:00
testenv internal/testenv: add a NeedsGoBuild function 2020-06-10 16:09:22 +00:00
tool internal/tool: avoid editorialization 2020-03-05 14:01:59 +00:00
typesinternal go/packages: use go115UsesCgo instead of UsesCgo 2020-06-10 21:22:23 +00:00
xcontext internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00