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

PersonalWeb Dev

X-Clacks-Overhead

We now support the X-Clacks-Overhead, or, the internet as a tool to not forget

JavaScript

Setting a more specific database type in Prisma

Prisma sets a default of TEXT for all String fields, here is how you can override that.