Skip to content

Commit

Permalink
Add obsolete message for renaming Layout/FirstParameterIndentation
Browse files Browse the repository at this point in the history
Follow up rubocop#6982.

This PR adds obsolete message for renaming `Layout/FirstParameterIndentation`.

The following is when `Layout/FirstParameterIndentation` is specified in
.rubocop.yml.

## Before

```console
% rubocop
Warning: unrecognized cop Layout/FirstParameterIndentation found in
.rubocop.yml
```

## After

```console
% rubocop
Error: The `Layout/FirstParameterIndentation` cop has been renamed to
`Layout/IndentFirstArgument`.
(obsolete configuration found in .rubocop.yml, please update it)
```
  • Loading branch information
koic authored and bbatsov committed Apr 28, 2019
1 parent c3a0f96 commit 326da99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rubocop/config.rb
Expand Up @@ -52,6 +52,9 @@ class Config
'The `Lint/SpaceBeforeFirstArg` cop has been removed, since it was a ' \
'duplicate of `Layout/SpaceBeforeFirstArg`. Please use ' \
'`Layout/SpaceBeforeFirstArg` instead.',
'Layout/FirstParameterIndentation' =>
'The `Layout/FirstParameterIndentation` cop has been renamed to ' \
'`Layout/IndentFirstArgument`.',
'Layout/SpaceAfterControlKeyword' =>
'The `Layout/SpaceAfterControlKeyword` cop has been removed. Please ' \
'use `Layout/SpaceAroundKeyword` instead.',
Expand Down

0 comments on commit 326da99

Please sign in to comment.