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

[#5976] Warn for Rails Cops #7071

Merged
merged 1 commit into from
May 22, 2019
Merged

Conversation

koic
Copy link
Member

@koic koic commented May 21, 2019

This PR warns for Rails Cops.

The following warning is displayed when the next released rubocop gem is installed.

# The following is an example for operation check.
% rake build
Rails cops have been removed from RuboCop 0.71. Use the `rubocop-rails`
gem instead.

Put this in your `Gemfile`.

gem 'rubocop-rails'

And then execute:

$ bundle install

Put this into your `.rubocop.yml`.

require: rubocop-rails

More information: https://github.com/rubocop-hq/rubocop-rails
    exists /Users/koic/src/github.com/rubocop-hq/rubocop
Successfully installed rubocop-0.70.0
1 gem installed

Based on the migration of RuboCop Performance I am considering the following transition schedule.

  • 0.70 ... Current version
  • Next release ... Display a warning and prepare a transition period for users
  • 0.72 ... Remove the Rails cops from RuboCop Core

#6845 (comment)


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.

This PR warns for Rails Cops.

The following warning is displayed when the next released rubocop gem is
installed.

```console
# The following is an example for operation check.
% rake build
Rails cops have been removed from RuboCop 0.71. Use the `rubocop-rails`
gem instead.

Put this in your `Gemfile`.

```rb
gem 'rubocop-rails'
```

And then execute:

```sh
$ bundle install
```

Put this into your `.rubocop.yml`.

```yaml
require: rubocop-rails
```

More information: https://github.com/rubocop-hq/rubocop-rails
    exists /Users/koic/src/github.com/rubocop-hq/rubocop
Successfully installed rubocop-0.70.0
1 gem installed
```
@bbatsov bbatsov merged commit 4061660 into rubocop:master May 22, 2019
@bbatsov
Copy link
Collaborator

bbatsov commented May 22, 2019

Thanks!

@koic koic deleted the warn_for_rails_cops branch May 22, 2019 06:25
@tknzk tknzk mentioned this pull request Jan 1, 2020
8 tasks
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

2 participants