-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrade to rubocop 1.0 and rubocop-rspec 2.0 #37
Conversation
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.
Can you update the CHANGELOG too?
@@ -37,3 +37,6 @@ RSpec/NestedGroups: | |||
|
|||
RSpec/ContextWording: | |||
Enabled: false | |||
|
|||
RSpec/MultipleMemoizedHelpers: | |||
Enabled: false |
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 definitely agree disabling this is the right call!
|
||
# Inspired by: | ||
# https://github.com/rubocop-hq/rubocop-rspec/blob/cecc4b3f648002811c3956c1338431ecd4186aef/spec/shared/default_rspec_language_config_context.rb | ||
RSpec.shared_context "with default RSpec/Language config", :config do |
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.
We had an idea to extract this file into lib/
, so third-party gems can use it. A pull request is welcome if you decide to drop this file and use this shared context directly from rubocop-rspec
.
This PR updates our rubocop and rubocop-rspec dependencies to 1.0 and 2.0 respectively.
A change to how RSpec language elements are defined/configured (rubocop/rubocop-rspec#956) broke some of our custom RSpec cops as we can no longer do things like:
RuboCop::RSpec::Language::Examples::ALL
. I've updated these cops to use the new best-practices from the upgrade guides.rubocop-rspec
upgrade notesrubocop
upgrade notesNew Cops
Updating to
rubocop-rspec
v2.0 will enabled the following cops:RSpec/RepeatedExampleGroupBody
RSpec/RepeatedExampleGroupDescription
RSpec/EmptyHook
RSpec/VariableDefinition
RSpec/VariableName
RSpec/MultipleMemoizedHelpers
(disabled as we have lots of offenses)RSpec/RepeatedIncludeExample
RSpec/StubbedMock
prime: @jturkel