0

Having the following part in rubocop_todo.yml

Metrics/AbcSize:
  Max: 749

What i'd like to do, would be to add specific files that would have to respect the default (in other words : 'every files can reach mega-high Metrics/AbcSize, but the ones i'd like to improve)

Tried the following :

Metrics/AbcSize:
  Max: 749
  Exclude:
    - app/controllers/conversations_controller.rb

But nothing happens. Using Includes, same

I feel like the problem should be taken with another approach; but still I'm a bit stuck

thx in advance

Ben
  • 5,030
  • 6
  • 53
  • 94
  • From a quick google, `Exclude` should be what you need... have you made sure that the file-path is relative to the rubocop.yml file (not your rails root)? – Taryn East Apr 12 '18 at 23:32

1 Answers1

1

I wish you could use formatting in comments... but yeah like Taryn East said, make sure your rubocop.yml is in the root. For comparison's sake, here's some lines from my file:

AllCops:
  Exclude:
    - bin/**/*
    - db/*
    - spec/factories/**/*
    - tmp/**/*
    - vendor/**/*
Petercopter
  • 1,218
  • 11
  • 16