misogi / vscode-ruby-rubocop

Rubocop extension for Visual Studio Code
https://marketplace.visualstudio.com/items/misogi.ruby-rubocop
MIT License
137 stars 68 forks source link

FIX[123] Specify json format only when necessary #131

Closed ngouy closed 4 years ago

ngouy commented 4 years ago

Now json format doesn't include fixed code anymore. So I removed it from "getCommandArgs" and use it only when required

tested (on my machine) against rubocop v90 and 92, works on both

Fixes #129

ndbroadbent commented 4 years ago

Thanks @ngouy!! I just upgraded to RuboCop 0.93.1 so this is really helpful!

Until this is merged and released, here are the commands I ran to install the fork locally:

Make sure you uninstall the official RuboCop extension first.

cd ~/code
git clone https://github.com/ngouy/vscode-ruby-rubocop.git
cd vscode-ruby-rubocop
git checkout FIX-129-use-json-format-if-necessary
yarn install
npm install -g vsce
vsce package
code --install-extension ruby-rubocop-*.vsix

See also: https://code.visualstudio.com/api/working-with-extensions/publishing-extension

Now "format on save" is working again!


P.S. If anyone doesn't know about this already, I also highly recommend checking out: https://github.com/fohte/rubocop-daemon This makes my "format on save" work extremely fast, because it keeps a copy of rubocop running in the background. You should try setting up the bash wrapper script: https://github.com/fohte/rubocop-daemon#more-speed

jpaas commented 4 years ago

Bump. Any reason why this is not getting merged?

ngouy commented 4 years ago

I guess unavailable maintainer ATM?

misogi commented 4 years ago

Thanks for great contributing!