Troubleshooting & Roslyn Diagnostics
EricksonLopez.Result bundles Roslyn analyzers (EricksonLopez.Result.Analyzers) directly with the core package, while .Serialization.Generators and .DomainErrors.Generators ship generator-specific diagnostics.
| Diagnostic ID | Severity | Source Package | Meaning & Remediation |
|---|---|---|---|
RESULT001 |
Warning | Result.Analyzers |
Result<T> wraps a struct > 32 bytes; prefer a class/record or reference wrapper |
RESULT003 |
Error | Result.Analyzers |
ErrorBuilder return value discarded before .Build() (CodeFix available) |
RESULT004 |
Warning | Result.Analyzers |
Lambda captures local state; switch to TState + static lambda overload |
RESULT005 |
Warning | Result.Analyzers |
WithMetadata chaining issue (CodeFix available) |
RESULT006 |
Warning | Result.Analyzers |
WithInnerError chaining issue (CodeFix available) |
RESULT007 |
Warning | Result.Analyzers |
Error stored in HashSet/Dictionary without explicit ErrorEqualityComparer |
RESULT008 |
Warning | Result.Analyzers |
Endpoint uses AddResultEndpointFilter without OpenAPI metadata |
RESULT009 |
Warning | Result.Analyzers |
ResultHttpOptions.IncludeDescription = true risk in production |
RESULT010 |
Warning | Result.Analyzers |
ResultExceptionBehavior message hygiene warning |
RESULT012 |
Warning | Result.Analyzers |
Returning default(Result) / default(Result<T>) (CodeFix available) |
RESULT013 |
Warning | Result.Analyzers |
Using boolean operators on Result instead of .IsSuccess / .IsFailure |
RESULT_OTEL_001 |
Info | Result.Analyzers |
TraceOutcome invoked without AddResultMetrics registration |
RESULT_GEN_001 |
Warning | Serialization.Generators |
Add [JsonSerializable(typeof(Result))] guidance for STJ source generation |
RESULT_DOM_001–003 |
Warning | DomainErrors.Generators |
Invalid C# identifier/type, duplicate method, or malformed *.errors.json |
Version Note:
RESULT014(DefaultResultBooleanConditionAnalyzer) exists in local3.2.0([4.0.0]staged changelog) and is not part of the published3.0.0NuGet package. Note also thatRESULT002andRESULT011do not exist insrc/.