Fixes #20839.
Change-Id: I125460c5da09b7fa0cf470ff5be436f8d650cde7
Reviewed-on: https://go-review.googlesource.com/47253
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
"go/build"
"go/types"
"internal/testenv"
+ "io"
"log"
"os"
"os/exec"
continue
}
+ if strings.HasPrefix(line, "panic: ") {
+ // Panic in vet. Don't filter anything, we want the complete output.
+ parseFailed = true
+ fmt.Fprintf(os.Stderr, "panic in vet (to reproduce: go run main.go -p %s):\n", p)
+ fmt.Fprintln(os.Stderr, line)
+ io.Copy(os.Stderr, stderr)
+ break
+ }
+
fields := strings.SplitN(line, ":", 3)
var file, lineno, msg string
switch len(fields) {