How to use excludes for a specific rule in rubocop.yml

631 Views Asked by At
Metrics/BlockLength:
  Excludes:
    - '/app/**'

I have this .rubocop.yml, I am expecting rubocop to not to complain only for whatever files under app regarding the block length. But it still complains, is there something I am missing?

1

There are 1 best solutions below

1
On BEST ANSWER

I think you should use:

Metrics/BlockLength:
  Exclude:
    - "app/**/*"

http://rubocop.readthedocs.io/en/latest/configuration/#includingexcluding-files