1
0
mirror of https://github.com/golang/go synced 2024-10-01 07:28:35 -06:00
go/internal/lsp
Edward Muller 26e35f15ed internal/lsp/cache: fix leaking wg.Done() and <-ioLimit
There were several returns in this function that could leak both the
wg.Done() and <-ioLimit. This refactors them into defers close to their
counterparts.

Additionally I refactored the function to favor early returns over
nested if statements.

Fixes golang/go#32368

Change-Id: I5357d11ee526c1cb7a6bd1a0f652c61d574c10ab
GitHub-Last-Rev: bfa160b9fd75c4464d2e0a2820c04ddae01de21f
GitHub-Pull-Request: golang/tools#107
Reviewed-on: https://go-review.googlesource.com/c/tools/+/179878
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Ian Cottrell <iancottrell@google.com>
2019-05-31 22:35:38 +00:00
..
browser internal/lsp: add version and bug commands 2019-05-11 04:16:02 +00:00
cache internal/lsp/cache: fix leaking wg.Done() and <-ioLimit 2019-05-31 22:35:38 +00:00
cmd internal/lsp: add debug page serving 2019-05-30 00:16:15 +00:00
debug internal/lsp: add debug page serving 2019-05-30 00:16:15 +00:00
diff internal/lsp: normalise and make public diff<->edit conversions 2019-04-15 20:31:36 +00:00
protocol internal/lsp: send void client response to client/registerCapapbility 2019-05-30 18:43:49 +00:00
snippet internal/lsp: introduce snippet builder object 2019-04-25 18:37:29 +00:00
source go/analysis: add an End field to Diagnostic 2019-05-30 17:14:27 +00:00
testdata internal/lsp: fix completion insertion 2019-05-17 18:32:58 +00:00
tests internal/lsp: fix completion insertion 2019-05-17 18:32:58 +00:00
xlog internal/lsp: add the ability to log back to the client 2019-04-01 16:22:08 +00:00
code_action.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
completion.go internal/lsp: fix completion insertion 2019-05-17 18:32:58 +00:00
definition.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
diagnostics.go internal/lsp: add modfile, sumfile structs, require Go files for diagnostics 2019-05-24 21:02:28 +00:00
format.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
general.go internal/lsp: build the packages config on demand from proper configuration 2019-05-21 17:12:43 +00:00
highlight.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
hover.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
info.1.11.go internal/lsp: log when we fail to type-check a package 2019-05-21 15:28:58 +00:00
info.go internal/lsp: add version and bug commands 2019-05-11 04:16:02 +00:00
link.go internal/lsp: build the packages config on demand from proper configuration 2019-05-21 17:12:43 +00:00
lsp_test.go internal/lsp: fix setting overlays in tests 2019-05-29 19:11:38 +00:00
reset_golden.sh internal/lsp: fix definition tests to use golden files 2019-05-10 21:06:55 +00:00
server.go internal/lsp: remove SelectionRange and textDocument/selectionRange 2019-05-24 12:55:31 +00:00
signature_help.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
symbols.go internal/lsp: add structured layers to the cache 2019-05-16 21:30:38 +00:00
text_synchronization.go internal/lsp: add a file system abstraction 2019-05-24 13:48:47 +00:00
util.go internal/lsp: fix setting overlays in tests 2019-05-29 19:11:38 +00:00
workspace.go internal/lsp: build the packages config on demand from proper configuration 2019-05-21 17:12:43 +00:00