Skip to content

Commit

Permalink
internal/lsp/testdata: remove diagnostic from percent package
Browse files Browse the repository at this point in the history
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 <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
  • Loading branch information
Bryan C. Mills committed Oct 1, 2020
1 parent 77e61d3 commit 41c411d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions 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")
}
2 changes: 1 addition & 1 deletion internal/lsp/testdata/summary.txt.golden
Expand Up @@ -8,7 +8,7 @@ DeepCompletionsCount = 5
FuzzyCompletionsCount = 8
RankedCompletionsCount = 157
CaseSensitiveCompletionsCount = 4
DiagnosticsCount = 44
DiagnosticsCount = 43
FoldingRangesCount = 2
FormatCount = 6
ImportCount = 8
Expand Down

0 comments on commit 41c411d

Please sign in to comment.