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 an obsoletion misconfig that inadvertently blocks use of Layout/FirstParameterIndentation #7503

Merged
merged 1 commit into from
Nov 13, 2019

Conversation

maxh
Copy link
Contributor

@maxh maxh commented Nov 13, 2019

In April 2019, "Add IndentFirstArgument and IndentFirstParameter" #6982 forked the existing FirstParameterIndentation cop into two and added new argument-related functionality.

A few weeks ago, these two cops were renamed as part of broad renaming effort (#7077), and it just so happened IndentFirstParameter now has the name of the old pre-forked cop.

https://github.com/rubocop-hq/rubocop/pull/7468/files#diff-a19f978b95beb4caeb1831d6bef7e443R11

The obsoletion config now thinks the two forked cops are the same, but they are not. When I try to run RuboCop locally from master against our codebase, I get this spurious warning:

Error: The `Layout/FirstParameterIndentation` cop has been renamed to `Layout/FirstArgumentIndentation`.
(obsolete configuration found in .rubocop.yml, please update it)

This PR should fix that.


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.

@maxh maxh force-pushed the maxh/fix-upgrade-restriction branch from 68d5a0d to d9352a1 Compare November 13, 2019 02:56
@bbatsov bbatsov merged commit e473c05 into rubocop:master Nov 13, 2019
@bbatsov
Copy link
Collaborator

bbatsov commented Nov 13, 2019

Thanks!

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.

2 participants