cliverage/README.md

39 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2019-11-22 21:35:22 +00:00
# cliverage
2019-11-22 22:02:19 +00:00
```yaml
go_package: git.xdrm.io/go/cliverage
author: xdrm-brackets
```
Command-line tool to highlight code coverage in the terminal.
### Requirements
You need a recent system with golang installed.
> It has not been tested under go 1.12.4
### Installation
You need to fetch and install the package with :
```bash
go get git.xdrm.io/go/cliverage
```
It should create the executable `cliverage` into the folder `$GOPATH/bin` (or `$GOBIN` if set).
### Usage
In order for the `cliverage` tool to run successfully, you need :
- a path to your code's repository
- the coverage file path (_see this [documentation](https://godoc.org/golang.org/x/tools/cover)_)
Command usage :
```bash
2019-11-22 22:05:27 +00:00
cliverage -d <code-path> -c <cover-file> [-f <file-path>]
2019-11-22 22:02:19 +00:00
```
Arguments :
2019-11-22 22:05:27 +00:00
- `<code-path>` - path to where your code lives
- `cover-file` - path to the coverage file
- `-f <file-path>` - path to a single file. You can use go package wildcards : `./...` prints every file, `./a/b/...` prints every file located into `./a/b`.