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

Ability to disable warning "no department given for MethodLength. Run rubocop -a --only Migration/DepartmentName to fix." #7717

Closed
morr opened this issue Feb 15, 2020 · 1 comment

Comments

@morr
Copy link

morr commented Feb 15, 2020

It is very hard for my little brain to remember namespaces for each rubocop rule I disable.

It is much easier to write

  def parse value # rubocop:disable MethodLength

rather than

  def parse value # rubocop:disable Metrics/MethodLength

And it is so annoying to manually run in console rubocop -a --only Migration/DepartmentName.
Please add ability to disable the nasty warning.

@bbatsov
Copy link
Collaborator

bbatsov commented Feb 15, 2020

RuboCop no longer supports ambiguous cop names (those without a department). As the namespace is actually a part of the cop name, this can't be changed.

@bbatsov bbatsov closed this as completed Feb 15, 2020
koic added a commit to koic/rubocop that referenced this issue Feb 17, 2020
This PR enables `Migration/DepartmentName` cop by default.

The cop has been added at rubocop#7385.

The cop will promote the migration to adding department name to cop name.
Omitting a department name will not be supported in the future,
so enabling this cop by default will facilitate the migration.

The PR was inspired by the following issue:

> RuboCop no longer supports ambiguous cop names (those without a department).

rubocop#7717 (comment)
bbatsov pushed a commit that referenced this issue Feb 17, 2020
This PR enables `Migration/DepartmentName` cop by default.

The cop has been added at #7385.

The cop will promote the migration to adding department name to cop name.
Omitting a department name will not be supported in the future,
so enabling this cop by default will facilitate the migration.

The PR was inspired by the following issue:

> RuboCop no longer supports ambiguous cop names (those without a department).

#7717 (comment)
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

No branches or pull requests

2 participants