go/internal/lsp/testdata
Peter Weinbergr a2250d31f3 internal/lsp: add gopls semtok command and semantic token tests
The command 'gopls semtok <file>.go' produces a version of <file>.go
decorated with comments describing tokens as semantic tokens. The
format is described towards the top of cmd/semantictokens.go.

There are also tests in testdata/semantic/. a.go is used by lsp_test.go
(with -cover) to show that essentially all of semantic.go is executed.
b.go illustrates the handling of strange, but legal, constructs
like 'const false = nil and non-ascii'. The .golden files show
the expected results.

The implementation will panic, rather than log, on unexpected state.

gopls semtok has been run on all the .go files in x/tools and in
the source distribution. There were no unexpected messages nor panics.

Change-Id: I11715bcc8d6830d1951eb58239978c4a363bbc30
Reviewed-on: https://go-review.googlesource.com/c/tools/+/262198
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Peter Weinberger <pjw@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-10-16 18:10:36 +00:00
..
%percent internal/lsp/testdata: remove diagnostic from percent package 2020-10-01 18:36:08 +00:00
address internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
analyzer internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
anon internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
append internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
arraytype internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
assign internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
bad internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
badstmt internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
bar internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
basiclit internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
baz internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
builtins internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
callhierarchy internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
casesensitive internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
cast internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
cgo internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
cgoimport internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
channel internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
circular internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
codelens internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
comment_completion internal/lsp/source: refactor c.item to support deepSearch in all cases 2020-10-01 23:00:09 +00:00
complit internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
constant internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
danglingstmt internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
deep internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
errors internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
extract internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fieldlist internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fillstruct internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
folding internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
foo internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
format internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
func_rank internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
funcsig internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
funcvalue internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fuzzymatch internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
generate internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
generated internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
godef internal/lsp: add "type " to hover messages for structs/interfaces/etc 2020-10-09 01:01:41 +00:00
good internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
highlights internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
implementation internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
importedcomplit internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
imports internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
index internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
interfacerank internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
keywords internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
labels internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
links internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
maps internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
multireturn internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
nested_complit internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
nodisk internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
noparse internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
noparse_format internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
printf internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
rank internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
references internal/lsp/source: show references to interface methods 2020-10-06 22:15:05 +00:00
rename internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
selector internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
semantic internal/lsp: add gopls semtok command and semantic token tests 2020-10-16 18:10:36 +00:00
signature internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
snippets internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
statements internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
suggestedfix internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
symbols internal/lsp: don't show blank identifiers in outline 2020-10-09 01:09:51 +00:00
testy internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
typeassert internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
typeerrors internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
types internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
undeclared internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
unimported internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
unresolved internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
unsafe internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
variadic internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
workspacesymbol internal/lsp: don't show blank identifiers in outline 2020-10-09 01:09:51 +00:00
summary.txt.golden internal/lsp: add gopls semtok command and semantic token tests 2020-10-16 18:10:36 +00:00