Open tmichel opened 9 years ago
Sorry, I am not able to reproduce that.
Which version of ST are you using? Do you use rvm, rbenv or your own command?
Just making sure it is just a typo in your title: The file is correctly named .rubocop.yml
, right? (note the point in front of rubocop)
The title was only a typo. Sorry about that.
I'm using my own command, simply pointing at the binary with an absolute path. I'm using chruby, sublime text 3 beta (build 3065) on OS X.
The custom command was necessary because of OS X stupidity with paths.
I changed the behavior of the rubocop runner class within the plugin. Can you test again with the latest version? Thank you.
Update: I can confirm the problem now.
The plugin calls rubocop with the current file to update the marks in the view. If rubocop is called with a single file, it ignores the .rubocop.yml.
So this is a bug in the plugin :disappointed:
I have some ideas how to fix that and make a decision soon. Until then I would suggest turning the marks on and off depending on the file you are currently viewing. You can do that with the menu command "RuboCop: Toggle auto check".
I do experience the same issue with rbenv.
What about using the --force-exclusion
flag to rubocop? (Perhaps that flag didn't yet exist when this issue was created?)
Looks like --force-exclusion
was created just for this purpose:
https://github.com/bbatsov/rubocop/issues/893
This is especially annoying with generated files such as
schema.rb
over which I do not have any control.It would be really nice if the config file would be honored or I could toggle auto-check on a per-file basis.
Thanks.