How to setup RubyMine to use custom rubocop file?


I am using the RubyMine IDE for a rails project and want to configure RubyMine to use my custom .rubocop.yml file.

The only thing close to what I'm looking for that I could find is this rubocop page that describes how to add a rubocop action. The issue with this is that creating a rubocop action only allows for a single cop/formatter at a time. This is far from ideal since my custom .rubocop.yml file contains almost three hundred formatting rules.

A temporary workaround I have is to copy my .rubocop.yml file into the root directory of my project in RubyMine and then from a terminal at the root directory I can run rubocop path/to/file.rb to see all of the offenses. This also is not practical because running this manually on all files I'm editing across different directories is time consuming.

Does anyone know how to setup/configure RubyMine IDE to use a custom .rubocop.yml file? Additionally, it would be nice if the inspections tool that highlights offenses for the current file in scope indicates the offenses found via the custom .rubocop.yml.

Any help will be appreciated.   TellHappyStar



Please sign in to leave a comment.