You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Operating System: Ubuntu 18.04 via Remote:SSH extension on Win10
Using language server? (eg useLanguageServer is true?) Yes
Expected behavior
I have a rails project setup with rubocop as the linter & formatter, and the spring-commands-rubocop gem to try and speed things up. The linter portion of the extension for this setup works great, but there's no option to use the formatter with it. It'd be nice to have the same options for running formatters that there is for linters so this way I can specify my spring binstub for the rubocop formatter. Here's an example config of what I'd like:
And what the output of "Ruby Language Server" would show:
Lint: executing bin/rubocop -s /path/to/project/app/controllers/sessions_controller.rb -f json...
Running via Spring preloader in process XXXXX
Format: executing bin/rubocop -s /path/to/project/app/controllers/sessions_controller.rb -a...
Running via Spring preloader in process XXXXX
Actual behavior
The current behavior doesn't allow selecting a command path for the formatter, instead only supporting a toggle of running through bundle exec. This doesn't allow for formatters to be ran through spring, which could potentially save time on formatter execution.
Activity
mill1000 commentedon Oct 30, 2019
Would like to see this as well. Perhaps just an option for rubocop path which the linter and formatter can use.
Overload119 commentedon Nov 28, 2019
I would also like this.
I think the change just has to happen here.
vscode-ruby/server/src/formatters/RuboCop.ts
Line 9 in 9e1f537
MikeMcQuaid commentedon Dec 11, 2019
Also interested. Assuming you're using the language server the relevant code difference is:
vscode-ruby/packages/language-server-ruby/src/Linter.ts
Lines 27 to 48 in b232cfd
vs.
vscode-ruby/packages/language-server-ruby/src/Formatter.ts
Lines 29 to 54 in b232cfd
gstokkink-bex commentedon Apr 14, 2021
@wingrunr21 hi, just wondering if this is something you'd like to implement in the future? :) Could really help with rubocop-daemon integration.
fiveNinePlusR commentedon Oct 6, 2021
What are the issues that prevent rubocop from being fed a different or custom path for linting vs. formatting?