diff --git a/fmts/go.go b/fmts/go.go index 7b66c74..cf9aca2 100644 --- a/fmts/go.go +++ b/fmts/go.go @@ -16,6 +16,7 @@ func init() { register(&Fmt{ Name: "govet", Errorformat: []string{ + `%f:%l:%c: %m`, `%f:%l: %m`, `%-G%.%#`, }, diff --git a/fmts/testdata/govet.in b/fmts/testdata/govet.in index d87f84f..e88588e 100644 --- a/fmts/testdata/govet.in +++ b/fmts/testdata/govet.in @@ -3,4 +3,5 @@ buildtag.go:12: +build comment must appear before package clause and be followed assign.go:15: self-assignment of x to x assign.go:17: self-assignment of s.x to s.x atomic.go:17: direct assignment to atomic value +./main.go:7:2: fmt.Printf format %s has arg x of wrong type int exit status 1 diff --git a/fmts/testdata/govet.ok b/fmts/testdata/govet.ok index 7cd8743..0fd4ca1 100644 --- a/fmts/testdata/govet.ok +++ b/fmts/testdata/govet.ok @@ -3,3 +3,4 @@ buildtag.go|12| +build comment must appear before package clause and be followed assign.go|15| self-assignment of x to x assign.go|17| self-assignment of s.x to s.x atomic.go|17| direct assignment to atomic value +./main.go|7 col 2| fmt.Printf format %s has arg x of wrong type int