Skip to content
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

Add a diagnostic if an explicitly ignored member is mapped explicitly #512

Closed
latonz opened this issue Jun 21, 2023 · 4 comments · Fixed by #708
Closed

Add a diagnostic if an explicitly ignored member is mapped explicitly #512

latonz opened this issue Jun 21, 2023 · 4 comments · Fixed by #708
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@latonz
Copy link
Contributor

latonz commented Jun 21, 2023

Add a diagnostic with a default level of warning if an explicitly ignored member (MapperIgnoreSourceAttribute or MapperIgnoreTargetAttribute) is mapped explicitly (MapPropertyAttribute): The member {0} on {1} is ignored but is also mapped by the MapPropertyAttribute.

Hints: In MembersMappingBuilderContext.ctor, everything removed by ignoredTargetMemberNames.ExceptWith(MemberConfigsByRootTargetName.Keys); should be stored into a list and reported as diagnostics when AddDiagnostics() is called.

@latonz
Copy link
Contributor Author

latonz commented Jun 21, 2023

Depends on #392

@mikeguta
Copy link
Contributor

mikeguta commented Sep 1, 2023

Hi @latonz, I added PR #708 as my first contribution to Mapperly. Let me know if that's not what you expected.

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🎉 This issue has been resolved in version 3.2.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This issue has been resolved in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants