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

feat: generate diagnostic warning when ignored members are explicitly mapped #708

Merged
merged 3 commits into from Sep 4, 2023

Conversation

mikeguta
Copy link
Contributor

@mikeguta mikeguta commented Aug 31, 2023

Add a diagnostic if an explicitly ignored member is mapped explicitly

Description

Ignored members could also be explicitly mapped, but this may not be intended. This change adds warning level diagnostic messages when either a source or a target member is in that situation, but should not alter the behaviour of the library.

Fixes #512 (using the approach specified in its description)

Checklist

  • The existing code style is followed
  • The commit message follows our guidelines
  • Performed a self-review of my code
  • Hard-to-understand areas of my code are commented
  • The documentation is updated (as applicable)
  • Unit tests are added/updated
  • Integration tests are added/updated (as applicable, especially if feature/bug depends on roslyn or framework version in use)

Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your first contribution to Mapperly 😊
I added some feedback, feel free to discuss the feedback provided or ask questions if sth. is not clear.

Since this is your first contribution I need to manually approve the CI run each time you contribute, I'll try to do this as fast as I can so that fast feedback is provided to you. However, if it is still too slow, you can create a PR against your own fork.

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #708 (de29460) into main (a63035b) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #708      +/-   ##
==========================================
+ Coverage   91.15%   91.21%   +0.05%     
==========================================
  Files         198      198              
  Lines        6557     6601      +44     
  Branches      816      820       +4     
==========================================
+ Hits         5977     6021      +44     
  Misses        389      389              
  Partials      191      191              
Files Changed Coverage Δ
...ers/BuilderContext/MembersMappingBuilderContext.cs 100.00% <100.00%> (ø)
...Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mikeguta mikeguta force-pushed the warning-explicit-mapping-of-ignored branch from 87addb2 to de29460 Compare September 4, 2023 21:10
@latonz latonz enabled auto-merge (squash) September 4, 2023 21:21
Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates, lgtm 😊

@latonz latonz merged commit 4cd4e3a into riok:main Sep 4, 2023
19 checks passed
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🎉 This PR is included in version 3.2.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a diagnostic if an explicitly ignored member is mapped explicitly
2 participants