-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
New Cop: Explicit enum definition #78
Labels
feature request
Request for new functionality
Comments
+1 for this cop. 🙂 Perhaps |
tejasbubane
added a commit
to tejasbubane/rails-style-guide
that referenced
this issue
Jul 8, 2019
tejasbubane
added a commit
to tejasbubane/rails-style-guide
that referenced
this issue
Jul 8, 2019
tejasbubane
added a commit
to tejasbubane/rails-style-guide
that referenced
this issue
Jul 8, 2019
santib
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
santib
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
santib
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
santib
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
brunvez
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
brunvez
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 24, 2019
santib
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 25, 2019
santib
pushed a commit
to santib/rubocop-rails
that referenced
this issue
Jul 25, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 25, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 25, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 25, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 25, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 26, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 26, 2019
santib
added a commit
to santib/rubocop-rails
that referenced
this issue
Jul 26, 2019
goldapple911
added a commit
to goldapple911/rails-style-guide
that referenced
this issue
Aug 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Enum has two definition styles.
They have the same meaning. But I like the latter style.
If I add
foo
categorybefore
bar, the enum breaks! Because the order will be changed by adding
foo`.We can avoid the bug by using the explicit style.
Describe the solution you'd like
Add a cop to detect
enum
with an array.Describe alternatives you've considered
Probably we can make the cop configurable to enforce the opposite style.
Personally I think we do not need configurable cop at least the first implementation.
I do not oppose implementing the configuration, but we should mention the risk of the implicit style in the documentation.
Additional context
none
The text was updated successfully, but these errors were encountered: