• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..20-Jul-2021-

gocover-cobertura-1.1.0/H18-Nov-2020-32,70621,466

.gitignoreH A D20-Jul-202151 44

.golangci.ymlH A D20-Jul-2021615 3429

.travis.ymlH A D20-Jul-2021166 1311

LICENSEH A D20-Jul-20211 KiB2016

README.mdH A D20-Jul-20212.9 KiB8460

cobertura.goH A D20-Jul-20215.1 KiB179130

go.modH A D20-Jul-2021158 96

go.sumH A D20-Jul-20212.8 KiB3029

gocover-cobertura.goH A D20-Jul-20217.2 KiB279232

ignore.goH A D20-Jul-20211.1 KiB6249

profile.goH A D20-Jul-20215.6 KiB214171

README.md

1## Forked from t-yuki
2
3This is a **fork** of https://github.com/boumenot/gocover-cobertura.
4
5At the time of this writing the repository appears to be on *pause* with
6several outstanding PRs, and forks with interesting contributions.  This
7repo consolidates those outstanding forks, and combines them into one repo.
8
9go tool cover XML (Cobertura) export
10====================================
11
12This is a simple helper tool for generating XML output in [Cobertura](http://cobertura.sourceforge.net/) format
13for CIs like [Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin) and others
14from [go tool cover](https://code.google.com/p/go.tools/) output.
15
16Installation
17------------
18
19Just type the following to install the program and its dependencies:
20
21    $ go get github.com/boumenot/gocover-cobertura
22
23Usage
24-----
25
26`gocover-cobertura` reads from the standard input:
27
28    $ go test -coverprofile=coverage.txt -covermode count github.com/gorilla/mux
29    $ gocover-cobertura < coverage.txt > coverage.xml
30
31Some flags can be passed (each flag should only be used once):
32
33- `-by-files`
34
35  Code coverage is organized by class by default.  This flag organizes code
36  coverage by the name of the file, which the same behavior as `go tool cover`.
37
38- `-ignore-dirs PATTERN`
39
40  ignore directories matching `PATTERN` regular expression. Full
41  directory names are matched, as
42  `github.com/boumenot/gocover-cobertura` (and so `github.com/boumenot`
43  and `github.com`), examples of use:
44  ```
45  # A specific directory
46  -ignore-dirs '^github\.com/boumenot/gocover-cobertura/testdata$'
47  # All directories autogen and any of their subdirs
48  -ignore-dirs '/autogen$'
49  ```
50
51- `-ignore-files PATTERN`
52
53  ignore files matching `PATTERN` regular expression. Full file names
54  are matched, as `github.com/boumenot/gocover-cobertura/profile.go`,
55  examples of use:
56  ```
57  # A specific file
58  -ignore-files '^github\.com/boumenot/gocover-cobertura/profile\.go$'
59  # All files ending with _gen.go
60  -ignore-files '_gen\.go$'
61  # All files in a directory autogen (or any of its subdirs)
62  -ignore-files '/autogen/'
63  ```
64
65- `-ignore-gen-files`
66
67  ignore generated files. Typically files containing a comment
68  indicating that the file has been automatically generated. See
69  `genCodeRe` regexp in [ignore.go](ignore.go).
70
71~~Authors~~Merger
72-------
73
74[Christopher Boumenot (boumenot)](https://github.com/boumenot)
75
76Thanks
77------
78
79 * [Yukinari Toyota (t-yuki)](https://github.com/t-yuki)
80 * This tool is originated from [gocov-xml](https://github.com/AlekSi/gocov-xml) by [Alexey Palazhchenko (AlekSi)](https://github.com/AlekSi)
81 * [DarcySail](https://github.com/DarcySail)'s [PR](https://github.com/t-yuki/gocover-cobertura/pull/22)
82 * [maxatome](https://github.com/maxatome)'s [PR](https://github.com/t-yuki/gocover-cobertura/pull/19)
83 * [elliotmr](https://github.com/elliotmr)'s [branch](https://github.com/elliotmr/gocover-cobertura)
84