-
Notifications
You must be signed in to change notification settings - Fork 26.6k
build: add a noDuplicateEnumValue rule #63483
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can we add some documentation somewhere of why this is not desirable? It seems like in some situations that duplicate enum values could be very useful.
f2246c3
to
f7ce8ba
Compare
It caught several legitimate issues. In the cases I wasn't sure, I just disabled the rule. fixes angular#45843
f7ce8ba
to
b18990c
Compare
I think the diff is a bit self explantory, it's not the first time we have colliding Error codes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api
MISSING_EXTRA_LOCALE_DATA_FOR_LOCALE = 2303, | ||
LOCALE_DATA_UNDEFINED = 2304, | ||
INVALID_INTEGER_LITERAL = 2305, | ||
INVALID_DIGIT_INFO = 2306, | ||
INVALID_NUMBER_OF_DIGITS_AFTER_FRACTION = 2307, | ||
NO_PLURAL_MESSAGE_FOUND = 2308, | ||
VALUE_NOT_A_NUMBER = 2309, | ||
UNKNOWN_ZONE_WIDTH = 2310, | ||
INVALID_TO_DATE_CONVERSION = 2311, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
It caught several legitimate issues.
In the cases I wasn't sure, I just disabled the rule.
fixes #45843