]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.20] 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)
committerGopher Robot <gobot@golang.org>
Tue, 20 Jun 2023 00:36:17 +0000 (00:36 +0000)
commit49594244d388401a2cec34ab22d28f4e66d46de1
treef7b6d4dd93857aa31f5d39f83bc9d2e0d52f43ef
parent471904821134ee52c289cc5b17630313d812c32a
[release-branch.go1.20] 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 #60516.
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/+/501818
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/cover/cover.go
src/cmd/cover/cover_test.go