IDEA/RubyMineでrubocopを使う方法
rubocopってのは、ソースコードがコーディング規約に則しているか監視する為のツール
rubocop自身のgithubのリポジトリはこちら
bbatsov/rubocop · GitHub
普段使っているのはIDEAなので、jetbrain製品で動かすときには、どうしたらええんじゃ。
ということで、調べてみると、
jetbrain製品用のプラグインがすでに存在しているっぽい
sirlantis/rubocop-for-rubymine · GitHub
インストール
上記のリンクを見てみると、こんなかんじに書かれてた。
Installation
Download the .zip
Got to the Plugins-Settings in your IDE (IDEA/RubyMine).
Click "Install plugins from disk..."
Select the ZIP
Restart the IDE
Wait a few seconds for the IDE to load and give Rubocop some time to inspect the current file.
Hover your mouse over highlighted issues to see the warning/error message.
You have to save a file to trigger re-validation of your file.
見る限り直接プラグインをダウンロードしてきて、入れないといけないっぽい。
DL先は、githubページにも書いてあるんだけれども、下記でリンクらしくて、ここから最新のzipを落としてきて、
あとは、pluginを入れる画面で、「Install plugins from disk...」をすれば良いっぽい。
Releases · sirlantis/rubocop-for-rubymine · GitHub
ちなみに、自分は、v2.0.0.rc1のバージョンを入れました。
おわり