Analyzer Diagnostics
Excalibur ships Roslyn analyzers that detect common issues at compile time. These diagnostics appear in your IDE and build output.
Diagnostic Reference
| ID | Title | Severity | Category |
|---|---|---|---|
| DISP001 | Handler Not Discoverable | Warning | Handlers |
| DISP002 | Missing AutoRegister Attribute | Info | Handlers |
| DISP003 | Reflection Without AOT Annotation | Warning | Compatibility |
| DISP004 | Optimization Hint | Info | Performance |
Installation
The analyzers are included automatically when you reference Excalibur.Dispatch.SourceGenerators.Analyzers:
dotnet add package Excalibur.Dispatch.SourceGenerators.Analyzers
Or use the combined source generators package which includes analyzers:
dotnet add package Excalibur.Dispatch.SourceGenerators
Suppressing Diagnostics
To suppress a specific diagnostic, use a #pragma directive:
#pragma warning disable DISP001
// Your code here
#pragma warning restore DISP001
Or suppress project-wide in your .csproj:
<PropertyGroup>
<NoWarn>$(NoWarn);DISP001</NoWarn>
</PropertyGroup>