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 has been archived by the owner on Jul 31, 2023. It is now read-only.
In a project we have Rubocop configured with --save-auto-correct in .rubocop configuration files. This should not break linting with vscode-ruby.
Actual behavior
When Rubocop is configure to autocorrect by default vscode-ruby errors with Lint: Received invalid JSON from rubocop when linting. The reason is, that rubocop adds the autocorrected version of the file at the end of the JSON output when invoked in stdin Mode.
The text was updated successfully, but these errors were encountered:
I'm not sure if this is something that should be handled. When should I respect the options in the .rubocop file and when should I override them?
I'd also recommend disabling autocorrect runs with the linter integration. As the linter is run by default on every change to the file buffer, it could cause the linter to be a bit slower as it is running a useless autocorrect.
In any case, RuboCop does not provide a command line option that will allow for overriding the autocorrect options. I can fix it by checking the output and figuring out where the end of the JSON occurs but for the same reasons I talked about in #447 I'd rather not.
Your environment
vscode-ruby
version: 0.22.3Expected behavior
In a project we have Rubocop configured with
--save-auto-correct
in.rubocop
configuration files. This should not break linting withvscode-ruby
.Actual behavior
When Rubocop is configure to autocorrect by default
vscode-ruby
errors withLint: Received invalid JSON from rubocop
when linting. The reason is, that rubocop adds the autocorrected version of the file at the end of the JSON output when invoked instdin
Mode.The text was updated successfully, but these errors were encountered: