diff --git a/src/cmd/vet/all/main.go b/src/cmd/vet/all/main.go index b4df4cc720..09167af6d5 100644 --- a/src/cmd/vet/all/main.go +++ b/src/cmd/vet/all/main.go @@ -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) {