You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppress SHARPYAML002 when a converter handles the type (#140)
The source generator SHARPYAML002 diagnostic now checks for converters
before reporting unsupported member types. Previously, types like
HttpMethod or IPEndPoint would trigger SHARPYAML002 even when a custom
YamlConverter<T> was registered via [YamlSourceGenerationOptions] or
[YamlConverter] attributes.
The validation now skips the diagnostic when:
- The member has a [YamlConverter(typeof(...))] attribute
- The member type has a [YamlConverter(typeof(...))] attribute
- A context-level YamlConverter<T> handles the member type
This applies to direct member types, array/list element types, and
dictionary value types. Nullable<T> value types are unwrapped before
matching against converters.
Added 9 tests covering all suppression paths and regression cases.
0 commit comments