Rubocop CircleCI Config

How to fix issues with Rubocop running on your entire code base

Recently I was setting a new Rails project up on CircleCI to run Rubocop. When CircleCI was running it was running Rubocop against about 6000 files (while I know Rails projects can be big - they ain’t that big!). It took a bit of digging around online to find the solution so I thought I would share it with you.

So when CircleCI was running Rubocop, I found it was running it on all the dependencies and the gubbins of Rails. On investigating this I found that CircleCI installs everything in the vendor directory. So to stop it from happening I just had to exclude my vendor directory in my .rubocop.yml config file, like this:

AllCops:
  Exclude:
    - vendor/**/*

Recent posts View all

Freelancing

Why we have ads

We run ads on the site, this article talks about how we try and make them not terrible and why we monetise in the first place

Accessibility

Writing accessible hashtags

Write accessible hashtags by camel casing them. Because ThisReadsBetter thanthisdoes.