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

(maint) Exclude breaking rubocop versions #460

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

gavindidrichsen
Copy link
Contributor

@gavindidrichsen gavindidrichsen commented Jun 10, 2024

The latest versions of rubocop-factory_bot and rubocop-respec_rails are causing rubocop-rspec to break with something like the following:

➜  dependency_checker git:(main) bundle exec rubocop
Error: Property AutoCorrect of cop FactoryBot/CreateList is supposed to be a boolean and contextual is not.
➜  dependency_checker git:(main) 

Manually correcting the above gems fixes the issue with:

➜  gems git:(main) ✗ git diff
diff --git a/rubocop-factory_bot-2.26.0/config/default.yml b/rubocop-factory_bot-2.26.0/config/default.yml
index 24d5ebb..60827e7 100644
--- a/rubocop-factory_bot-2.26.0/config/default.yml
+++ b/rubocop-factory_bot-2.26.0/config/default.yml
@@ -49,7 +49,7 @@ FactoryBot/ConsistentParenthesesStyle:
 FactoryBot/CreateList:
   Description: Checks for create_list usage.
   Enabled: true
-  AutoCorrect: contextual
+  AutoCorrect: false
   Include:
     - "**/*_spec.rb"
     - "**/spec/**/*"
diff --git a/rubocop-rspec_rails-2.29.0/config/default.yml b/rubocop-rspec_rails-2.29.0/config/default.yml
index 51ec888..a39bd20 100644
--- a/rubocop-rspec_rails-2.29.0/config/default.yml
+++ b/rubocop-rspec_rails-2.29.0/config/default.yml
@@ -66,7 +66,7 @@ RSpecRails/MinitestAssertions:
 
 RSpecRails/NegationBeValid:
   Description: Enforces use of `be_invalid` or `not_to` for negated be_valid.
-  AutoCorrect: contextual
+  AutoCorrect: false
   Safe: false
   EnforcedStyle: not_to
   SupportedStyles:
➜  gems git:(main) ✗ pwd
/Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/@products/devx_tools/repos/dependency_checker/.direnv/ruby/gems/ruby/3.3.0/gems
➜  gems git:(main) ✗ 

Therefore excluding the latest version until this is fixed.

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.74%. Comparing base (67c419f) to head (587b84e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #460   +/-   ##
=======================================
  Coverage   41.74%   41.74%           
=======================================
  Files          10       10           
  Lines         678      678           
=======================================
  Hits          283      283           
  Misses        395      395           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gavindidrichsen gavindidrichsen changed the title (maint) Exclude breaking versions of rubocop-factory_bot, rubocop-rsp… (maint) Exclude breaking rubocop versions Jun 10, 2024
@gavindidrichsen gavindidrichsen marked this pull request as ready for review June 10, 2024 11:22
@gavindidrichsen gavindidrichsen requested review from bastelfreak and a team as code owners June 10, 2024 11:22
@jordanbreen28 jordanbreen28 merged commit 453910a into main Jun 10, 2024
10 checks passed
@jordanbreen28 jordanbreen28 deleted the maint_exclude_rubocop_versions branch June 10, 2024 11:40
@bastelfreak
Copy link
Collaborator

I think instead of pinning the two gems I think it makes more sense to use a meta gem like #458 and do the pinning on the meta gem.

@gavindidrichsen
Copy link
Contributor Author

Thanks for the suggestion @bastelfreak! @jordanbreen28 also mentioned this when we saw the issue, so we'll be discussing this in the next few days. Cheers!

@gavindidrichsen
Copy link
Contributor Author

Also, Raised bug rubocop/rubocop-rspec#1916

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

Successfully merging this pull request may close these issues.

3 participants