Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cover: add PackageName to title of generated html #38609

Closed
odeke-em opened this issue Apr 23, 2020 · 1 comment
Closed

cmd/cover: add PackageName to title of generated html #38609

odeke-em opened this issue Apr 23, 2020 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@odeke-em
Copy link
Member

Coming here from CL https://go-review.googlesource.com/c/go/+/227547 in which we merged an update that added a blank title to each generated page as "Go Coverage Report".

This issue is to remind @robpike and myself about making the title even more contextual and more useful by adding the package name to the title.

@odeke-em odeke-em changed the title cmd/cover: add PackageName to title cmd/cover: add PackageName to title of generated html Apr 23, 2020
@gopherbot
Copy link

Change https://golang.org/cl/230517 mentions this issue: cmd/cover: include a package name in the HTML title

xujianhai666 pushed a commit to xujianhai666/go-1 that referenced this issue May 21, 2020
A recent change added a title to the HTML coverage report but
neglected to include the package name. Add the package name here.
It's a little trickier than you'd think because there may be multiple
packages and we don't want to parse the files, so we just extract
a directory name from the path of the first file.  This will almost
always be right, and has the advantage that it gives a better result
for package main. There are rare cases it will get wrong, but that
will be no hardship.

If this turns out not to be good enough, we can refine it.

Fixes golang#38609

Change-Id: I2201f6caef906e0b0258b90d7de518879041fe72
Reviewed-on: https://go-review.googlesource.com/c/go/+/230517
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Apr 30, 2021
@rsc rsc unassigned robpike Jun 23, 2022
@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 31, 2022
@dmitshur dmitshur added this to the Go1.15 milestone Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants