]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] cmd/cover: error out if a requested source file contains...
authorBryan C. Mills <bcmills@google.com>
Mon, 15 May 2023 15:49:56 +0000 (11:49 -0400)
committerMichael Pratt <mpratt@google.com>
Tue, 13 Jun 2023 19:59:51 +0000 (19:59 +0000)
commit6d44c158a2accb4bf23e48ad7906f7cfccd8b5b3
tree3ed44a22933266cb202d82c8b3eafe22cf2a3bdf
parent516ef2da14ac166984f0945df88b2bb3676a5064
[release-branch.go1.19] cmd/cover: error out if a requested source file contains a newline

cmd/cover uses '//line' directives to map instrumented source files
back to the original source file and line numbers.
Line directives have no way to escape newline characters, so cmd/cover
must not be used with source file paths that contain such characters.

Updates #60515.
Updates #60167.

Change-Id: I6dc039392d59fc3a5a6121ef6ca97b0ab0da5288
Reviewed-on: https://go-review.googlesource.com/c/go/+/501577
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 3d78c735fc7d213e23383b9744297bd5251dc0e3)
Reviewed-on: https://go-review.googlesource.com/c/go/+/501822
src/cmd/cover/cover.go
src/cmd/cover/cover_test.go