-
-
Notifications
You must be signed in to change notification settings - Fork 201
feat: Allow to disable null mismatch diagnostics RMG089 per member #1804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'm still struggling with the unittest for RMG90 when setting SuppressNullMismatchDiagnostic to true, that test is failing cause the configation of the SuppressNullMismatchDiagnostic stays false, but I can't figure out why. Anyone able to help with this? |
You should be able to debug this by adding a conditional breakpoint in |
src/Riok.Mapperly/Descriptors/MappingBuilders/NullableMappingBuilder.cs
Outdated
Show resolved
Hide resolved
Yes, I have already done that, but I find it too complex to find out why |
|
The
So RMG090 is always emitted on a type mapping but not on a member mapping. So I'm not sure whether it makes sense to suppress it via a member on the |
latonz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! 😊
src/Riok.Mapperly/Descriptors/MappingBuilders/NullableMappingBuilder.cs
Outdated
Show resolved
Hide resolved
test/Riok.Mapperly.Tests/Mapping/ObjectPropertyFlatteningTest.cs
Outdated
Show resolved
Hide resolved
I was just trying to do what was said in #1613 . So if I understand, correctly, this ain't possible with the |
|
@3sRykaert When I wrote the issue, I didn't conduct a thorough analysis. In my opinion, it works for RMG090 when dealing with generated mappings, but not for user-defined mappings. |
|
@latonz maybe we can then split up the issues in 2 separate ones:
If you agree, I'll adjust the code to only keep RMG089 into account. |
3sRykaert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed as suggested
…uilder.cs Co-authored-by: Lars <[email protected]>
Allow to disable null mismatch diagnostics RMG089
Description
Code change for #1613 (only yet for RMG089)
Any feedback is already appreciated.
Fixes #1613
Checklist