FsHotWatch.Coverage
0.7.0-alpha.9
dotnet add package FsHotWatch.Coverage --version 0.7.0-alpha.9
NuGet\Install-Package FsHotWatch.Coverage -Version 0.7.0-alpha.9
<PackageReference Include="FsHotWatch.Coverage" Version="0.7.0-alpha.9" />
<PackageVersion Include="FsHotWatch.Coverage" Version="0.7.0-alpha.9" />
<PackageReference Include="FsHotWatch.Coverage" />
paket add FsHotWatch.Coverage --version 0.7.0-alpha.9
#r "nuget: FsHotWatch.Coverage, 0.7.0-alpha.9"
#:package FsHotWatch.Coverage@0.7.0-alpha.9
#addin nuget:?package=FsHotWatch.Coverage&version=0.7.0-alpha.9&prerelease
#tool nuget:?package=FsHotWatch.Coverage&version=0.7.0-alpha.9&prerelease
FsHotWatch.Coverage
Plugin that checks per-file line and branch coverage thresholds after each test run, using Cobertura XML reports produced by the test runner.
Why
Coverage enforcement is usually a separate CI step that runs after all tests.
With FsHotWatch, CoveragePlugin reacts to TestRunCompleted events and checks
thresholds immediately, giving you instant feedback when a change drops coverage
below the minimum.
How it works
- TestPrune runs your tests (with coverage flags wired via
coveragePaths) - Tests produce
coverage.cobertura.xmlreports undersearchDir - CoveragePlugin receives
TestRunCompleted - It merges partial-run coverage with the baseline, then parses the Cobertura XML
- Files below their per-file threshold are reported as errors via
fshw errors
Configuration
In .fshw.json:
{
"coverage": {
"configPath": "coverage-ratchet.json",
"searchDir": "coverage"
}
}
| Field | Type | Default | Description |
|---|---|---|---|
configPath |
string |
"coverage-ratchet.json" |
Path to the coverage-ratchet thresholds file (relative to repo root or absolute). |
searchDir |
string |
"." |
Directory tree to search for coverage.cobertura.xml files after each test run. |
Thresholds are managed by the coverage-ratchet IPC command (or fshw coverage-ratchet).
The format is a JSON file maintained by the
coverageratchet tool.
CLI
# Check current coverage status
fshw coverage-status
# Update thresholds to match current coverage (ratchet up)
fshw coverage-ratchet
# Show all errors (including coverage violations)
fshw errors
Programmatic usage
daemon.RegisterHandler(
CoveragePlugin.create
(System.IO.Path.Combine(repoRoot, "coverage-ratchet.json")) // configPath
(System.IO.Path.Combine(repoRoot, "coverage")) // searchDir
)
Install
dotnet add package FsHotWatch.Coverage
| Product | Versions 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. |
-
net10.0
- CoverageRatchet.Core (>= 0.1.0-alpha.2)
- FSharp.Core (>= 10.1.300)
- FsHotWatch (>= 0.8.0-alpha.15)
- Nerdbank.MessagePack (>= 1.2.4)
- System.Security.Cryptography.Xml (>= 10.0.8)
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 |
|---|---|---|
| 0.7.0-alpha.9 | 0 | 5/28/2026 |
| 0.7.0-alpha.8 | 46 | 5/5/2026 |
| 0.7.0-alpha.7 | 64 | 4/22/2026 |
| 0.7.0-alpha.3 | 58 | 4/18/2026 |
| 0.7.0-alpha.2 | 58 | 4/15/2026 |
| 0.6.0-alpha.1 | 57 | 4/12/2026 |
| 0.5.0-alpha.1 | 59 | 4/12/2026 |
| 0.3.0-alpha.1 | 64 | 4/8/2026 |
| 0.1.0-alpha.1 | 71 | 4/3/2026 |