-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unrecognized cop or department RSpecRails/HttpStatus #8
Comments
Similar issue in other repo: #9 I'm curious if the release notes are correct and the names should be aliased ... or if that's wrong and we need to rename these with this version bump. |
I am getting the same error. For now rolling back to version 2.27.1. @mjankowski that is the same repo. 😄 |
I realized it's a strange phenomenon. When rubocop-rails and rubocop-rspec are present, the setting RSpec/Rails/HttpStatus causes an Ambiguous cop name error.
The following do not cause an error: # .rubocop.yml
require:
- rubocop-rspec
RSpec/Rails/HttpStatus:
EnforcedStyle: numeric
However, the following do cause an error: require:
- rubocop-rails
- rubocop-rspec
RSpec/Rails/HttpStatus:
EnforcedStyle: numeric
|
What if you change the configuration key from |
No errors or warnings are raised. require:
- rubocop-rails
- rubocop-rspec
RSpecRails/HttpStatus:
EnforcedStyle: numeric
|
…s` when also using rubocop-rails Fix: #8
require:
- rubocop-rspec
- rubocop-performance
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 2.5
SuggestExtensions: false
NewCops: enable I don't understand why this message is produces, I didn't use |
Is rack included in the Gemfile? If no, this is probably resolved by the latest master rubocop-rsec_rails. Correct by following PR. |
@ydah No. Here is an example what actually have been used: https://github.com/on-strum/ruby-on-strum-logs/blob/010d14f09e20e0aa3dc9c65ceaa4dad2962f8992/.circleci/gemspecs/latest The same issue with |
I see.The following PR will probably solve the problem. If you add rubocop-rspec_rails to the Gemfile with the master branch specified, the error should go away. If so, wait for the next release. |
…s` when also using rubocop-rails Fix: #8
FYI, A fixed version has been released: Thank you for your report. |
@ydah Thanks! With this latest release all works as expected. Cheers! |
Hello! Today I have faced with interesting issue:
Current stack:
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin22]
'rubocop', '~> 1.62', '>= 1.62.1'
'rubocop-performance', '~> 1.20', '>= 1.20.2'
'rubocop-rspec', '~> 2.28'
Here is failed step on CI:
https://app.circleci.com/pipelines/github/on-strum/ruby-on-strum-logs/79/workflows/112f2214-e921-4cc7-8fde-1ee8952a157e/jobs/627
Here is my current Rubocop configuration:
https://github.com/on-strum/ruby-on-strum-logs/blob/master/.circleci/linter_configs/.rubocop.yml
What am I doing wrong? Thanks!
The text was updated successfully, but these errors were encountered: