]> Cypherpunks repositories - gostls13.git/commit
errchk: allow multiple patterns
authorRuss Cox <rsc@golang.org>
Tue, 16 Aug 2011 15:14:26 +0000 (11:14 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 16 Aug 2011 15:14:26 +0000 (11:14 -0400)
commita5d7c1f45e0b36a34462fd8ce10b869e7a12f246
tree5fe6922112e135cbb00c6ec24c4e321024f74de8
parent53573c02b8195a55f1c91c2df39e6f1c08cd33d5
errchk: allow multiple patterns

// ERROR "pattern1" "pattern2"

means that there has to be one or more
lines matching pattern1 and then excluding
those, there have to be one or more lines
matching pattern2.  So if you expect two
different error messages from a particular
line, writing two separate patterns checks
that both errors are produced.

Also, errchk now flags lines that produce
more errors than expected.  Before, as long as
at least one error matched the pattern, all the
others were ignored.

Revise tests to expect or silence these
additional errors.

R=lvd, r, iant
CC=golang-dev
https://golang.org/cl/4869044
16 files changed:
test/declbad.go
test/errchk
test/fixedbugs/bug205.go
test/fixedbugs/bug228.go
test/fixedbugs/bug229.go
test/fixedbugs/bug231.go
test/fixedbugs/bug297.go
test/fixedbugs/bug351.go
test/fixedbugs/bug359.go
test/import1.go
test/initializerr.go
test/interface/explicit.go
test/interface/pointer.go
test/nul1.go
test/rename1.go
test/shift1.go