Why this matters
Improves type safety and discoverability.
Replace string literals that represent finite sets with enums (optionally flagged) or constants.
Improves type safety and discoverability.
Side-by-side examples engineers can pattern-match during review.
if (status == "Approved") { ... }enum Status { Pending, Approved, Rejected }
if (status == Status.Approved) { ... }if(role=="Admin")if(role==Role.Admin)From the same buckets as this rule.