環境
問題
rubocopを動かそうとした。
bundle exec rubocop
以下のエラーが出た。
Error: The `Layout/IndentFirstArgument` cop has been renamed to `Layout/FirstArgumentIndentation`. (obsolete configuration found in /Users/<username>/rubybook/.rubocop.yml, please update it) The `Layout/TrailingBlankLines` cop has been renamed to `Layout/TrailingEmptyLines`. (obsolete configuration found in /Users/<username>/rubybook/.rubocop.yml, please update it) The `Lint/StringConversionInInterpolation` cop has been renamed to `Lint/RedundantStringCoercion`. (obsolete configuration found in /Users/<username>/rubybook/.rubocop.yml, please update it)
※<username>
部分は書き換えている。
解決
カレントディレクトリではなく、その2つ上の階層に.rubocop.yml
があり、それが邪魔をしているようだった。
なぜこのディレクトリに.rubocop.yml
を作ったのか覚えておらず、使ってもいないので削除した。
rm .rubocop.yml
これでrubocopが動くようになった。