Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12851)

Issue 127030043: code review 127030043: cmd/cover: show file coverage in HTML drop down (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by adg
Modified:
9 years, 8 months ago
Reviewers:
r
CC:
r, golang-codereviews
Visibility:
Public.

Description

cmd/cover: show file coverage in HTML drop down As requested on Stack Overflow: http://goo.gl/ams9fY (Kudos to sberry for his JavaScript solution, provided there. This change does the same thing on the server side.)

Patch Set 1 #

Total comments: 4

Patch Set 2 : diff -r 35238aaf7394bf99c2de5ab8450c7931c9790323 https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -5 lines) Patch
M cmd/cover/html.go View 1 4 chunks +24 lines, -5 lines 0 comments Download

Messages

Total messages: 3
adg
Hello r (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
9 years, 8 months ago (2014-08-11 01:12:36 UTC) #1
r
LGTM https://codereview.appspot.com/127030043/diff/1/cmd/cover/html.go File cmd/cover/html.go (right): https://codereview.appspot.com/127030043/diff/1/cmd/cover/html.go#newcode87 cmd/cover/html.go:87: func percentCovered(p *cover.Profile) float64 { // percentCovered returns, ...
9 years, 8 months ago (2014-08-11 17:49:40 UTC) #2
adg
9 years, 8 months ago (2014-08-11 23:22:23 UTC) #3
*** Submitted as
https://code.google.com/p/go/source/detail?r=860d696fb7c2&repo=tools ***

cmd/cover: show file coverage in HTML drop down

As requested on Stack Overflow: http://goo.gl/ams9fY
(Kudos to sberry for his JavaScript solution, provided there.
This change does the same thing on the server side.)

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/127030043

https://codereview.appspot.com/127030043/diff/1/cmd/cover/html.go
File cmd/cover/html.go (right):

https://codereview.appspot.com/127030043/diff/1/cmd/cover/html.go#newcode87
cmd/cover/html.go:87: func percentCovered(p *cover.Profile) float64 {
On 2014/08/11 17:49:40, r wrote:
> // percentCovered returns, as a percentage, the fraction of the statements in
> the profile
> // covered by the test run. In effect, it reports the coverage of a given
source
> file.

Done.

https://codereview.appspot.com/127030043/diff/1/cmd/cover/html.go#newcode98
cmd/cover/html.go:98: return float64(covered) / float64(total) * 100
On 2014/08/11 17:49:40, r wrote:
> this is the third place this calculation is done but i don't see a nice way to
> unify things

I came to the same conclusion.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b