1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:44:39 -07:00
go/internal/lsp/analysis
Rohan Challa 099440627f internal/lsp: add goreturns like functionality as quickfix
This change ports the functionality of https://github.com/sqs/goreturns
to be used as code actions on diagnostics that have missing
return values. It improves on the original goreturns functionality by:

- filling out empty return statements
- trying to match existing return values to the required return
  values and then filling in missing parameters

Fixes golang/go#37091

Change-Id: Ifaf9bf571c3bc3c61e672b0a2f725d8d734d432d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/224960
Run-TryBot: Rohan Challa <rohan@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-04-01 19:27:44 +00:00
..
fillreturns internal/lsp: add goreturns like functionality as quickfix 2020-04-01 19:27:44 +00:00
nonewvars internal/lsp/analysis: add quickfix for "no new vars on left side" 2020-03-27 19:15:53 +00:00
noresultvalues internal/lsp/analysis: add quickfix for "no result values expected" 2020-03-27 18:57:59 +00:00
simplifycompositelit internal/lsp/analysis: add simplify-composite-lit pass from "gofmt -s" 2020-03-26 20:50:12 +00:00
simplifyrange internal/lsp/analysis: add simplify-range pass from "gofmt -s" 2020-03-26 20:18:45 +00:00
simplifyslice internal/lsp/analysis: add simplify-slice pass from "gofmt -s" 2020-03-26 21:04:57 +00:00
undeclaredname internal/lsp/analysis: add quickfix for undeclared variable 2020-03-27 18:31:06 +00:00
unusedparams internal/lsp/analysis: add pass for unused parameters 2020-03-26 20:36:28 +00:00