Skip to content
Accurate Code Coverage reporting for Golang (Go)
Branch: master
Clone or download
aeneasr Improve pipe handling
Signed-off-by: arekkas <aeneas@ory.am>
Latest commit ddc3550 Nov 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd Improve pipe handling Nov 18, 2018
.gitignore initial commit Aug 13, 2017
.travis.yml rename to go-acc Aug 13, 2017
CONTRIBUTING.md initial commit Aug 13, 2017
LICENSE initial commit Aug 13, 2017
README.md Update README.md Aug 26, 2017
coverage.txt Add ability to override go test flags Nov 1, 2018
go.mod Add ability to override go test flags Nov 1, 2018
go.sum Add ability to override go test flags Nov 1, 2018
main.go Update main.go Aug 26, 2017

README.md

go-acc

A tool for reporting accurate Code Coverage in Golang. It is a cross platform (osx, windows, linux) adaption of the following bash script:

touch ./coverage.tmp
echo 'mode: atomic' > coverage.txt
go list ./... | grep -v /cmd | grep -v /vendor | xargs -n1 -I{} sh -c 'go test -race -covermode=atomic -coverprofile=coverage.tmp -coverpkg $(go list ./... | grep -v /vendor | tr "\n" ",") {} && tail -n +2 coverage.tmp >> coverage.txt || exit 255' && rm coverage.tmp

Installation & Usage

$ go get github.com/ory/go-acc
$ go-acc
A tool for reporting accurate Code Coverage in Golang.

Usage:
  go-acc <packages...> [flags]

Examples:
$ go-acc github.com/some/package
$ go-acc -o my-coverfile.txt github.com/some/package
$ go-acc ./...
$ go-acc $(glide novendor)

Flags:
      --covermode string   Which code coverage mode to use (default "atomic")
  -o, --output string      Location for the output file (default "coverage.txt")
  -t, --toggle             Help message for toggle

You can’t perform that action at this time.