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

Further cop name standardisation #7468

Merged
merged 24 commits into from Nov 2, 2019
Merged

Further cop name standardisation #7468

merged 24 commits into from Nov 2, 2019

Conversation

scottmatthewman
Copy link
Contributor

As discussed in #7077, some further cop renaming to assist with the path to v1.0.

Affected cops in this tranche:

  • Layout/AlignArguments -> Layout/ArgumentAlignment
  • Layout/AlignArray -> Layout/ArrayAlignment
  • Layout/AlignHash -> Layout/HashAlignment
  • Layout/AlignParameters -> Layout/ParameterAlignment
  • Layout/IndentAssignment -> Layout/AssingmentIndentation
  • Layout/IndentFirstArgument -> Layout/FirstArgumentIndentation
  • Layout/IndentFirstArrayElement -> Layout/FirstArrayElementIndentation
  • Layout/IndentFirstHashElement -> Layout/FirstHashElementIndentation
  • Layout/IndentFirstParameter -> Layout/FirstParameterIndentation
  • Layout/IndentHeredoc -> Layout/HeredocIndentation
  • Layout/LeadingBlankLines -> Layout/LeadingEmptyLines
  • Layout/TrailingBlankLines -> Layout/TrailingEmptyLines
  • Lint/DuplicatedKey -> Lint/DuplicateHashKey
  • Lint/HandleExceptions -> Lint/SuppressedException
  • Lint/MultipleCompare -> Lint/MultipleComparison
  • Lint/StringConversionInInterpolation -> RedundantStringCoercion
  • Naming/UncommunicativeBlockParamName -> Naming/BlockParameterName
  • Naming/UncommunicativeMethodParamName -> Naming/MethodParameterName

In addition:

  • RuboCop's own use of disable directives for Lint/HandleExceptions (now Lint/SuppressedException) are updated, with older enable/disable blocks replaced with end-of-line disable statements
  • As the list of renamed cops has grown substantially, the lists in config_obsoletion.rb and its associated RSpec file have been reordered alphabetically to make future additions and amendments easier.

@bbatsov
Copy link
Collaborator

bbatsov commented Oct 29, 2019

Great work! 🙇

@rubocop-hq/rubocop-core Any feedback/objections from anyone?

@bbatsov
Copy link
Collaborator

bbatsov commented Oct 29, 2019

Just one small thing - probably we should use VersionChanged instead of VersionAdded. It's still the same cop, just with a different name.

@bbatsov
Copy link
Collaborator

bbatsov commented Nov 2, 2019

@scottmatthewman ping :-)

@scottmatthewman
Copy link
Contributor Author

scottmatthewman commented Nov 2, 2019 via email

The new naming scheme for cops conflicts with the `HashAlignment` mixin,
so that is renamed `HashAlignmentStyles`. Technically it's only used in
one place so needn't even be a mixin, but making the smallest change
possible for now.
We had a mix of end-of-line disable comments and disable/enable blocks.
All are now changed to end-of-line comments.
They're still the same cops, just with different names.
See #7468 (comment)
@scottmatthewman
Copy link
Contributor Author

VersionAddeds restored, and rebased to master.

@bbatsov bbatsov merged commit 0848543 into rubocop:master Nov 2, 2019
bbatsov pushed a commit that referenced this pull request Nov 2, 2019
They're still the same cops, just with different names.
See #7468 (comment)
@bbatsov
Copy link
Collaborator

bbatsov commented Nov 2, 2019

Thanks! 🙇 🎉 🚀

sue445 added a commit to sue445/onkcop that referenced this pull request Nov 27, 2019
sue445 added a commit to sue445/onkcop that referenced this pull request Nov 27, 2019
sue445 added a commit to sue445/rubicure_api that referenced this pull request Nov 27, 2019
app2641 added a commit to grooves/forkwell_cop that referenced this pull request Nov 28, 2019
app2641 added a commit to grooves/forkwell_cop that referenced this pull request Nov 28, 2019
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