Commit 87c4a04b authored by Robert Griesemer's avatar Robert Griesemer

cmd/vet/all: in case of vet panic, don't filter stacktrace

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 7e99ccb5
......@@ -17,6 +17,7 @@ import (
"go/build"
"go/types"
"internal/testenv"
"io"
"log"
"os"
"os/exec"
......@@ -227,6 +228,15 @@ NextLine:
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment