-
-
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
Cops defined in gems can conflict even when they are in different namespaces #8044
Comments
Kind of related #5251, but not exactly the same problem. |
It looks like a pretty deep problem. So, this happens due to the fact that It seems the code in Another alternative I can think of is to prohibit cops from such deep nesting making sure that there are only 4 levels in their full name. |
Raising this issue as discussed here: rubocop/rubocop-rspec#834 (comment)
rubocop-rails provides
RuboCop::Cop::Rails::HttpStatus
, and rubocop-rspec providesRuboCop::Cop::RSpec::Rails::HttpStatus
.Both cops get the same badge,
Rails/HttpStatus
, and this means that only one cop works (from whichever gem is required last).Related: rubocop/rubocop-rspec#611
First reported: #5738 (comment)
Expected behavior
Both cops report offenses.
Actual behavior
Only one cop reports offenses (from whichever gem is required last).
Steps to reproduce the problem
https://gist.github.com/haines/369ac2298ce6fe042865def931e8448b
RuboCop version
The text was updated successfully, but these errors were encountered: