Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different Rubocop results based on local or CircleCI

I just started using Rubocop in my Ruby on Rails project and created a git branch to refactor and get Rubocop up to speed with what I want. I finally have no offenses in when I run the command

$ rubocop

However, I tried to integrate Rubocop into my CircleCI builds and that is where I am having trouble. Here is the relevant part of my circle.yml file:

test:
  post:
    - bundle exec rubocop

The issue is, locally Rubocop says it is inspecting 68 files but on CircleCI it says it is inspecting 5624 files. Because of that it is not passing. What would cause me to get a different output when running locally versus on CircleCI?

Also, if I run:

bundle exec rubocop

locally I get the output I am expecting (68 files, all good).

like image 718
ajk4550 Avatar asked May 24 '16 15:05

ajk4550


1 Answers

I figuring it out.

I'm not sure why, but for some reason on my local host it is ignoring the vendor file, but on CircleCI it was not so I added it to the .rubocop.yml file.

like image 102
ajk4550 Avatar answered Sep 30 '22 15:09

ajk4550