]> Cypherpunks repositories - gostls13.git/commit
cmd/cover: add //line comment pointing to original file
authorRuss Cox <rsc@golang.org>
Fri, 10 Nov 2017 04:55:15 +0000 (23:55 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 16 Nov 2017 01:41:30 +0000 (01:41 +0000)
commit2a39d1e96a8d37d14ff23a2eb3ffc5b584a17cb6
tree9edc1d05082563a1d89a6a305065a07b56223c03
parenta8474c799f82c543379ef4a355dc7b5be785d8d8
cmd/cover: add //line comment pointing to original file

Now that cover does not modify the formatting of the original file
or add any newline characters, we can make it print a //line comment
pointing back at the original, and compiler errors and panics will
report accurate line numbers.

Fixes #6329.
Fixes #15757.

Change-Id: I7b0e386112c69beafe69e0d47c5f9e9abc87c0f5
Reviewed-on: https://go-review.googlesource.com/77151
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/cover/cover.go
src/cmd/go/go_test.go
src/cmd/go/testdata/src/coverbad/p.go [new file with mode: 0644]
src/cmd/go/testdata/src/coverbad/p_test.go [new file with mode: 0644]