You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Major: The Bool-coverage scan that decides whether to skip default does not filter out cases where case.decode == false. A non-decodable case tagged with false can incorrectly set hasBoolFalse = true, causing default to be skipped even though only true cases are emitted in the switch. This recreates the partial-coverage bug the change is trying to fix. Consider filtering location.cases by case.decode ?? true in the Bool scan, mirroring the actual case emission logic.
Suggestion: The Bool scan compares trimmedDescription to "true"/"false". If feasible, consider pattern-matching BooleanLiteralExprSyntax (or equivalent SwiftSyntax node) to avoid potential edge cases from string comparison.
Summary
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
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.trimmedDescriptionto"true"/"false". If feasible, consider pattern-matchingBooleanLiteralExprSyntax(or equivalent SwiftSyntax node) to avoid potential edge cases from string comparison.