CoverageChecker.CommandLine
0.8.0
See the version list below for details.
dotnet tool install --global CoverageChecker.CommandLine --version 0.8.0
dotnet new tool-manifest
dotnet tool install --local CoverageChecker.CommandLine --version 0.8.0
#tool dotnet:?package=CoverageChecker.CommandLine&version=0.8.0
nuke :add-package CoverageChecker.CommandLine --version 0.8.0
Coverage Checker Command Line Tool
The Coverage Checker command line tool is a .NET tool for extracting code coverage metrics from various code coverage formats.
For general information about the Coverage Checker project, see the repository's main README file.
Installation
To install the Coverage Checker command line tool, install the CoverageChecker.CommandLine NuGet package:
dotnet tool install --global CoverageChecker.CommandLine
Usage
The CoverageChecker.CommandLine tool can be invoked by running coveragechecker from the command line.
| Option | Description | Required | Default |
|---|---|---|---|
-f, --format |
The format of the coverage file(s). Options: SonarQube, Cobertura |
Yes | |
-d, --directory |
The directory to search for the coverage file(s) within. | No | The current directory |
-g, --glob-patterns |
The glob pattern(s) to use to search for the coverage file(s). | No | *.xml |
-l, --line-threshold |
The line coverage threshold. Default: 80 | No | 80 |
-b, --branch-threshold |
The branch coverage threshold. Default: 80 | No | 80 |
Output
The CoverageChecker Command Line tool reads the specified coverage files and outputs the line and branch coverage of the analyzed files. If the line or branch coverage is below the specified threshold, the tool will exit with a non-zero exit code.
GitHub Actions Integration
When running in a GitHub Actions environment, the tool automatically enhances its output:
- Workflow Commands: Coverage results and threshold failures are reported as
::notice::,::warning::, or::error::workflow commands, making them visible directly in the GitHub Actions UI and pull request files view. - Job Summary: A detailed markdown summary is generated and attached to the workflow run, including an overall metric table and a breakdown of the top 10 files with the lowest coverage.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.