cmd/vet: keep processing files after warning

This lets go vet produce useful results for syscall on darwin/amd64,
otherwise it gets caught on asm.s.

Change-Id: I3daa49cf61eeada52eb9d4e94e40c4d21d1d5b2d
Reviewed-on: https://go-review.googlesource.com/2741
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
David Crawshaw 2015-01-13 11:00:57 -05:00
parent 47f2109c64
commit e0ba1bf74c
1 changed files with 2 additions and 1 deletions

View File

@ -110,6 +110,7 @@ func asmCheck(pkg *Package) {
} }
} }
Files:
for _, f := range pkg.files { for _, f := range pkg.files {
if !strings.HasSuffix(f.name, ".s") { if !strings.HasSuffix(f.name, ".s") {
continue continue
@ -173,7 +174,7 @@ func asmCheck(pkg *Package) {
flushRet() flushRet()
if arch == "" { if arch == "" {
f.Warnf(token.NoPos, "%s: cannot determine architecture for assembly file", f.name) f.Warnf(token.NoPos, "%s: cannot determine architecture for assembly file", f.name)
return continue Files
} }
fnName = m[1] fnName = m[1]
fn = knownFunc[m[1]][arch] fn = knownFunc[m[1]][arch]