Skip to content

upstream PR #150 review: Bool default skip ignores decode-disabled cases #4

Description

@qizh

Summary

Review Notes

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    +bugSomething isn't working+testsTest improvements and coverage

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions