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

[Fix #7850] Make it possible to enable/disable pending cops #7856

Merged

Conversation

koic
Copy link
Member

@koic koic commented Apr 7, 2020

Resolves #7850.

This PR will add --enable-pending-cops and --disable-pending-cops command-line options and NewCops will be provided in .rubocop.yml.

When NewCops is enable, pending cops are enabled in bulk.

AllCops:
  NewCops: enable

Can be overridden by the --enable-pending-cops command-line option.

When NewCops is disable, pending cops are disabled in bulk.

AllCops:
  NewCops: disable

Can be overridden by the --disable-pending-cops command-line option.

The default value of NewCops is pending.


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.

Resolves rubocop#7850.

This PR will add `--enable-pending-cops` and `--disable-pending-cops`
command-line options and `NewCops` will be provided in .rubocop.yml.

When `NewCops` is `enable`, pending cops are enabled in bulk.

```yaml
AllCops:
  NewCops: enable
```

Can be overridden by the `--enable-pending-cops` command-line option.

When `NewCops` is `disable`, pending cops are disabled in bulk.

```yaml
AllCops:
  NewCops: disable
```

Can be overridden by the `--disable-pending-cops` command-line option.

The default value of `NewCops` is `pending`.
@koic koic force-pushed the add_enable_disable_pending_cops_options branch from d069622 to 544edbf Compare April 7, 2020 03:42
@bbatsov bbatsov merged commit 61090b1 into rubocop:master Apr 7, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Apr 7, 2020

Fantastic work, @koic! 🙇

@koic koic deleted the add_enable_disable_pending_cops_options branch April 7, 2020 06:45
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.

Make it possible to enable/disable pending cops via a configuration option
2 participants