-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error "Ambiguous cop name RSpec/Rails/HttpStatus
" with latest rubocop-rspec and rubocop-rspec_rails
#18
Comments
Maybe more useful debugging ... I add some other obsoleted cops to the config, and removed the httpstatus one. I see output like:
and:
(Note how the MultiCompare is the obsoletion error, and the When I add some debug output to the ConfigObsoletion class, it does seem to have the appropriate values in the |
@dvandersluis do you think you know why this can happen? |
We're also still running into this issue. It's blocked a number of our internal gems in CI. We've had to lock |
@rubocop/rubocop-rspec do we know what us causing this? Should this be fixed somewhere in RuboCop’s ConfigLoader? What is the course of action? Do we admit our failure with this and recommend to adjust project configs with a minor version update? |
I have found a repository to reproduce and will investigate. Sorry for the delay. |
Fix: #18 This PR fixes an error for Ambiguous cop name `RSpec/Rails/HttpStatus` in the `rubocop-rspec_rails` gem.
Fix: #18 This PR fixes an error for Ambiguous cop name `RSpec/Rails/HttpStatus` in the `rubocop-rspec_rails` gem.
After update to rubocop-rspec_rails 2.28.3 I now just see the expected wrong namespace warnings, but no longer get the ambiguous cop warning. Looks good, thanks! |
@mjankowski I really appreciate you reporting this issue! Thank you! |
Following up on conversation here - #9 (comment)
Here's a minimal reproduction case. There are two files:
Gemfile
, and a minimal.rubocop.yml
.Gemfile:
Configuration in .rubocop.yml:
With this setup, when I run
bundle exec rubocop
, I get error output:If I comment out the
require
line forrubocop-rspec
in the rubocop.yml (so only rubocop-rails is req'd), the ambiguous error goes away and I get the deprecation warning:If I restore that line and comment out the
rubocop-rails
line (so only rubocop-rspec is req'd), I get this warning:If this matters, I'm running: ruby 3.3.0, rubygems 3.5.7, bundler 2.5.7. Output from
bundle list
:The text was updated successfully, but these errors were encountered: