Skip to content

feat: support for strict enum mapping#356

Merged
latonz merged 17 commits into
riok:mainfrom
jvzijp:feat/strictenummapping
May 1, 2023
Merged

feat: support for strict enum mapping#356
latonz merged 17 commits into
riok:mainfrom
jvzijp:feat/strictenummapping

Conversation

@jvzijp

@jvzijp jvzijp commented Apr 18, 2023

Copy link
Copy Markdown
Contributor

Closes #325

@jvzijp jvzijp changed the title feat/strictenummapping feat: support for strict enum mapping Apr 18, 2023
@latonz
latonz self-requested a review April 18, 2023 06:55

@latonz latonz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for your contribution! I added my feedback 😊
Could you also adjust the docs (01-mapper.md > Strict property mappings and 04-enum.mdx)?

Comment thread src/Riok.Mapperly/Descriptors/MappingBuilders/EnumMappingBuilder.cs Outdated
Comment thread src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs Outdated
Comment thread src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs Outdated
@jvzijp

jvzijp commented Apr 26, 2023

Copy link
Copy Markdown
Contributor Author

Thank you for your contribution! I added my feedback 😊 Could you also adjust the docs (01-mapper.md > Strict property mappings and 04-enum.mdx)?

I updated 01-mapper.md > Strict property mappings but I'm not sure what to add to 04-enum.mdx, what did you have in mind?

@latonz latonz left a comment

Copy link
Copy Markdown
Contributor

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 😊 😊
I added my feedback and also added a separate comment what I had in mind regarding 04-enum.mdx.

Comment thread test/Riok.Mapperly.Tests/Mapping/EnumTest.cs Outdated
Comment thread test/Riok.Mapperly.Tests/Mapping/QueryableProjectionEnumTest.cs Outdated
Comment thread test/Riok.Mapperly.Tests/Mapping/QueryableProjectionEnumTest.cs Outdated
Comment thread src/Riok.Mapperly/Descriptors/MappingBuilders/EnumMappingBuilder.cs Outdated
Comment thread docs/docs/02-configuration/01-mapper.md Outdated
Comment thread src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs Outdated
Comment thread src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs Outdated
Comment thread src/Riok.Mapperly/Descriptors/MappingBuilders/EnumMappingBuilder.cs
Comment thread src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs Outdated
Comment thread src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs Outdated
@jvzijp
jvzijp requested a review from latonz April 28, 2023 09:57

@latonz latonz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the updates.
There are still a few linter issues...

Comment thread src/Riok.Mapperly/Descriptors/MappingBuilders/EnumMappingBuilder.cs Outdated
Comment thread src/Riok.Mapperly/Descriptors/MappingBuilders/EnumMappingBuilder.cs
Comment thread test/Riok.Mapperly.Tests/Mapping/EnumTest.cs Outdated
Comment thread test/Riok.Mapperly.Tests/TestHelper.cs
latonz
latonz previously approved these changes Apr 28, 2023
@jvzijp

jvzijp commented May 1, 2023

Copy link
Copy Markdown
Contributor Author

How do I fix the conventional commits check?

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #356 (9a8448c) into main (e5e2d1c) will increase coverage by 0.11%.
The diff coverage is 82.75%.

📣 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     #356      +/-   ##
==========================================
+ Coverage   91.73%   91.84%   +0.11%     
==========================================
  Files         126      130       +4     
  Lines        3931     4110     +179     
  Branches      548      567      +19     
==========================================
+ Hits         3606     3775     +169     
- Misses        214      221       +7     
- Partials      111      114       +3     
Impacted Files Coverage Δ
src/Polyfills/Nullable.cs 0.00% <0.00%> (ø)
...k.Mapperly.Abstractions/MapDerivedTypeAttribute.cs 0.00% <0.00%> (ø)
...ok.Mapperly/Configuration/AttributeDataAccessor.cs 73.33% <66.66%> (-1.67%) ⬇️
src/Riok.Mapperly/Emit/SyntaxFactoryHelper.cs 95.35% <93.93%> (-0.23%) ⬇️
src/Riok.Mapperly/Configuration/MapDerivedType.cs 100.00% <100.00%> (ø)
src/Riok.Mapperly/Descriptors/Configuration.cs 95.00% <100.00%> (ø)
...Riok.Mapperly/Descriptors/MappingBuilderContext.cs 98.11% <100.00%> (+0.03%) ⬆️
...ptors/MappingBuilders/DerivedTypeMappingBuilder.cs 100.00% <100.00%> (ø)
.../Descriptors/MappingBuilders/EnumMappingBuilder.cs 97.89% <100.00%> (+1.40%) ⬆️
...erly/Descriptors/MappingBuilders/MappingBuilder.cs 100.00% <100.00%> (ø)
... and 3 more

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

@latonz
latonz enabled auto-merge (squash) May 1, 2023 06:44
@latonz
latonz merged commit b13d364 into riok:main May 1, 2023
@latonz

latonz commented May 1, 2023

Copy link
Copy Markdown
Contributor

@jvzijp no need to make this check green since it is not a required one. It's just a reminder to adjust the squashed commit message when merging the PR as needed.
Thank you for the contribution 😊

@jvzijp
jvzijp deleted the feat/strictenummapping branch May 2, 2023 06:54
@jvzijp

jvzijp commented May 2, 2023

Copy link
Copy Markdown
Contributor Author

Ah I see. Great :) My pleasure, it was a great learning experience.

@latonz latonz added this to the v2.9.0 milestone Jun 14, 2023
@github-actions

github-actions Bot commented Aug 7, 2023

Copy link
Copy Markdown

🎉 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.

Support for strict enum mapping

3 participants