standardrb / vscode-standard-ruby

The official VS Code extension for the Standard Ruby linter and code formatter
Other
101 stars 7 forks source link

General RuboCop offenses appear in problem list in VSCode 1.78.2 #11

Closed rbgrouleff closed 1 year ago

rbgrouleff commented 1 year ago

I am not entirely sure, this is related to the Standard extension, but I can't find anything else that somehow invokes RuboCop in VSCode.

After updating VSCode to v1.78.2, it seems like Standard has begun reporting RuboCop offenses like "Prefer single-quoted strings..." as well as Standard offenses like "Prefer double-quoted strings...".

The only Ruby related extensions, I have running, are Ruby LSP and Standard Ruby.

Standard is btw. autofixing the single quotes to double quotes, when saving.

VSCode version: 1.78.2 Ruby version: MRI 3.2.1 Standard version: 1.28.2 vscode-standard-ruby version: 0.0.15

The Ruby and Standard related VSCode settings, I have, are:

"[ruby]": {
    "editor.defaultFormatter": "testdouble.vscode-standard-ruby"
  },
  "standardRuby.mode": "enableViaGemfile",
  "rubyLsp.formatter": "none",
  "rubyLsp.rubyVersionManager": "asdf",
  "rubyLsp.enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": false
  }

The contents of my .standard.yml is:

ruby_version: 2.7

Screenshots of the problem lists:

Screenshot 2023-05-18 at 10 39 58 Screenshot 2023-05-18 at 10 28 18
searls commented 1 year ago

You probably want to set

rubyLsp.enabledFeatures": {
    "diagnostics": false
}

Since it only supports rubocop

rbgrouleff commented 1 year ago

That did the trick!

Thank you, and I'm sorry for bothering you with this 🙏