<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/cmd/cover, branch dev.debug</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/'/>
<entry>
<title>cmd/cover: take default value of total only once.</title>
<updated>2017-06-02T17:59:12+00:00</updated>
<author>
<name>Dhananjay Nakrani</name>
<email>dhananjaynakrani@gmail.com</email>
</author>
<published>2017-05-28T16:09:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=c82a6307f4ad5bc211bfd387dcd38602599eeb63'/>
<id>c82a6307f4ad5bc211bfd387dcd38602599eeb63</id>
<content type='text'>
Defaulting total to 1 for each function, adds up to the
counting error. testing/cover.go already does this once.

Fixes #20515

Change-Id: I0e3f524c2ccb628eb9a8f0a1f81c22365c24cf9a
Reviewed-on: https://go-review.googlesource.com/44337
Run-TryBot: Dhananjay Nakrani &lt;dhananjayn@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Defaulting total to 1 for each function, adds up to the
counting error. testing/cover.go already does this once.

Fixes #20515

Change-Id: I0e3f524c2ccb628eb9a8f0a1f81c22365c24cf9a
Reviewed-on: https://go-review.googlesource.com/44337
Run-TryBot: Dhananjay Nakrani &lt;dhananjayn@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: fix spelling mistake</title>
<updated>2016-12-20T04:45:25+00:00</updated>
<author>
<name>Kevin Burke</name>
<email>kev@inburke.com</email>
</author>
<published>2016-12-20T04:27:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=4d02833c2e79ee8dce06e108e1ae7a8e62611f1f'/>
<id>4d02833c2e79ee8dce06e108e1ae7a8e62611f1f</id>
<content type='text'>
Change-Id: Iac7c4f22dc55c970940af33e0f0470694da5c4a6
Reviewed-on: https://go-review.googlesource.com/34654
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Iac7c4f22dc55c970940af33e0f0470694da5c4a6
Reviewed-on: https://go-review.googlesource.com/34654
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: retain un-attached compiler directives</title>
<updated>2016-12-20T01:31:42+00:00</updated>
<author>
<name>Dhananjay Nakrani</name>
<email>dhananjaynakrani@gmail.com</email>
</author>
<published>2016-12-19T03:25:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=7eee5127735ab9b3cd1f231c5f0dcf7d1e5dd9fd'/>
<id>7eee5127735ab9b3cd1f231c5f0dcf7d1e5dd9fd</id>
<content type='text'>
Parser doesn't attach some compiler directives to anything in the tree.
We have to explicitely retain them in the generated code. This change,
makes cover explicitely print out any compiler directive that wasn't
handled in the ast.Visitor.

Fixes #18285.

Change-Id: Ib60f253815e92d7fc85051a7f663a61116e40a91
Reviewed-on: https://go-review.googlesource.com/34563
Run-TryBot: Rob Pike &lt;r@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Parser doesn't attach some compiler directives to anything in the tree.
We have to explicitely retain them in the generated code. This change,
makes cover explicitely print out any compiler directive that wasn't
handled in the ast.Visitor.

Fixes #18285.

Change-Id: Ib60f253815e92d7fc85051a7f663a61116e40a91
Reviewed-on: https://go-review.googlesource.com/34563
Run-TryBot: Rob Pike &lt;r@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: handle multiple samples from the same location</title>
<updated>2016-11-18T20:44:52+00:00</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2016-06-06T23:58:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=f39050c8ebf894ccedc0b99de96f7412be97af89'/>
<id>f39050c8ebf894ccedc0b99de96f7412be97af89</id>
<content type='text'>
So we can merge cover profiles from multiple runs.

Change-Id: I1bf921e2b02063a2a62b35d21a6823062d10e5d0
Reviewed-on: https://go-review.googlesource.com/23831
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So we can merge cover profiles from multiple runs.

Change-Id: I1bf921e2b02063a2a62b35d21a6823062d10e5d0
Reviewed-on: https://go-review.googlesource.com/23831
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: don't ignore os.Create error</title>
<updated>2016-11-17T00:10:10+00:00</updated>
<author>
<name>Daniel Martí</name>
<email>mvdan@mvdan.cc</email>
</author>
<published>2016-11-16T22:39:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=14e9f4825bffd4339dbde43198ed1710a1e149b5'/>
<id>14e9f4825bffd4339dbde43198ed1710a1e149b5</id>
<content type='text'>
Failing to create the output file would give confusing errors such as:

	cover: invalid argument

Also do out.Close() even if Execute() errored.

Fixes #17951.

Change-Id: I897e1d31f7996871c54fde7cb09614cafbf6c3fc
Reviewed-on: https://go-review.googlesource.com/33278
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Failing to create the output file would give confusing errors such as:

	cover: invalid argument

Also do out.Close() even if Execute() errored.

Fixes #17951.

Change-Id: I897e1d31f7996871c54fde7cb09614cafbf6c3fc
Reviewed-on: https://go-review.googlesource.com/33278
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: change covered block for switch/select case to exclude expression</title>
<updated>2016-11-03T16:13:06+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2016-11-03T00:18:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=a4a4d43028ba20ecec50ef761012d17800553cde'/>
<id>a4a4d43028ba20ecec50ef761012d17800553cde</id>
<content type='text'>
Consider a switch like

	switch x {
	case foo:
		f()
		g()
	}

Before, the coverage annotation for the block calling f and g included
in its position span the text for 'case foo:'. This looks nice in the coverage
report, but it breaks the invariant that coverage blocks are disjoint if
you have a more complex expression like:

	switch x {
	case func() int { return foo }():
		f()
		g()
	}

