Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.rubocop.yml is not honored when mark_issues_in_view is set to true #25

Open
tmichel opened this issue Nov 6, 2014 · 7 comments
Open
Labels

Comments

@tmichel
Copy link

tmichel commented Nov 6, 2014

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.

@pderichs
Copy link
Owner

pderichs commented Mar 8, 2015

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)

@tmichel tmichel changed the title rubocop.yml is not honored when mark_issues_in_view is set to true .rubocop.yml is not honored when mark_issues_in_view is set to true Mar 8, 2015
@tmichel
Copy link
Author

tmichel commented Mar 8, 2015

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.

@pderichs
Copy link
Owner

I changed the behavior of the rubocop runner class within the plugin. Can you test again with the latest version? Thank you.

@pderichs
Copy link
Owner

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 😞

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".

@kuon
Copy link

kuon commented Jun 2, 2015

I do experience the same issue with rbenv.

@chuckbjones
Copy link

What about using the --force-exclusion flag to rubocop? (Perhaps that flag didn't yet exist when this issue was created?)

@chuckbjones
Copy link

Looks like --force-exclusion was created just for this purpose:
rubocop/rubocop#893

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants