-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Namespaces for cop names #1097
Comments
All points sound good to me. I also wonder if we shouldn't make it possible to use |
Sounds good to me, just two things: I think it would be good to be consistent by the writing of the namespace and the cop name, so both should be CamelCase, or both snake_case - in my opinion. Also I think the new namespace should be added to the generated todo file. |
I agree with @geniou. |
My personal preference would be to use |
+1 to consistent snake_case OR CamelCaps usage. IMO, in the YAML file, the namespaces should be actual YAML Also, it might be worth supporting both snake_case, and CamelCaps:
|
@geniou Namespaces will be added to @nevir I'm not sold on the idea of having namespace keys with cop name keys under it. We would lose the uniformity of name references. Being able to put About case... I think I was influenced by our internal use of cop types I'll change the namespaces to CamelCase, but I really don't feel like changing the cop names at this point, or supporting two naming styles. The gain would be small IMO. |
Let's go with @jonas054's idea for now. Btw, I think that the namespace can also be a cop key. |
Based on the discussion in rubocop/rubocop-rspec#3
I'm working on a solution for namespaces and would like to discuss it. These are the ideas:
Encoding
becomesstyle/Encoding
, etc. This is done in.yml
configuration files, in arguments to the--only
option, and in inline comments, e.g.,#rubocop:disable style/ClassLength
.--display-cop-names
and--show-cops
will include the namespace qualifiers.The text was updated successfully, but these errors were encountered: