1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:54:49 -07:00
go/internal/lsp
Kalman Bekesi 1e24073be8 tools/gopls: add command line support for suggestedfix
This adds support for calling suggestedfix from the gopls command line, e.g.

$ gopls suggestedfix ~/tmp/foo/main.go

Optional arguments are:
-w, which writes the changes back to the original file; and
-d, which prints a unified diff to stdout
With no arguments, the changed files are printed to stdout.

Wasn't sure if the command should be `suggestedfix` or just `fix` or `quickfix`?
Also this applies all changes to a file, does not allow for selective fixes.

Updates golang/go#32875

Change-Id: I8b75f9824be82974f6edb7c03383b4d56116943c
GitHub-Last-Rev: 070fcda33ac3494bfe8f19c2cd78c089c713ed98
GitHub-Pull-Request: golang/tools#174
Reviewed-on: https://go-review.googlesource.com/c/tools/+/202480
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-10-30 23:29:56 +00:00
..
browser
cache internal/lsp: do not close over the handle in the memoize function 2019-10-30 00:30:36 +00:00
cmd tools/gopls: add command line support for suggestedfix 2019-10-30 23:29:56 +00:00
debug internal/lsp: address staticcheck warnings 2019-10-04 02:16:23 +00:00
diff internal/lsp: fix unified diffs of edits at the end of a file 2019-10-11 16:38:14 +00:00
fuzzy internal/lsp: fix fuzzy matcher inconsistency 2019-10-22 21:05:28 +00:00
protocol internal/lsp: cancel early 2019-10-22 07:49:31 +00:00
snippet all: fix broken links to LSP specification 2019-10-02 18:32:53 +00:00
source internal/lsp: search candidate type's package for completions 2019-10-30 06:26:58 +00:00
telemetry
testdata internal/imports: sort import candidates by "relevance" 2019-10-30 22:54:52 +00:00
tests tools/gopls: add cmd support for references 2019-10-25 16:51:12 +00:00
code_action.go internal/lsp: remove analyzers from Analyze result 2019-10-25 02:35:17 +00:00
command.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
completion_test.go internal/lsp: disable completion time budget in tests 2019-10-25 16:51:05 +00:00
completion.go internal/lsp: fix VSCode's reordering of completion candidates 2019-10-24 16:29:03 +00:00
definition.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
diagnostics.go go/analysis, internal/lsp: add support for related information 2019-10-21 19:00:55 +00:00
folding_range.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
format.go internal/lsp: change to protocol.TextEdit for formatting 2019-09-06 17:54:09 +00:00
general.go internal/lsp: modify approach to watching changed files 2019-10-22 21:33:45 +00:00
highlight.go x/tools/gopls: convert to the august, 2019 version of the LSP protocol 2019-09-08 13:59:31 +00:00
hover.go internal/lsp: convert comments to markdown before sending to client 2019-10-04 18:35:38 +00:00
link.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
lsp_test.go tools/gopls: add cmd support for references 2019-10-25 16:51:12 +00:00
references.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
rename.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
reset_golden.sh internal/lsp: fix regeneration of golden files 2019-09-25 13:16:59 +00:00
server.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
signature_help.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
symbols.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
text_synchronization.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
watched_files.go internal/lsp: type check packages in parallel 2019-10-29 04:13:27 +00:00
workspace.go internal/lsp: merge session and view options into one 2019-09-11 19:36:49 +00:00