mirror of
https://github.com/golang/go
synced 2024-11-23 15:30:05 -07:00
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: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
7e99ccb52b
commit
87c4a04b80
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user