]> Cypherpunks repositories - gostls13.git/commitdiff
test: skip "# package/path" output from cmd/go in errchk
authorRuss Cox <rsc@golang.org>
Wed, 13 Dec 2017 19:38:58 +0000 (14:38 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 13 Dec 2017 21:32:01 +0000 (21:32 +0000)
This allows errchk to be used with "go vet" output (as opposed to "go tool vet").

Change-Id: I0009a53c9cb74accd5bd3923c137d6dbf9e46326
Reviewed-on: https://go-review.googlesource.com/83836
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
test/errchk

index bc8ef19cb0bd831e8d1b6cde02cb4993b3097c5a..1cb57bb961c4181eca7f0689a98177327fd73d31 100755 (executable)
@@ -65,6 +65,9 @@ $out = join('', <CMD>);
 
 close CMD;
 
+# Remove lines beginning with #, printed by go command to indicate package.
+@out = grep {!/^#/} @out;
+
 if($exitcode != 0 && $? == 0) {
        print STDERR "BUG: errchk: command succeeded unexpectedly\n";
        print STDERR @out;