FsHotWatch.Coverage
0.7.0-alpha.35
dotnet add package FsHotWatch.Coverage --version 0.7.0-alpha.35
NuGet\Install-Package FsHotWatch.Coverage -Version 0.7.0-alpha.35
<PackageReference Include="FsHotWatch.Coverage" Version="0.7.0-alpha.35" />
<PackageVersion Include="FsHotWatch.Coverage" Version="0.7.0-alpha.35" />
<PackageReference Include="FsHotWatch.Coverage" />
paket add FsHotWatch.Coverage --version 0.7.0-alpha.35
#r "nuget: FsHotWatch.Coverage, 0.7.0-alpha.35"
#:package FsHotWatch.Coverage@0.7.0-alpha.35
#addin nuget:?package=FsHotWatch.Coverage&version=0.7.0-alpha.35&prerelease
#tool nuget:?package=FsHotWatch.Coverage&version=0.7.0-alpha.35&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.13)
- FSharp.Compiler.Service (>= 43.12.402)
- FSharp.Core (>= 10.1.402)
- FSharp.Data.Adaptive (>= 1.2.26)
- FsHotWatch (>= 0.10.0-alpha.113)
- Ignore (>= 0.2.1)
- Ionide.ProjInfo (>= 0.74.2)
- Ionide.ProjInfo.FCS (>= 0.74.2)
- MessagePack (>= 2.5.303)
- StreamJsonRpc (>= 2.25.29)
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.35 | 42 | 11/13/2026 |
| 0.7.0-alpha.34 | 48 | 11/11/2026 |
| 0.7.0-alpha.33 | 63 | 11/2/2026 |
| 0.7.0-alpha.32 | 69 | 10/31/2026 |
| 0.7.0-alpha.31 | 65 | 10/26/2026 |
| 0.7.0-alpha.30 | 71 | 10/17/2026 |
| 0.7.0-alpha.29 | 75 | 9/30/2026 |
| 0.7.0-alpha.28 | 74 | 9/30/2026 |
| 0.7.0-alpha.27 | 70 | 9/30/2026 |
| 0.7.0-alpha.26 | 73 | 9/25/2026 |
| 0.7.0-alpha.25 | 76 | 9/23/2026 |
| 0.7.0-alpha.24 | 90 | 9/17/2026 |
| 0.7.0-alpha.23 | 85 | 9/15/2026 |
| 0.7.0-alpha.22 | 104 | 9/1/2026 |
| 0.7.0-alpha.21 | 96 | 8/31/2026 |
| 0.7.0-alpha.20 | 151 | 8/19/2026 |
| 0.7.0-alpha.19 | 106 | 8/13/2026 |
| 0.7.0-alpha.17 | 98 | 8/11/2026 |
| 0.7.0-alpha.16 | 90 | 8/3/2026 |
| 0.7.0-alpha.15 | 93 | 7/15/2026 |