Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 20-Jul-2021 | - | ||||
gocover-cobertura-1.1.0/ | H | 18-Nov-2020 | - | 32,706 | 21,466 | |
.gitignore | H A D | 20-Jul-2021 | 51 | 4 | 4 | |
.golangci.yml | H A D | 20-Jul-2021 | 615 | 34 | 29 | |
.travis.yml | H A D | 20-Jul-2021 | 166 | 13 | 11 | |
LICENSE | H A D | 20-Jul-2021 | 1 KiB | 20 | 16 | |
README.md | H A D | 20-Jul-2021 | 2.9 KiB | 84 | 60 | |
cobertura.go | H A D | 20-Jul-2021 | 5.1 KiB | 179 | 130 | |
go.mod | H A D | 20-Jul-2021 | 158 | 9 | 6 | |
go.sum | H A D | 20-Jul-2021 | 2.8 KiB | 30 | 29 | |
gocover-cobertura.go | H A D | 20-Jul-2021 | 7.2 KiB | 279 | 232 | |
ignore.go | H A D | 20-Jul-2021 | 1.1 KiB | 62 | 49 | |
profile.go | H A D | 20-Jul-2021 | 5.6 KiB | 214 | 171 |
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