FsHotWatch.Analyzers
0.7.0-alpha.12
dotnet add package FsHotWatch.Analyzers --version 0.7.0-alpha.12
NuGet\Install-Package FsHotWatch.Analyzers -Version 0.7.0-alpha.12
<PackageReference Include="FsHotWatch.Analyzers" Version="0.7.0-alpha.12" />
<PackageVersion Include="FsHotWatch.Analyzers" Version="0.7.0-alpha.12" />
<PackageReference Include="FsHotWatch.Analyzers" />
paket add FsHotWatch.Analyzers --version 0.7.0-alpha.12
#r "nuget: FsHotWatch.Analyzers, 0.7.0-alpha.12"
#:package FsHotWatch.Analyzers@0.7.0-alpha.12
#addin nuget:?package=FsHotWatch.Analyzers&version=0.7.0-alpha.12&prerelease
#tool nuget:?package=FsHotWatch.Analyzers&version=0.7.0-alpha.12&prerelease
FsHotWatch.Analyzers
Plugin that runs F# analyzers in-process using the warm FSharpChecker's
check results. Compatible with G-Research F# Analyzers SDK
and custom [<CliAnalyzer>] implementations.
Why
F# analyzers normally need to start their own compiler to get type information. With FsHotWatch, the compiler is already warm -- analyzers get parse results and check results instantly, so they run in milliseconds instead of minutes.
How it works
- You save a file
- The daemon type-checks it with the warm FSharpChecker
- AnalyzersPlugin receives
FileCheckedwith the results - It constructs a
CliContextfrom the warm results (via reflection to handle FCS version mismatches) - It runs all loaded analyzers against that context
- Diagnostics are reported to the error ledger
Configuration
In .fshw.json:
{
"analyzers": {
"paths": ["analyzers/"]
}
}
| Field | Type | Default | Description |
|---|---|---|---|
paths |
string[] |
-- | Directories containing analyzer DLLs. Relative paths are resolved from the repo root. |
Writing a custom analyzer
See the ExampleAnalyzer for a complete working example. Here's the key pattern:
open FSharp.Analyzers.SDK
[<CliAnalyzer("MyAnalyzer", "Description of what it checks")>]
let myAnalyzer: Analyzer<CliContext> =
fun (context: CliContext) ->
async {
// context.ParseFileResults has the AST
// context.CheckFileResults has type info
// Walk the AST, find issues, return diagnostics
return
[ { Type = "My Rule"
Message = "Something is wrong here"
Code = "MY-001"
Severity = Severity.Warning
Range = someRange
Fixes = [] } ]
}
Build the analyzer as a class library and point analyzers.paths at
the output directory.
CLI
# Query analyzer diagnostics
fshw diagnostics
Programmatic usage
daemon.RegisterHandler(
AnalyzersPlugin.create
[ "/path/to/analyzers" ] // directories with analyzer DLLs
None // timeoutSec (None → no timeout)
DiagnosticSeverity.Hint // failOnSeverity threshold
)
Install
dotnet add package FsHotWatch.Analyzers
| 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
- FSharp.Analyzers.SDK (>= 0.36.0)
- FSharp.Compiler.Service (>= 43.12.203)
- FSharp.Core (>= 10.1.203)
- FsHotWatch (>= 0.8.0-alpha.13)
- System.Security.Cryptography.Xml (>= 10.0.7)
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.12 | 52 | 5/4/2026 |
| 0.7.0-alpha.11 | 48 | 4/29/2026 |
| 0.7.0-alpha.10 | 63 | 4/26/2026 |
| 0.7.0-alpha.9 | 56 | 4/25/2026 |
| 0.7.0-alpha.8 | 50 | 4/23/2026 |
| 0.7.0-alpha.7 | 54 | 4/22/2026 |
| 0.7.0-alpha.6 | 54 | 4/20/2026 |
| 0.7.0-alpha.3 | 48 | 4/18/2026 |
| 0.7.0-alpha.2 | 57 | 4/15/2026 |
| 0.6.0-alpha.1 | 51 | 4/12/2026 |
| 0.5.0-alpha.1 | 49 | 4/12/2026 |
| 0.3.0-alpha.1 | 57 | 4/8/2026 |
| 0.1.0-alpha.1 | 62 | 4/3/2026 |