Skip to content

Add check for exhaustive case statements over enums #370

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
May 6, 2025

Conversation

fourls
Copy link
Collaborator

@fourls fourls commented Apr 22, 2025

Fixes #98. I haven't added the rule to the default quality profile since it may be frustrating for existing codebases.

@fourls fourls requested a review from Cirras April 22, 2025 05:48
@fourls
Copy link
Collaborator Author

fourls commented May 6, 2025

Updated to exclude any case with a subrange expression.

@fourls fourls requested a review from Cirras May 6, 2025 02:13
@fourls fourls force-pushed the exhaustive-enum branch from c0645d9 to b890b27 Compare May 6, 2025 02:15
Copy link
Collaborator

@Cirras Cirras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉

@Cirras Cirras merged commit cbf16be into master May 6, 2025
5 checks passed
@Cirras Cirras deleted the exhaustive-enum branch May 6, 2025 02:28
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.

New rule: Case statements should be exhaustive
3 participants