SublimeLinter / SublimeLinter-rubocop

SublimeLinter 3 plugin for Ruby, using rubocop.
MIT License
159 stars 40 forks source link

Ensure global exclusions are honored #30

Closed mhaylock closed 8 years ago

mhaylock commented 8 years ago

Something I overlooked with #29 is that rubocop by default ignores global exclusions if the file path has been explicitly provided, this is not the behaviour we want for editor linting.

I found this comment which highlights that --force-exclusion gives us the behaviour we want, so this PR adds that to the arguments passed into rubocop.

I specifically saw a problem on a project where I had the following in .rubocop.yml:

AllCops:
  Exclude:
    - 'db/schema.rb'

And when opening db/schema.rb I was seeing that rubocop was still listing the file. Testing locally, the changes in this PR fix that.

reconbot commented 8 years ago

good catch