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: create a new NameBuilder scope inside lambda expressions #358

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

TimothyMakkison
Copy link
Collaborator

@TimothyMakkison TimothyMakkison commented Apr 18, 2023

Update lambda expressions to use a new NameBuilder scope. This should prevent x, x1, x2, x3 appearing in integration tests as much. This change is cosmetic but arguably could make the code harder to read.

target.StackValue = ... Enumerable.Select(testObject.StackValue, x1 => ParseableInt(x1)));
target.QueueValue = ... Enumerable.Select(testObject.QueueValue, x2 => ParseableInt(x2)));
target.ImmutableArrayValue = ... Enumerable.Select(testObject.ImmutableArrayValue, x3 => ParseableInt(x3)));

Becomes:

target.StackValue = ... Enumerable.Select(testObject.StackValue, x => ParseableInt(x)));
target.QueueValue = ... Enumerable.Select(testObject.QueueValue, x => ParseableInt(x)));
target.ImmutableArrayValue = ... Enumerable.Select(testObject.ImmutableArrayValue, x => ParseableInt(x)));

@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2023

Codecov Report

Merging #358 (1bbe246) into main (dce4b42) will increase coverage by 0.37%.
The diff coverage is 92.57%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #358      +/-   ##
==========================================
+ Coverage   91.71%   92.09%   +0.37%     
==========================================
  Files         109      122      +13     
  Lines        3379     3870     +491     
  Branches      438      526      +88     
==========================================
+ Hits         3099     3564     +465     
- Misses        189      207      +18     
- Partials       91       99       +8     
Impacted Files Coverage Δ
src/Riok.Mapperly.Abstractions/MapEnumAttribute.cs 100.00% <ø> (ø)
...berMappings/MemberNullDelegateAssignmentMapping.cs 57.14% <0.00%> (ø)
.../Mappings/NewInstanceObjectFactoryMemberMapping.cs 100.00% <ø> (ø)
...Mapperly/Descriptors/UserMethodMappingExtractor.cs 98.38% <50.00%> (ø)
...riptors/MappingBuilders/QueryableMappingBuilder.cs 68.42% <68.42%> (ø)
...Descriptors/Mappings/EnumFromStringParseMapping.cs 73.68% <73.68%> (ø)
...ptors/Mappings/MemberMappings/NullMemberMapping.cs 76.27% <76.27%> (ø)
src/Riok.Mapperly/Symbols/FieldMember.cs 78.57% <78.57%> (ø)
src/Riok.Mapperly/Symbols/PropertyMember.cs 78.57% <78.57%> (ø)
...lders/NewInstanceObjectMemberMappingBodyBuilder.cs 80.17% <80.17%> (ø)
... and 60 more

... and 1 file with indirect coverage changes

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

@TimothyMakkison TimothyMakkison marked this pull request as ready for review April 18, 2023 20:09
latonz
latonz previously approved these changes Apr 19, 2023
@latonz
Copy link
Contributor

latonz commented Apr 19, 2023

I tried to rebase via github, didn't work out as expected 😢 Could you rebase manually?

@latonz latonz enabled auto-merge (squash) April 19, 2023 11:14
@latonz latonz merged commit 1b475a7 into riok:main Apr 19, 2023
@github-actions
Copy link

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

The release is available on:

Your semantic-release bot 📦🚀

@TimothyMakkison TimothyMakkison deleted the scope_lambda branch August 2, 2023 10:55
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.

4 participants