1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rubocopがうまく動いてくれないときの対処

Posted at

Glavin001/atom-beautify
こちらでrubocopを使用しrubyの自動修正をしようとしたが、うまくいかなかったので対処したときのめも。

確認した点

ホーム直下に~/.rubocop.ymlがあるか

rubocopはプロジェクトのディレクトリにある.rubocop.ymlよりホームの設定ファイルを優先する。
なのでいったんホーム直下のものを消す。

rbenv使用の場合

プロジェクトの使用バージョンでrubocopがインストールされているか確かめる。
自分の場合インストールされてなかったので、インストールした。
プロジェクトごとにrubyバージョンが違う場合はこちらの対処で行けるかも。
だめならatomを再起動する。

備考

一通り確かめるときは、まずコマンドラインでうまくいくか確認し、次にatomで動作実行なり、デベロッパーコンソール起動で確かめると早くていいと思います。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?