vscode-ruby version: 0.25.32.6.2rbenv1.38.1useLanguageServer is true?) YesWith the following in the user settings.json:
"ruby.lint": {
"rubocop": true
}
The following in the workspace settings.json should disable RuboCop:
"ruby.lint": {
"rubocop": false
}
RuboCop still runs.
Seeing this as well.
Thanks, will investigate
I am wondering if the reason is bc Standard uses Rubocop under the hood. Not sure if that helps at all but that was my first thought. Thanks for everything you do @wingrunr21!
Are these multi-root workspaces or single root?
@wingrunr21 single root for me. I had rubocop set to run in my global settings and standard to run in a workspace settings file. When I saw the behavior mentioned above, I commented out the global rubocop settings, and reloaded, but still saw rubocop attempting to run. I have an example of the behavior if a screenshot would help.
Did you also disable RuboCop in the workspace settings? Otherwise it will still be enabled and technically bundle exec rubocop... will work. That being said, it appears @erbridge has done just this and still sees the issue.
If you are able to throw up an example repo that'd really help. I just need to see what settings get communicated to the server as VSCode is the one that unifies the various settings at different scopes and then sends those to the server. I'm doing work to support machine scoped settings so if this is a bug I want to fix it before I ship that!
@wingrunr21 I disabled rubocop as well. I鈥檒l link you to a repo branch later this evening when I鈥檓 back at my computer.
@wingrunr21 here yah go: https://github.com/andrewmcodes/vscode-ruby-issue-531
FWIW I was running into this same issue with the following settings:
"ruby.useLanguageServer": true,
"ruby.lint": {
"rubocop": false,
"standard": true
}
When I removed the rubocop line altogether, rubocop stopped being run by the linter.
Yeah. My investigation suggests that the presence of any value for ruby.lint.rubocop in either settings file causes Rubocop to be run.
Also, I've only looked at single root environments.
Yeah. My investigation suggests that the presence of any value for
ruby.lint.rubocopin either settings file causes Rubocop to be run.
You're absolutely right. The boolean value in the linter config was basically ignored, causing the linter to always be active, as long as it's name was in the config. I opened a PR to remedy this situation.
With this change, the repository provided by @andrewmcodes also shows the expected behavior.
I will merge that PR when the builds pass
Most helpful comment
FWIW I was running into this same issue with the following settings:
When I removed the rubocop line altogether, rubocop stopped being run by the linter.