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

msabramo / gocover-cobertura
76%
master: 79%

Build:
Build:
LAST BUILD BRANCH: calc-aggregates
DEFAULT BRANCH: master
Repo Added 06 Feb 2018 01:28AM UTC
Files 3
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

LAST BUILD ON BRANCH testdata-dot-instead-of-templates-for-pkgpath
branch: testdata-dot-instead-of-templates-for-pkgpath
CHANGE BRANCH
x
Reset
  • testdata-dot-instead-of-templates-for-pkgpath
  • calc-aggregates
  • coveralls-badge
  • master
  • omit-data-not-computed
  • travis-coveralls

pending completion
16

push

travis-ci

msabramo
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>
```

183 of 240 relevant lines covered (76.25%)

23.04 hits per line

Relevant lines Covered
Build:
Build:
240 RELEVANT LINES 183 COVERED LINES
23.04 HITS PER LINE
Source Files on testdata-dot-instead-of-templates-for-pkgpath
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
16 testdata-dot-instead-of-templates-for-pkgpath 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 repla... push 14 Feb 2018 06:21PM UTC msabramo travis-ci pending completion  
See All Builds (21)
  • Repo on GitHub
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

© 2025 Coveralls, Inc