FsHotWatch.Coverage
0.7.0-alpha.14
dotnet add package FsHotWatch.Coverage --version 0.7.0-alpha.14
NuGet\Install-Package FsHotWatch.Coverage -Version 0.7.0-alpha.14
<PackageReference Include="FsHotWatch.Coverage" Version="0.7.0-alpha.14" />
<PackageVersion Include="FsHotWatch.Coverage" Version="0.7.0-alpha.14" />
<PackageReference Include="FsHotWatch.Coverage" />
paket add FsHotWatch.Coverage --version 0.7.0-alpha.14
#r "nuget: FsHotWatch.Coverage, 0.7.0-alpha.14"
#:package FsHotWatch.Coverage@0.7.0-alpha.14
#addin nuget:?package=FsHotWatch.Coverage&version=0.7.0-alpha.14&prerelease
#tool nuget:?package=FsHotWatch.Coverage&version=0.7.0-alpha.14&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.
Status: early alpha, and a lot of it is AI-written. APIs shift between versions and rough edges are expected — your mileage may vary. Issues and PRs are very welcome.
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) - TestPrune merges each run into the coverage high-watermark and writes the
shared
coverage.cobertura.xmlundersearchDir - CoveragePlugin receives
TestRunCompleted - It finds and parses the
coverage.cobertura.xmlreport(s) - Files below their per-file threshold are reported as errors (surfaced by
fshw check/fshw status)
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) without triggering a run
fshw status
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.3)
- FSharp.Core (>= 10.1.301)
- FsHotWatch (>= 0.8.0-alpha.31)
- 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.14 | 4 | 6/17/2026 |
| 0.7.0-alpha.13 | 44 | 6/12/2026 |
| 0.7.0-alpha.12 | 51 | 6/8/2026 |
| 0.7.0-alpha.11 | 54 | 6/4/2026 |
| 0.7.0-alpha.10 | 51 | 6/2/2026 |
| 0.7.0-alpha.9 | 55 | 5/28/2026 |
| 0.7.0-alpha.8 | 57 | 5/5/2026 |
| 0.7.0-alpha.7 | 67 | 4/22/2026 |
| 0.7.0-alpha.3 | 59 | 4/18/2026 |
| 0.7.0-alpha.2 | 63 | 4/15/2026 |
| 0.6.0-alpha.1 | 60 | 4/12/2026 |
| 0.5.0-alpha.1 | 62 | 4/12/2026 |
| 0.3.0-alpha.1 | 68 | 4/8/2026 |
| 0.1.0-alpha.1 | 74 | 4/3/2026 |