Skip to content

Conversation

@cirras
Copy link
Collaborator

@cirras cirras commented Apr 14, 2025

This PR fixes false positives in the UnusedType rule around enums.

If an enum type is never referenced by name, that doesn't mean the whole type is unused.
We now also check if any of its values are used.

@cirras cirras requested a review from fourls April 14, 2025 01:07
Enums are considered used as long as any of their elements are used.
@cirras cirras force-pushed the unusedtype_enum_values branch from cb465da to c681e77 Compare April 14, 2025 01:14
Copy link
Collaborator

@fourls fourls 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!

@fourls fourls merged commit 91faadd into master Apr 15, 2025
4 checks passed
@fourls fourls deleted the unusedtype_enum_values branch April 15, 2025 00:58
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.

3 participants