Closed erikdstock closed 7 years ago
Looking good so far! I was originally trying to address this, but I haven't had the time/motivation to tackle it recently. Thanks for doing this!
No prob! I'm still interested to hear how the command should differ under windows (bundle exec rubocop.bat
? bundle.bat exec rubocop
?) But otherwise the RubocopConfig
stuff should be pretty easy to test in isolation.
-Oh, and I'm not clear why the CI failed- it seems to have failed a test that I had removed... I'll look into that.
@erikdstock I can't speak with certainty about the .bat
executable interfaces, but the bundle exec
command expects the name of a binary executable to run. If rubocop.bat
is what win32
systems expect, we should probably continue to call rubocop in that way.
I'm not certain what a windows install of Rubocop would look like, but it does seem like something this project's CI suite should run against.
I'm looking forward to this feature. I hope it gets merged soon!
Just a bump here... I'm willing to say this PR is good to go, but maybe some folks want to check it out to review beforehand? Aside from the linked issues i've posted above I cannot find any consistent way of dealing with win32 support.
Just for the record, i have it tested with both bundler and executePath set to ...lib/ruby/gems/2.3.0/gems/rubocop-0.47.1/bin/
and it is working fine with both. Thanks for the review!
+1 on this. Trying out VS Code after finding RubyMine melting my CPU, and would be great to have Bundler support.
@misogi I think this PR is waiting on your 👍 or 👎 — thoughts?
This looks great to me too. I will check my environment, merge & release 0.5.0. Give me time.
RubocopConfig interface is great approach! I don't use extension in win32. I want to hear voice of win32 users.
executePath
option in the case of a win32 user, If this is alright I'd say this PR is ready.This PR updates vscode-ruby-rubocop to set the rubocop command with the following precedence:
Using bundler resolves many errors around changes to cop namespaces and configuration as well- see #51 and #43
It also takes advantage of the (unused?) RubocopConfig interface and moves configuration into a separate file, addressing the todo to leverage the onDidChangeConfiguration vscode hook.
Still needs test updates and clarification on how bundler works in a windows environment.