Skip to content

fix: minimized warnings generated by macro expanded code #103

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

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

soumyamahunt
Copy link
Contributor

@soumyamahunt soumyamahunt commented Oct 2, 2024

addressed warnings for:

  • unused container variables with nested decoding
  • no mutation to encode container variable for enums with internal tagging
  • unused encode container variable for enum cases without any associated variables to be encoded
  • availability warning for extensions of type that has @available attribute
  • unreachable catch clause for untagged enums with fallback case
  • handling as expression with CodedAs with community help: https://forums.swift.org/t/discrepancy-between-swift-ast-explorer-and-swift-syntax/75103/3

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 92.95775% with 10 lines in your changes missing coverage. Please review.

Project coverage is 94.73%. Comparing base (3d5be63) to head (2d40924).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...Variables/Enum/Switcher/UnTaggedEnumSwitcher.swift 85.91% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   94.87%   94.73%   -0.15%     
==========================================
  Files         109      109              
  Lines        3202     3302     +100     
==========================================
+ Hits         3038     3128      +90     
- Misses        164      174      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@soumyamahunt soumyamahunt force-pushed the warning-fix branch 2 times, most recently from c9e5a61 to bed6baf Compare October 2, 2024 09:13
@soumyamahunt
Copy link
Contributor Author

soumyamahunt commented Oct 2, 2024

One warning which results with macro @CodedAs(nil as String?) usage handling not working as expected and being discussed: https://forums.swift.org/t/discrepancy-between-swift-ast-explorer-and-swift-syntax/75103

[UPDATE]
Discussion completed with resolution.

@soumyamahunt soumyamahunt merged commit 0c4be0e into main Oct 2, 2024
12 of 14 checks passed
@soumyamahunt soumyamahunt deleted the warning-fix branch October 2, 2024 11:25
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.

1 participant