FsHotWatch.Analyzers
0.3.0-alpha.1
dotnet add package FsHotWatch.Analyzers --version 0.3.0-alpha.1
NuGet\Install-Package FsHotWatch.Analyzers -Version 0.3.0-alpha.1
<PackageReference Include="FsHotWatch.Analyzers" Version="0.3.0-alpha.1" />
<PackageVersion Include="FsHotWatch.Analyzers" Version="0.3.0-alpha.1" />
<PackageReference Include="FsHotWatch.Analyzers" />
paket add FsHotWatch.Analyzers --version 0.3.0-alpha.1
#r "nuget: FsHotWatch.Analyzers, 0.3.0-alpha.1"
#:package FsHotWatch.Analyzers@0.3.0-alpha.1
#addin nuget:?package=FsHotWatch.Analyzers&version=0.3.0-alpha.1&prerelease
#tool nuget:?package=FsHotWatch.Analyzers&version=0.3.0-alpha.1&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 .fs-hot-watch.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
fs-hot-watch diagnostics
Programmatic usage
daemon.RegisterHandler(
AnalyzersPlugin.create
[ "/path/to/analyzers" ] // directories with analyzer DLLs
None // getCommitId for caching
)
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.201)
- FSharp.Core (>= 10.1.201)
- FsHotWatch (>= 0.3.0-alpha.1)
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.3.0-alpha.1 | 35 | 4/8/2026 |
| 0.1.0-alpha.1 | 44 | 4/3/2026 |