From 41c411d754ee62e7bc97a2306dab0b6d024a80e6 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Thu, 1 Oct 2020 09:22:31 -0400 Subject: [PATCH] internal/lsp/testdata: remove diagnostic from percent package The percent package has an invalid import path and a disallowed character in a source file. In CL 258298, I am changing cmd/go to diagnose invalid import paths during loading (instead of during missing-import resolution), and as a result 'go list' will no longer attempt to load or enumerate the source files for that package. It is important that gopls and 'go list' not crash when attempting to load a package with an invalid path, but gopls should not assume that 'go list' will produce anything more than an error for it. For golang/go#37438 For golang/go#41576 Change-Id: I8af8896ea7108f1588e0085ddc1bf1b9ff55d5b9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/258717 Trust: Bryan C. Mills Run-TryBot: Bryan C. Mills gopls-CI: kokoro TryBot-Result: Go Bot Reviewed-by: Heschi Kreinick --- internal/lsp/testdata/%percent/perc%ent.go | 7 ------- internal/lsp/testdata/summary.txt.golden | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/lsp/testdata/%percent/perc%ent.go b/internal/lsp/testdata/%percent/perc%ent.go index 4fe88d00ead..93b5e5570bb 100644 --- a/internal/lsp/testdata/%percent/perc%ent.go +++ b/internal/lsp/testdata/%percent/perc%ent.go @@ -1,8 +1 @@ package percent - -import ( -) - -func _() { - var x int //@diag("x", "compiler", "x declared but not used", "error") -} \ No newline at end of file diff --git a/internal/lsp/testdata/summary.txt.golden b/internal/lsp/testdata/summary.txt.golden index 59d58c4cbf6..d302acf9b48 100644 --- a/internal/lsp/testdata/summary.txt.golden +++ b/internal/lsp/testdata/summary.txt.golden @@ -8,7 +8,7 @@ DeepCompletionsCount = 5 FuzzyCompletionsCount = 8 RankedCompletionsCount = 157 CaseSensitiveCompletionsCount = 4 -DiagnosticsCount = 44 +DiagnosticsCount = 43 FoldingRangesCount = 2 FormatCount = 6 ImportCount = 8