go/internal/lsp/analysis/unusedparams
Suzy Mueller 9ff864874f internal/lsp: add support for extracting non-nested returns
If there is a return statement that is guaranteed to execute in
the selection to extract to function, then the result of calling
the extracted function can be directly returned.

Updates golang/go#37170

Change-Id: I6454e4107d670e4a1bc9048b2e1073fc80fc78ab
Reviewed-on: https://go-review.googlesource.com/c/tools/+/312469
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-04-27 20:37:52 +00:00
..
testdata/src/a internal/lsp/analysis: add pass for unused parameters 2020-03-26 20:36:28 +00:00
unusedparams.go internal/lsp: add support for extracting non-nested returns 2021-04-27 20:37:52 +00:00
unusedparams_test.go internal/lsp/analysis: add pass for unused parameters 2020-03-26 20:36:28 +00:00