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

Make custom cop inherit RuboCop::Cop::Base #6364

Merged
merged 1 commit into from Feb 10, 2023

Conversation

koic
Copy link
Contributor

@koic koic commented Feb 10, 2023

Follow rubocop/rubocop#7868.

What was the end-user or developer problem that led to this PR?

The legacy RuboCop::Cop::Cop API is soft deprecated and will be removed in RuboCop 2.0.

maintain any RuboCop extensions, as the legacy API will be removed in RuboCop 2.0.

https://metaredux.com/posts/2020/10/21/rubocop-1-0.html

What is your fix for the problem, implemented in this PR?

This PR makes custom cop inherit RuboCop::Cop::Base API instead.

I've confirmed that the following behavior is compatible:

$ bundle exec util/rubocop -r ./util/cops/deprecations --only Rubygems/Deprecations

Make sure the following tasks are checked

Follow rubocop/rubocop#7868.

The legacy `RuboCop::Cop::Cop` API is soft deprecated and
this PR makes custom cop inherit `RuboCop::Cop::Base` API instead.

> maintain any RuboCop extensions, as the legacy API
> will be removed in RuboCop 2.0.

https://metaredux.com/posts/2020/10/21/rubocop-1-0.html

I've confirmed that the following behavior is compatible:

```console
$ bundle exec util/rubocop -r ./util/cops/deprecations --only Rubygems/Deprecations
```
Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @koic!!

@deivid-rodriguez deivid-rodriguez merged commit b9331b8 into rubygems:master Feb 10, 2023
@koic koic deleted the use_cop_base_api branch February 11, 2023 00:17
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.

None yet

3 participants