DotCov.Tool.linux-x64
1.0.0
dotnet add package DotCov.Tool.linux-x64 --version 1.0.0
NuGet\Install-Package DotCov.Tool.linux-x64 -Version 1.0.0
<PackageReference Include="DotCov.Tool.linux-x64" Version="1.0.0" />
<PackageVersion Include="DotCov.Tool.linux-x64" Version="1.0.0" />
<PackageReference Include="DotCov.Tool.linux-x64" />
paket add DotCov.Tool.linux-x64 --version 1.0.0
#r "nuget: DotCov.Tool.linux-x64, 1.0.0"
#:package DotCov.Tool.linux-x64@1.0.0
#addin nuget:?package=DotCov.Tool.linux-x64&version=1.0.0
#tool nuget:?package=DotCov.Tool.linux-x64&version=1.0.0
DotCov.Tool
dotcov turns Cobertura XML into a build decision — a table, a markdown block, a JSON payload,
and an exit code your CI can act on. No coverage service, no account, no upload unless you ask
for one.
Getting started
dotnet tool install -g DotCov.Tool
dotnet test --results-directory TestResults --coverlet --coverlet-output-format cobertura
dotcov check TestResults/ --min-line 80 --min-branch 60 --exclude-generated
PASS: line 96.5% (min 80%), branch 93.0% (min 60%) - thresholds met
Pass the directory, not a file: dotcov globs **/*cobertura*.xml beneath it (hidden
directories included) and merges every match, so a sharded test matrix needs no merge step.
Timestamped coverlet.MTP files match the default. For generic names such as gcovr's
coverage.xml, select the filename explicitly with --pattern.
Commands
dotcov report TestResults/ --format table|json|md # parse and render
dotcov check TestResults/ --min-line 80 --exclude-generated # CI gate, exit 1 if below
dotcov crap TestResults/ --max-crap 6 # per-method risk gate
dotcov diff before.xml after.xml --format md # compare two reports
dotcov snapshot TestResults/ --commit SHA --branch main --project MyApp
--github-summary writes the markdown table to $GITHUB_STEP_SUMMARY on pass and fail, so a
green build still shows its number.
Exit codes
Everything that is not a verified pass exits non-zero, including a run that measured nothing. The first stderr token is the discriminator — branch on it, not on the message text:
| Token | Meaning | Exit |
|---|---|---|
PASS: |
met the threshold | 0 |
FAIL: |
below the threshold | 1 |
NODATA: |
nothing was measured | 1 |
DISABLED: |
every threshold was 0, so nothing was checked | 1 |
error: |
bad path, parse failure, size cap, bad flag value, upload failure | 1 |
| — | unknown command | 2 |
Deciding what to test next
crap scores every method comp² · (1 − cov)³ + comp and sorts worst-first:
$ dotcov crap TestResults/ --exclude-generated --top 5
Method Comp Cov % CRAP
----------------------------------------------------------------------------
DotCov.Formatters.MarkdownFormatter.Render 43 100.0% 43.0
DotCov.Tool.DotCovCli.RunAsync 40 100.0% 40.0
DotCov.Tool.DotCovCli.Diff 14 50.0% 38.5
DotCov.CoberturaParser.ConsumeClass 34 100.0% 34.0
DotCov.FileCoverage.MergeWith 32 100.0% 32.0
----------------------------------------------------------------------------
... 250 more methods below (--top 5)
FAIL: worst CRAP 43.0 (max 6) - 69 of 255 methods above threshold
Fully covered code scores its own complexity, fully uncovered code scores comp² + comp — so a
100%-covered 43-branch method still scores 43 and the formula is telling you to split it, not to
test it. Complexity comes from coverlet's per-method attribute automatically; for emitters that
write none, pass --metrics from dotnet msbuild /t:Metrics
(Microsoft.CodeAnalysis.Metrics).
Flags
| Flag | Effect |
|---|---|
--exclude-generated |
Skip .g.cs, .designer.cs, /obj/, /bin/, /Migrations/, state machines, Program.cs |
--keep <subs> |
Comma-separated substrings exempt from the above |
--pattern <glob> |
Filename to scan for. Default **/*cobertura*.xml, including timestamped MTP reports |
--max-chars <n> |
Per-file XML character cap. Default 50000000; 0 = uncapped |
--format |
table, json, md |
--github-summary |
Append markdown to $GITHUB_STEP_SUMMARY |
--upload <url> |
POST the JSON payload |
dotcov --help prints the full reference with examples. Percentages are invariant-formatted
everywhere: 62.0% on every host, never 62,0%.
Also in this family
DotCov — the parser as a library, zero dependencies · DotCov.Fallout — Fallout build component
Feedback
Documentation · Issues · MIT
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.