puppetlabs / rspec-puppet

RSpec tests for your Puppet manifests
https://puppetlabs.github.io/rspec-puppet/
MIT License
11 stars 18 forks source link

(maint) Exclude breaking rubocop versions #113

Closed gavindidrichsen closed 4 weeks ago

gavindidrichsen commented 4 weeks ago

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.

codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.80%. Comparing base (45fdce8) to head (7b47c59).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #113 +/- ## ======================================= Coverage 86.80% 86.80% ======================================= Files 35 35 Lines 2092 2092 ======================================= Hits 1816 1816 Misses 276 276 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

gavindidrichsen commented 4 weeks ago

Raised bug https://github.com/rubocop/rubocop-rspec/issues/1916