1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:24:40 -07:00
go/internal/lsp/testdata/format/bad_format.go.golden
Rebecca Stambler 747b8b11d4 internal/lsp: refactor error handling code in type-checking
This change adds a source.Error type which is used to collect the error
information that comes out of the loading, parsing, and type checking
stages. We also add specific sources per-error, rather than having them
all be labeled as "LSP".

This change will enable follow-ups that do a better job of extracting
error ranges.

Change-Id: I3fbb5e42d66aa2c5bb1b2f41d1eadfc45f3a749b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/202298
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-10-21 18:57:46 +00:00

22 lines
234 B
Plaintext

-- gofmt --
package format //@format("package")
import (
"fmt"
"log"
"runtime"
)
func hello() {
var x int //@diag("x", "compiler", "x declared but not used")
}
func hi() {
runtime.GOROOT()
fmt.Printf("")
log.Printf("")
}