rubocop-rspec icon indicating copy to clipboard operation
rubocop-rspec copied to clipboard

Deprecate `IgnoredPatterns` option

Open ydah opened this issue 2 years ago ā€¢ 5 comments

Follow up https://github.com/rubocop/rubocop/pull/10555

This PR obsoletes the IgnoredPatterns option and replaces it with the AllowedPatterns option.


Before submitting the PR make sure the following are checked:

  • [x] Feature branch is up-to-date with master (if not - rebase it).
  • [x] Squashed related commits together.
  • [x] Added tests.
  • [x] Updated documentation.
  • [x] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • [x] The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • [-] Added the new cop to config/default.yml.
  • [-] The cop is configured as Enabled: pending in config/default.yml.
  • [-] The cop is configured as Enabled: true in .rubocop.yml.
  • [-] The cop documents examples of good and bad code.
  • [-] The tests assert both that bad code is reported and that good code is not reported.
  • [-] Set VersionAdded in default/config.yml to the next minor version.

If you have modified an existing cop's configuration options:

  • [x] Set VersionChanged in config/default.yml to the next major version.

ydah avatar Jul 26 '22 01:07 ydah

https://github.com/rubocop/rubocop/pull/10831 is required to resolve the build errors.

ydah avatar Jul 26 '22 01:07 ydah

Does it also mean that we should bump the minimum required version? The AllowedPatterns is available since 1.28 and we already depend on 1.31, but if deprecation is broken, perhaps we should wait for the next release and also add dependency on it?

Yes. That is the recognition. https://github.com/rubocop/rubocop/pull/10831 has not been released yet, so it looks like we will have to wait for the next release.

ydah avatar Jul 26 '22 08:07 ydah

https://github.com/rubocop/rubocop/pull/10831 is required to resolve the build errors.

Does it also mean that we should bump the minimum required version?

But it's not released yet. This is why CI / spec Ruby 2.7 (edge) (rubocop master) passes, but other builds don't.

Let's wait for the fix to be released and bump the dependency.

pirj avatar Jul 26 '22 09:07 pirj

Now we can incorporate this change:

  • https://github.com/rubocop/rubocop/releases/tag/v1.33.0

ydah avatar Aug 04 '22 10:08 ydah

we should also bump the minimum required rubocop version

Darhazer avatar Aug 04 '22 17:08 Darhazer

@Darhazer Sorry for the delay in responding. I updated this PR.

ydah avatar Aug 29 '22 06:08 ydah

@pirj / @Darhazer Iā€™d like extra eyes on this PR. šŸ™šŸ¼

bquorning avatar Sep 01 '22 07:09 bquorning