How to speed up Rubocop

A small bit of config that could speed up your Rubocop runs

Recently I’ve noticed that when I run Rubocop it seems to hang for ages before eventually running. This is not ideal when time could be better spent.

I had a look online and found this StackOverflow question with someone who had the same issue, which they ended up kindly answering as well. I put the following piece of configuration at the top of my .rubocop.yml file and it solved the issue:

inherit_mode:
  merge:
    - Exclude

This means that it won’t analyse files it shouldn’t i.e. node_modules.

Recent posts View all

Web DevProductivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help

Freelancing

Getting the most out of your agency

Here are some tips based on years of working with, for, and as an agency on how to get the most out of any work you do.