go/internal/lsp/source
Rebecca Stambler ffc207509a internal/lsp: fix nil pointer in hover when (types.Object).Pkg() is nil
We haven't been able to reproduce this scenario, but it may be possible
when the user is in a broken state. Avoid panicking by gating every
use of obj.Pkg() with nil checks.

Fixes golang/go#44300

Change-Id: Ia0c56a7fd5d6b89795dded1efdf05838f3de8209
Reviewed-on: https://go-review.googlesource.com/c/tools/+/292671
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-02-16 20:53:32 +00:00
..
completion internal/lsp/completion: fix untyped int type inference 2021-02-05 20:20:24 +00:00
api_json.go internal/lsp/command: stub out the ListKnownPackages and AddImport commands 2021-02-11 00:57:35 +00:00
call_hierarchy.go internal/lsp/source: return all field funcs from outgoing callhierarchy 2021-01-05 17:25:16 +00:00
code_lens.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
comment.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
comment_test.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
diagnostics.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
extract.go internal/lsp: eliminate funcs from commands, and refactor 2021-02-09 22:07:08 +00:00
fix.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
folding_range.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
format.go internal/lsp, gopls: recover from go-diff panics 2020-12-17 16:56:54 +00:00
format_test.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
gc_annotations.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
highlight.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
hover.go internal/lsp: fix nil pointer in hover when (types.Object).Pkg() is nil 2021-02-16 20:53:32 +00:00
identifier.go internal/lsp: handle nil pointer with import shortcut = link 2021-02-16 20:35:08 +00:00
identifier_test.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
implementation.go internal/lsp/source: move completion to its own package 2020-09-08 19:19:08 +00:00
options.go gopls/doc: add argument documentation for commands 2021-02-09 22:09:55 +00:00
options_test.go internal/lsp: restructure user options (CL 278433 continued) 2020-12-30 21:54:22 +00:00
references.go internal/lsp/source: rename uses of embedded fields 2021-01-12 21:27:35 +00:00
rename.go internal/lsp/source: make it an error to rename embedded fields 2021-01-26 13:52:46 +00:00
rename_check.go internal/lsp: remove the source.Error type 2021-02-02 20:40:51 +00:00
signature_help.go internal/lsp/source: respect user's hover kind in signature help 2020-10-29 22:52:41 +00:00
source_test.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
symbols.go internal/lsp: don't show blank identifiers in outline 2020-10-09 01:09:51 +00:00
types_format.go internal/lsp/source: fix default param name generation 2020-12-07 19:19:02 +00:00
util.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
view.go internal/lsp: apply go.mod/sum changes via workspace edits 2021-02-11 05:13:29 +00:00
workspace_symbol.go internal/lsp/source: simplify workspace symbol package collection 2020-12-07 18:57:54 +00:00
workspace_symbol_test.go internal/lsp/source: support some fzf-like tokens in symbol matching 2020-09-08 16:35:05 +00:00