Then the coverage analysis wants to annotate the func literal body,
which overlaps with the case body, because the case body is considered
to begin at the case token.

Change the annotation for a case body to start just after the colon of
the case clause, avoiding any potential conflict with complex case
expressions. Could have started at the colon instead, but it seemed
less weird to start just after it.

Fixes #16540.

Change-Id: I1fec4bc2a53c7092e649dc0d4be1680a697cb79b
Reviewed-on: https://go-review.googlesource.com/32612
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Andrew Gerrand &lt;adg@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consider a switch like

	switch x {
	case foo:
		f()
		g()
	}

Before, the coverage annotation for the block calling f and g included
in its position span the text for 'case foo:'. This looks nice in the coverage
report, but it breaks the invariant that coverage blocks are disjoint if
you have a more complex expression like:

	switch x {
	case func() int { return foo }():
		f()
		g()
	}

Then the coverage analysis wants to annotate the func literal body,
which overlaps with the case body, because the case body is considered
to begin at the case token.

Change the annotation for a case body to start just after the colon of
the case clause, avoiding any potential conflict with complex case
expressions. Could have started at the colon instead, but it seemed
less weird to start just after it.

Fixes #16540.

Change-Id: I1fec4bc2a53c7092e649dc0d4be1680a697cb79b
Reviewed-on: https://go-review.googlesource.com/32612
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Andrew Gerrand &lt;adg@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: handle gotos</title>
<updated>2016-10-14T23:38:29+00:00</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2016-10-13T02:51:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=be48aa3f3a16006ab31c424487af352ca374afed'/>
<id>be48aa3f3a16006ab31c424487af352ca374afed</id>
<content type='text'>
If a labeled statement is the target of a goto, we must treat it as the
boundary of a new basic block, but only if it is not already the boundary
of a basic block such as a labeled for loop.

Fixes #16624

Now reports 100% coverage for the test in the issue.

Change-Id: If118bb6ff53a96c738e169d92c03cb3ce97bad0e
Reviewed-on: https://go-review.googlesource.com/30977
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a labeled statement is the target of a goto, we must treat it as the
boundary of a new basic block, but only if it is not already the boundary
of a basic block such as a labeled for loop.

Fixes #16624

Now reports 100% coverage for the test in the issue.

Change-Id: If118bb6ff53a96c738e169d92c03cb3ce97bad0e
Reviewed-on: https://go-review.googlesource.com/30977
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: fix typo</title>
<updated>2016-10-04T22:45:59+00:00</updated>
<author>
<name>Kevin Burke</name>
<email>kev@inburke.com</email>
</author>
<published>2016-10-04T22:38:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=44009a24138b6c7b5fd5b4be113db44fdfd1678e'/>
<id>44009a24138b6c7b5fd5b4be113db44fdfd1678e</id>
<content type='text'>
Change-Id: I3f13488605ab62eba5d3c59d5e9df1bcf69dd571
Reviewed-on: https://go-review.googlesource.com/30355
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I3f13488605ab62eba5d3c59d5e9df1bcf69dd571
Reviewed-on: https://go-review.googlesource.com/30355
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/cover: Fix compiler directives handling.</title>
<updated>2016-10-04T16:40:40+00:00</updated>
<author>
<name>Dhananjay Nakrani</name>
<email>dhananjayn@google.com</email>
</author>
<published>2016-10-02T01:01:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=f0636bf6f97478aca313052a9661828d01357d75'/>
<id>f0636bf6f97478aca313052a9661828d01357d75</id>
<content type='text'>
Currently, it separates comments from rest of the AST. This causes problems when
long counter increment statements are added before compiler directives.
See Issue #17315.

This change moves comments handling into AST Visitor so that when printer prints
code from AST, position of compiler directives relative to the associated function
is preserved.

Tested with https://gist.github.com/dhananjay92/837df6bc1f171b1350f85d7a7d59ca1e
and unit test.

Fixes #17315

Change-Id: I61a80332fc1923de6fc59ff63b953671598071fa
Reviewed-on: https://go-review.googlesource.com/30161
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, it separates comments from rest of the AST. This causes problems when
long counter increment statements are added before compiler directives.
See Issue #17315.

This change moves comments handling into AST Visitor so that when printer prints
code from AST, position of compiler directives relative to the associated function
is preserved.

Tested with https://gist.github.com/dhananjay92/837df6bc1f171b1350f85d7a7d59ca1e
and unit test.

Fixes #17315

Change-Id: I61a80332fc1923de6fc59ff63b953671598071fa
Reviewed-on: https://go-review.googlesource.com/30161
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: add internal/browser package</title>
<updated>2016-09-14T18:26:33+00:00</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josharian@gmail.com</email>
</author>
<published>2016-09-14T18:16:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=33ed35647520f2162c2fed1b0e5f19cec2c65de3'/>
<id>33ed35647520f2162c2fed1b0e5f19cec2c65de3</id>
<content type='text'>
cmd/cover, cmd/trace, and cmd/pprof all open browsers.
'go bug' will soon also open a browser.
It is time to unify the browser-handling code.

Change-Id: Iee6b443e21e938aeaaac366a1aefb1afbc7d9b2c
Reviewed-on: https://go-review.googlesource.com/29160
Run-TryBot: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cmd/cover, cmd/trace, and cmd/pprof all open browsers.
'go bug' will soon also open a browser.
It is time to unify the browser-handling code.

Change-Id: Iee6b443e21e938aeaaac366a1aefb1afbc7d9b2c
Reviewed-on: https://go-review.googlesource.com/29160
Run-TryBot: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
