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: add diagnostic for nested ignores #818

Merged
merged 1 commit into from Oct 20, 2023

Conversation

TimothyMakkison
Copy link
Collaborator

@TimothyMakkison TimothyMakkison commented Oct 14, 2023

Add diagnostic for nested ignores

Description

Mapperly does not support nested ignores. To prevent confusion, I've added 2 diagnostics that will warn the user when one is found.

  • This could be one single diagnostic for both source and target ignores, not sure if a slightly more specific warning is worth it.
  • If a nested ignore is found the usual IgnoredTargetMemberNotFound/IgnoredSourceMemberNotFound diagnostics will not be emitted.

Fixes #815, #814

Checklist

  • The existing code style is followed
  • The commit message follows our guidelines
  • Performed a self-review of my code
  • Unit tests are added/updated

@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

Merging #818 (7315c57) into main (eb7c389) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #818      +/-   ##
==========================================
+ Coverage   91.35%   91.38%   +0.03%     
==========================================
  Files         202      202              
  Lines        6697     6721      +24     
  Branches      830      832       +2     
==========================================
+ Hits         6118     6142      +24     
  Misses        388      388              
  Partials      191      191              
Files 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

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 this PR, IMO two diagnostics is the way to go and is also the way Mapperly handles other similar diagnostics.

@TimothyMakkison TimothyMakkison force-pushed the nested_ignore branch 3 times, most recently from 32d0425 to f84bf71 Compare October 17, 2023 22:19
@latonz latonz merged commit 0f61698 into riok:main Oct 20, 2023
19 checks passed
@github-actions
Copy link

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

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 3.3.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.

Emit a diagnostic if a nested ignore is found.
2 participants