-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Create a new cop group, MagicComments #3886
Conversation
Thinking if this could be generalized to also include the cops for documentation comments? |
@Drenmi can you clarify that a little bit. It sounds like you are suggesting to create a |
Sounds great to me. |
e660722
to
25c9335
Compare
Not sure how to explain it, but this new group feels a bit off to me. I don't feel it fits into the |
Actually my train of thought has not reached any station yet. I think I started in the same place as you, with: "this isn't really about coding style, is it?" 😅 |
Understandable. The same can be said about This conversation has caused me to think about the relationship that we have between cops and groups for all of the cops. Has anyone ever considered adding sub-categories to our groups? For example, what if we had |
Yeah I was really interested in this because it would make it way easier for 3rd party cops. See rubocop/rubocop-rspec#232 |
I don't recall us ever discussing something like this. Might be makes to some extent. Or we can assume that |
9c91400
to
9232152
Compare
467e141
to
373a7b9
Compare
373a7b9
to
9fcb47d
Compare
2e6d720
to
5ee132c
Compare
5ee132c
to
af41c61
Compare
af41c61
to
4123815
Compare
Closing due to lack of progress here. |
I felt like there wasn't much that came out of the conversation on this. Is this something that we would want to work towards or should this be considered completely dead? If it is something that we would like to move towards, what kind of changes would you like to see? |
I'm open to the idea of breaking down the |
These cops always felt a bit weird being classified as Style cops. I think that this creates a good classification for grouping these cops.
This PR creates a new
MagicComments
group. It also movesStyle/Encoding
toMagicComments/Encoding
andStyle/FrozenStringLiteralComment
toMagicComments/FrozenStringLiteral
.My vision for the future of this is to add a cop for
warn_indent
. Possibly add support for awarn_past_scope
cop. Standardize the comment checks across all of these cops. Create a common configuration that determines whether the comments should all be on one line or all on separate lines. Create a configuration to set the order of how the comments should appear.