rspec / rspec-support

Common code needed by the other RSpec gems. Not intended for direct use.
https://rspec.info
MIT License
95 stars 104 forks source link

Update to a version of Rubocop that is compatible with Ruby 2.4-3.1 #525

Closed petergoldstein closed 2 years ago

petergoldstein commented 2 years ago

This is an update to Rubocop that maintains compatibility with Ruby 2.4-3.1 using a common .rubocop_rspec_base.yml file across rspec-core, rspec-expectations, rspec-mocks, and rspec-support

Changes to this common base configuration file are minimal, limited to:

  1. Adding missing Departments for Cops
  2. Splitting/renaming Cop configurations where directed by Rubocop for pre-existing configurations.
  3. Removing a Performance cop configuration as that is now packaged in a separate library.

Each repo now has a .rubocop_todo.yml file which can be worked through at the maintainers leisure.

Some updates to the existing .rubocop.yml files were made, mostly in removing duplication and updating some variables so Rubocop would run green.

I also added some respond_to? guards for two undef statements.