-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Extract RSpec Rails cops #1830
Extract RSpec Rails cops #1830
Conversation
2ea437e
to
0a83f81
Compare
0a83f81
to
cdff599
Compare
@rubocop/rubocop-rspec We can now proceed to extraction 🎉 |
Should we do rubocop-rspec_rails with underscore lije we do for rubocop-factory_bot? |
I was wondering whether it should be separated by hyphen or underscore. In factory_bot, the name of the original gem is separated by underscore, but rspec-rails is separated by hyphen. |
Based on https://guides.rubygems.org/name-your-gem/ and e.g. https://github.com/ydah/rubocop-rspec-rails/blob/207fc3483e75605b12276b90e5bb3a7ebcdc223f/lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb defining |
Thank you. we use rubocop-rspec_rails instead of rubocop-rspec-rails. |
I updated this and extracted PR. |
I created https://github.com/rubocop/rubocop-rspec_rails with @rubocop/rubocop-core given write-access. Ping me if anyone needs admin access. |
@rubocop/rubocop-rspec If the modifications on the rubocop-rspec_rais side are correct, I will apply them to the https://github.com/rubocop/rubocop-rspec_rails . Please review ydah/rubocop-rspec_rails#1 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologise for the delay. I don’t have sufficient spare time to review this fully. I hope to do this early next week. Thank you so much for the effort you’re putting into this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
Were there any modules that are needed to to run the newly-extracted extension without rubocop-rspec? Can we remove them from rubocop-rspec? I recall we had that for capybara/factory_bot.
I can’t spot any rails-specific modules in our code at a glance, so all good. |
f18669a
to
c02874b
Compare
ba79c12
to
9649697
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! 😍
I overlooked something serious. Gems cannot depend on each other.
|
I guess we’ll have to remove the dependency from rubocop-rspec_rails and make a note there that it implicitly depends on rubocop-rspec. |
@pirj Should rubocop-rspec_rails be a patch upgrade or a minor upgrade? |
I’d yank the 2.28.0 and released a bugfix patch in 2.28.1. |
Yes that sounds like a good idea. And I assume nobody is using the gem yet, so the yank won’t affect users. |
9649697
to
ae19ff1
Compare
I update this PR. And All Green ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you!
This sets a major milestone, and, to me, was he last thing stopping us from releasing 3.0 of all gems and untangling them. And enabling all cops previously marked as pending.
Fix: #1734
TODO
rspec-rspec_rails
Here's where to temporary extract it:.
Before submitting the PR make sure the following are checked:
master
(if not - rebase it).CHANGELOG.md
if the new code introduces user-observable changes.bundle exec rake
) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).