forked from SwiftyLab/MetaCodable
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
+bugSomething isn't workingSomething isn't working+testsTest improvements and coverageTest improvements and coverage
Milestone
Description
Summary
- Reviewed PR Update
swift-syntax, fix Bool switch warnings, and improve test organization & coverage SwiftyLab/MetaCodable#150: it updates the SwiftSyntax dependency range and adds an explicit SwiftSyntaxMacroExpansion dependency, adjusts the numeric coding strategy constraint toSendable, refines enum-case encoding for argument-less cases, and updates tagged enum decoding to keepdefaultfor partial Bool coverage alongside new mixed-type tests.
Review Notes
- Major: The Bool-coverage scan that decides whether to skip
defaultdoes not filter out cases wherecase.decode == false. A non-decodable case tagged withfalsecan incorrectly sethasBoolFalse = true, causingdefaultto be skipped even though onlytruecases are emitted in the switch. This recreates the partial-coverage bug the change is trying to fix. Consider filteringlocation.casesbycase.decode ?? truein the Bool scan, mirroring the actual case emission logic. - Suggestion: The Bool scan compares
trimmedDescriptionto"true"/"false". If feasible, consider pattern-matchingBooleanLiteralExprSyntax(or equivalent SwiftSyntax node) to avoid potential edge cases from string comparison.
Metadata
Metadata
Assignees
Labels
+bugSomething isn't workingSomething isn't working+testsTest improvements and coverageTest improvements and coverage