Commit 9b7ffe6f authored by Andrea Galbusera's avatar Andrea Galbusera

Docs: rework coverage tools regex examples

An attempt to fix Markdown escaping in coverage regex example for nyc
ended up in a tricky scenario where either the rendered GitLab help page
or the html on docs.gitlab.com showed the regex incorrectly.

To work this around, we replace the Markdown table with a list of the tools
and the sample regular expressions.
parent d2dbaad4
......@@ -137,21 +137,19 @@ averaged.
<!-- vale gitlab.Spelling = NO -->
| Coverage Tool | Sample regular expression |
|------------------------------------------------|-----------------------------------------------|
| Simplecov (Ruby) | `\(\d+.\d+\%\) covered` |
| pytest-cov (Python) | `^TOTAL.+?(\d+\%)$` |
| Scoverage (Scala) | `Statement coverage[A-Za-z\.*]\s*:\s*([^%]+)` |
| `phpunit --coverage-text --colors=never` (PHP) | `^\s*Lines:\s*\d+.\d+\%` |
| gcovr (C/C++) | `^TOTAL.*\s+(\d+\%)$` |
| `tap --coverage-report=text-summary` (NodeJS) | `^Statements\s*:\s*([^%]+)` |
| `nyc npm test` (NodeJS) | `All files[^|]*\|[^|]*\s+([\d\.]+)` |
| excoveralls (Elixir) | `\[TOTAL\]\s+(\d+\.\d+)%` |
| `mix test --cover` (Elixir) | `\d+.\d+\%\s+\|\s+Total` |
| JaCoCo (Java/Kotlin) | `Total.*?([0-9]{1,3})%` |
| `go test -cover` (Go) | `coverage: \d+.\d+% of statements` |
| .Net (OpenCover) | `(Visited Points).*\((.*)\)` |
| .Net (`dotnet test` line coverage) | `Total\s*\|\s*(\d+\.?\d+)` |
- Simplecov (Ruby). Example: `\(\d+.\d+\%\) covered`.
- pytest-cov (Python). Example: `^TOTAL.+?(\d+\%)$`.
- Scoverage (Scala). Example: `Statement coverage[A-Za-z\.*]\s*:\s*([^%]+)`.
- `phpunit --coverage-text --colors=never` (PHP). Example: `^\s*Lines:\s*\d+.\d+\%`.
- gcovr (C/C++). Example: `^TOTAL.*\s+(\d+\%)$`.
- `tap --coverage-report=text-summary` (NodeJS). Example: `^Statements\s*:\s*([^%]+)`.
- `nyc npm test` (NodeJS). Example: `All files[^|]*\|[^|]*\s+([\d\.]+)`.
- excoveralls (Elixir). Example: `\[TOTAL\]\s+(\d+\.\d+)%`.
- `mix test --cover` (Elixir). Example: `\d+.\d+\%\s+\|\s+Total`.
- JaCoCo (Java/Kotlin). Example: `Total.*?([0-9]{1,3})%`.
- `go test -cover` (Go). Example: `coverage: \d+.\d+% of statements`.
- .Net (OpenCover). Example: `(Visited Points).*\((.*)\)`.
- .Net (`dotnet test` line coverage). Example: `Total\s*\|\s*(\d+\.?\d+)`.
<!-- vale gitlab.Spelling = YES -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment