• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

t-yuki / gocover-cobertura / 24 / 1
83%
master: 83%

Build:
DEFAULT BRANCH: master
Ran 14 Feb 2018 06:21PM UTC
Files 2
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Feb 2018 06:20PM UTC coverage: 75.833% (-0.4%) from 76.25%
24.1

Pull #14

travis-ci

web-flow
Use testdata as-is without gen from template

While trying to run `gocover-cobertura` on `testdata/testdata_set.txt`, I noticed that
it's actually a Go template; not actual data; so the tool can't process
it. The template seems to be just to replace `{{.PkgPath}}` with the
current directory. By using `.` instead in that file, it eliminates the
need for a bunch of code for rendering the template (it eliminates
2 stdlib imports, not that it's a big deal)

Before:

```
$ gocover-cobertura < testdata/testdata_set.txt | head -n 18
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage line-rate="0" branch-rate="0" version="" timestamp="1518632283054" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0" complexity="0">
	<sources>
		<source>/usr/local/Cellar/go/1.10rc1/libexec/src</source>
		<source>/Users/abramowi/go/src</source>
	</sources>
	<packages></packages>
</coverage>
```

After:

```
$ gocover-cobertura < testdata/testdata_set.txt | head -n 18
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage line-rate="0" branch-rate="0" version="" timestamp="1518632265239" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0" complexity="0">
	<sources>
		<source>/usr/local/Cellar/go/1.10rc1/libexec/src</source>
		<source>/Users/abramowi/go/src</source>
	</sources>
	<packages>
		<package name="./testdata" line-rate="0" branch-rate="0" complexity="0">
			<classes>
				<class name="-" filename="./testdata/func1.go" line-rate="0" branch-rate="0" complexity="0">
					<methods>
						<method name="Func1" signature="" line-rate="0" branch-rate="0" complexity="0">
							<lines>
								<line number="4" hits="1"></line>
								<line number="5" hits="1"></line>
								<line number="5" hits="0"></line>
								<line number="6" hits="0"></line>
```
Pull Request #14: Use testdata as-is without gen from template

182 of 240 relevant lines covered (75.83%)

5.76 hits per line

Source Files on job 24.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24
  • Travis Job 24.1
  • 759e17a8 on github
  • Prev Job for on master (#23.4)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc