From 326da99335126fbc3d1b6826f8ed32c32ab322e9 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 28 Apr 2019 13:13:49 +0900 Subject: [PATCH] Add obsolete message for renaming `Layout/FirstParameterIndentation` Follow up #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) ``` --- lib/rubocop/config.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rubocop/config.rb b/lib/rubocop/config.rb index 5136ca209fe..395cfe46ab4 100644 --- a/lib/rubocop/config.rb +++ b/lib/rubocop/config.rb @@ -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.',