Skip to content
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

Merged
merged 6 commits into from Nov 23, 2020

Conversation

erikkessler1
Copy link
Collaborator

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 notes
rubocop upgrade notes

New Cops

Updating to rubocop-rspec v2.0 will enabled the following cops:

prime: @jturkel

@erikkessler1 erikkessler1 changed the title Upgrade to rubocop 1.0 and rubocop 2.0 Upgrade to rubocop 1.0 and rubocop-rspec 2.0 Nov 20, 2020
Copy link
Member

@jturkel jturkel left a 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
Copy link
Member

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!

@erikkessler1 erikkessler1 merged commit 852f464 into master Nov 23, 2020
@erikkessler1 erikkessler1 deleted the update/rubocop-1.0 branch November 23, 2020 12:26

# 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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants