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

fix: prevent generation of empty if not null statements #576

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

TimothyMakkison
Copy link
Collaborator

@TimothyMakkison TimothyMakkison commented Jul 18, 2023

Prevent mapperly from generating empty if not null statements

Description

Modify NullDelegateExistingTargetMapping to check if the body contains any elements, not generating the if statement when empty.

Fixes #497

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
  • Unit tests are added/updated
  • Integration tests are added/updated (as applicable, especially if feature/bug depends on roslyn or framework version in use)

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #576 (2ffcc7e) into main (b238481) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #576   +/-   ##
=======================================
  Coverage   91.08%   91.09%           
=======================================
  Files         167      167           
  Lines        5656     5660    +4     
  Branches      716      717    +1     
=======================================
+ Hits         5152     5156    +4     
  Misses        351      351           
  Partials      153      153           
Impacted Files Coverage Δ
...xistingTarget/NullDelegateExistingTargetMapping.cs 85.71% <100.00%> (+5.71%) ⬆️

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

@latonz latonz merged commit 8cbeff1 into riok:main Jul 19, 2023
14 checks passed
@github-actions
Copy link

🎉 This PR is included in version 2.9.0-next.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

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

Successfully merging this pull request may close these issues.

Empty if null statement for existing target with readonly members.
2 participants