-1

I installed gem 'rubocop', '~> 0.67.2' on my rails app and now I want to add some files to rubocom.yml/Exclude so that Rubocop don't track them. I put it in the root of my app

rubocop.yml

AllCops:
  Exclude:
  - 'db/**/*'
  - 'config/**/*'
  - 'script/**/*'
  - 'bin/{rails,rake}'

but still when I run 'rubocop' command in my terminal, those files are still shown as tracked. What am I missing?

synopsa
  • 75
  • 1
  • 8

1 Answers1

1

I believe your .yml formatting is incorrect, you need to have indentation for array elements, like

AllCops:
  Exclude:
    - 'db/**/*'
    - 'config/**/*'
    - 'script/**/*'
    - 'bin/{rails,rake}'
Md. Farhan Memon
  • 6,055
  • 2
  • 11
  • 36