Sanet.Cocodif 0.2.1

dotnet tool install --global Sanet.Cocodif --version 0.2.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Sanet.Cocodif --version 0.2.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Sanet.Cocodif&version=0.2.1
                    
nuke :add-package Sanet.Cocodif --version 0.2.1
                    

Cocodif

Diff-coverage reporter for .NET. Parses OpenCover or Cobertura XML coverage reports, computes coverage only for changed files, and emits Markdown and/or JSON reports.

Install

dotnet tool install --global Sanet.Cocodif

Usage

Cocodif -c coverage.xml -f changed-files.txt -o report.md

Options

Option Alias Description
--coverage -c One or more paths to coverage XML files (OpenCover or Cobertura). Multiple inputs are merged.
--changed-files -f Path to a file containing changed file paths, one per line.
--format opencover, cobertura, or auto (default: auto). Auto-detects from XML root element.
--root Repository root for normalizing absolute paths to repo-relative.
--include Glob pattern for files to include (default: **/*).
--exclude Glob pattern for files to exclude (default: **/obj/**,**/bin/**).
--title Report title (default: Coverage Report).
--output-format markdown, json, or both (default: markdown).
--output -o Output file path(s). If omitted, writes to stdout.
--fail-under Fail with exit code 1 if overall diff-coverage % is below this threshold.

Exit Codes

Code Meaning
0 Success
1 General error, or coverage below --fail-under threshold
2 Invalid argument
3 File not found

Examples

Multi-module merge:

Cocodif -c core.xml -c api.xml -f changed.txt --output both --output-format both

JSON output for CI scripting:

Cocodif -c coverage.xml -f changed.txt --output-format json -o report.json

Fail build on low coverage:

Cocodif -c coverage.xml -f changed.txt --fail-under 80

Output Formats

Markdown — per-file table with uncovered line numbers, coverage %, and a summary section.

JSON — structured data with per-file entries and overall totals, suitable for programmatic consumption.

License

MIT

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.2.1 44 7/23/2026
0.2.0 73 7/22/2026
0.1.2 38 7/22/2026
0.1.1 42 7/22/2026
0.1.0 106 7/22/2026