Skip to content

Commit a6a294a

Browse files
authored
Add go cover example and move links to paragraphs
1 parent 0b76511 commit a6a294a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,29 @@ jobs:
5959
6060
## Example uses
6161
62-
### [mypy](http://mypy-lang.org/)
62+
### mypy
6363
64-
Parse the mypy imprecision text report (lower number is better).
64+
Parse the [mypy](https://mypy.readthedocs.io/en/stable/command_line.html#report-generation) imprecision text report (lower number is better).
6565
6666
```console
6767
$ mypy src --ignore-missing-imports --no-incremental --txt-report ./.reports/mypy
6868
$ commitstat .reports/mypy/index.txt --regex "\| Total\s*\|\s*([\d\.]+%)" --goal decrease --name mypy
6969
```
7070

71-
### [pytest](https://docs.pytest.org/en/latest/) with [pytest-cov](https://github.com/pytest-dev/pytest-cov)
71+
### pytest-cov
7272

73-
Parse the pytest-cov default HTML report for the total coverage percentage.
73+
Parse the [pytest-cov](https://github.com/pytest-dev/pytest-cov) default HTML report for the total coverage percentage.
7474

7575
```console
7676
$ pytest --cov=src --cov-report=html:.reports/src/pytest src
7777
$ commitstat .reports/pytest/index.html --regex "<span class=\"pc_cov\">(\d+%)<\/span>" --goal increase --name pytest
7878
```
79+
80+
### Go test coverage
81+
82+
Parse total test coverage from the [built-in go coverage tool](https://blog.golang.org/cover).
83+
84+
```console
85+
$ go test ./... -coverprofile=coverage.out
86+
$ go tool cover -func coverage.out | commitstat - --regex "total:\s+\(statements\)\s+([\d\.]+%)" --name coverage
87+
```

0 commit comments

Comments
 (0)