Closed asbjornu closed 10 months ago
Yeah, that's the right place. Maybe you need to restart VSCode? I think results are being cached, but I didn't update the documentation to mention that. Sorry!
I've both restarted and updated VSCode and disabled and enabled the extension without any luck. I want to disable Ruby linting because it's not respecting the settings of .rubocop.yml
(in particular its Exclude
section). If the Ruby linter respected .rubocop.yml
configuration, I wouldn't need to disable it.
The ruby linter is just running the ruby interpreter. It doesn't support any kind of configuration.
cat samples/file.rb | ruby -wc
-:7: warning: assigned but unused variable - b
-:5: warning: assigned but unused variable - a
Syntax OK
These are my VSCode settings. As you can see in the screenshot below, it's respecting my settings and not showing any ruby or reek warnings.
Here's the same file, but with linters enabled.
I hope that helps!
Weird. This is what I see when I enable Linter:
As you can see, this error comes from RuboCop. Disabling Linter makes this error go away. But IIRC, Linter does not support RuboCop so this error does can't come from Linter? 🤔
@asbjornu
As you can see, this error comes from RuboCop. Disabling Linter makes this error go away. But IIRC, Linter does not support RuboCop so this error does can't come from Linter? 🤔
It does support rubocop. You need to add
"linter.linters": {
"ruby": {
"enabled": false
},
"rubocop": {
"enabled": false
}
},
to disable both of them
@jtmkrueger, setting the suggested rubocop
section in settings.json
and restarting VS Code indeed seems to have turned off RuboCop linting. Thanks!
In the documentation it says I can disable linters as such:
I've tried adding the above to VSCode's
settings.json
, but that didn't have any effect. Where and how is Linter supposed to be configured?