DotCov.Tool.osx-arm64 1.3.0

dotnet add package DotCov.Tool.osx-arm64 --version 1.3.0
                    
NuGet\Install-Package DotCov.Tool.osx-arm64 -Version 1.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotCov.Tool.osx-arm64" Version="1.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotCov.Tool.osx-arm64" Version="1.3.0" />
                    
Directory.Packages.props
<PackageReference Include="DotCov.Tool.osx-arm64" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DotCov.Tool.osx-arm64 --version 1.3.0
                    
#r "nuget: DotCov.Tool.osx-arm64, 1.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DotCov.Tool.osx-arm64@1.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DotCov.Tool.osx-arm64&version=1.3.0
                    
Install as a Cake Addin
#tool nuget:?package=DotCov.Tool.osx-arm64&version=1.3.0
                    
Install as a Cake Tool

Build Coverage

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. When it merges more than one report it lists them on stderr; give each test run a fresh results directory, or an earlier run's report is merged too. 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
dotcov test     tests/MyApp.Tests --min-line 80 -- -c Release    # dotnet test, then report and gate

--github-summary writes the markdown table to $GITHUB_STEP_SUMMARY on pass and fail, so a green build still shows its number.

Testing and gating in one step

dotcov test runs dotnet test with Microsoft Code Coverage writing Cobertura into a fresh TestResults/<run> directory, then prints the table and gates that run like check:

dotcov test tests/MyApp.Tests --min-line 80 --exclude-generated -- -c Release

It passes the coverage options of the runner dotnet test uses in the current directory: DOTNET_TEST_RUNNER, else test.runner in the nearest global.json, else VSTest. On Microsoft.Testing.Platform the test project needs Microsoft.Testing.Extensions.CodeCoverage (TUnit includes it); on VSTest, Microsoft.NET.Test.Sdk brings the Code Coverage collector. Arguments after -- go to dotnet test unchanged. Its output goes to stdout, so stderr still starts with the verdict. A failed test run exits 1 with error: and no coverage verdict.

Exit codes

The gate commands check, crap, and test return 0 only for a measured pass. Their outcomes and shared CLI errors are listed below. Branch on the first stderr token, not the message text:

Token Meaning Exit
PASS: met the threshold 0
FAIL: below the threshold 1
NODATA: the gate lacks the data needed to evaluate 1
DISABLED: both check thresholds are 0, or crap --max-crap is infinite, so the gate cannot fail 1
error: missing path, bad path, parse failure, size cap, bad flag value, unknown flag, extra path, upload failure, failed test run 1
— unknown command 2

report, diff, and snapshot return 0 when rendering and any requested upload succeed. They do not require measured coverage or enforce thresholds. report --threshold affects presentation, not the exit code. Use check when CI must require measured coverage.

An existing directory with no matching reports is valid empty input for reporting commands; a missing path or malformed report is an error. An empty report displays no data in Markdown and - for percentages in the table. Its JSON has files: [], zero totals, and no lineRate or branchRate fields. These represent missing measurements, not 0% coverage. For that same empty directory, check --min-line 1 returns NODATA: and exits 1.

Deciding what to test next

crap scores every method comp² · (1 − cov)³ + comp and sorts worst-first:

$ dotcov crap TestResults/ --exclude-generated --top 5 --max-crap 6
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. The default --max-crap is 30, the original CRAP threshold; the 6 above also caps complexity, failing any method above complexity 6 however well it is tested. 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/, GlobalUsings.cs, Program.cs
--keep <subs> Comma-separated substrings exempt from --exclude-generated; requires it
--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

Each command accepts only the flags it uses, and dotcov --help lists which. A misspelled flag, --name=value, or a second path is an error, never a silently applied default.

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

There are no supported framework assets in this package.

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.

Version Downloads Last Updated
1.3.0 68 9/29/2026
1.2.0 79 9/29/2026
1.1.0 80 9/29/2026
1.0.0 104 9/18/2026
0.5.0 179 8/21/2026
0.4.0 347 7/18/2026
0.3.1 203 7/18/2026
0.3.0 259 6/11/2026