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

Require RuboCop 1.7 or higher due to support obsoletion configuration #235

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

koic
Copy link
Member

@koic koic commented Apr 21, 2021

Follow rubocop/rubocop#9206 and rubocop/rubocop#9143.

This PR requires RuboCop 1.7 or higher due to support obsoletion configuration and reverts 0e59891.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Follow rubocop/rubocop#9206 and
rubocop/rubocop#9143.

This PR requires RuboCop 1.7 or higher due to support obsoletion configuration
and reverts rubocop@0e59891.
@koic koic merged commit 29da900 into rubocop:master Apr 21, 2021
@koic koic deleted the support_obsoletion_configuration branch April 21, 2021 16:17
koic added a commit to koic/rubocop that referenced this pull request Apr 21, 2021
This PR reverts rubocop@b15e034.

The following tests will fail depending on the run tests sequence
when using RuboCop Performance to 1.11.0.

```console
% bundle exec rspec --seed 33314 ./spec/rubocop/config_obsoletion_spec.rb
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 33314
....F....

Failures:

  1) RuboCop::ConfigObsoletion#validate when the configuration includes
  any extracted cops when the extensions are not loaded prints a warning
  message
     Failure/Error: expect(expected_message).to eq(e.message)

       expected: "`Rails` cops have been extracted to the
       `rubocop-rails` gem.\n(obsolete configuration found in
       example/.rubocop.yml, please update it)"
            got: "`Performance` cops have been extracted to the
       `rubocop-performance` gem.\n(obsolete configuration fo... the
       `rubocop-rails` gem.\n(obsolete configuration found in
       example/.rubocop.yml, please update it)"

       (compared using ==)

       Diff:
       @@ -1,2 +1,4 @@
       +`Performance` cops have been extracted to the
       `rubocop-performance` gem.
       +(obsolete configuration found in example/.rubocop.yml, please
       update it)
        `Rails` cops have been extracted to the `rubocop-rails` gem.
        (obsolete configuration found in example/.rubocop.yml, please
       update it)

     # ./spec/rubocop/config_obsoletion_spec.rb:269:in `rescue in
       block (5 levels) in <top (required)>'
     # ./spec/rubocop/config_obsoletion_spec.rb:266:in `block (5 levels)
       in <top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:30:in `block (4 levels) in
       <top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:30:in `chdir'
     # ./lib/rubocop/rspec/shared_contexts.rb:30:in `block (3 levels) in
       <top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:7:in `block (2 levels) in
       <top (required)>'
     # ------------------
     # --- Caused by: ---
     # RuboCop::ValidationError:
     #   `Rails` cops have been extracted to the `rubocop-rails` gem.
     #   (obsolete configuration found in example/.rubocop.yml, please
       update it)
     #   ./lib/rubocop/config_obsoletion.rb:43:in `reject_obsolete!'

Finished in 0.16954 seconds (files took 0.94235 seconds to load)
9 examples, 1 failure

Failed examples:

rspec ./spec/rubocop/config_obsoletion_spec.rb:265 #
RuboCop::ConfigObsoletion#validate when the configuration includes any
extracted cops when the extensions are not loaded prints a warning
message

Randomized with seed 33314
```

RuboCop Performance upgrade to 1.11 is postponed until this test will be stable
in this repository.

rubocop/rubocop-performance#235 is RuboCop Performance
change related to the build error.
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.

1 participant