This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Description
Your environment
-
vscode-ruby version: 0.22.3
-
Ruby version: 2.2.4
-
Ruby version manager (if any): None
-
VS Code version: 1.32.3
-
Operating System: Windows 10.0.16299 Build 16299
-
Using language server? Yes
Expected behavior
RuboCop linter functions normally using language server.
Actual behavior
Switched to using language server because of issue #262. Looks like rubocop was trying to find the excepted cops in the project folder rather than the correct directory.
Error message in "Output/Ruby Language Server":
[Info - 5:58:08 PM] Initializing Ruby language server...
[Info - 5:58:08 PM] Rebuilding tree-sitter for local Electron version
[Info - 5:58:08 PM] Rebuild succeeded!
Lint: executing rubocop.bat -s c:\tmp\test.rb -f json --except c:\tmp\Style\AsciiComments...
Lint: Received invalid JSON from rubocop:
Unrecognized cop or department: c:\tmp\Style\AsciiComments.
{"metadata":{"rubocop_version":"0.54.0","ruby_engine":"ruby","ruby_version":"2.2.4","ruby_patchlevel":"230","ruby_platform":"x64-mingw32"},"files":[],"summary":{"offense_count":0,"target_file_count":1,"inspected_file_count":0}}
Workspace setting:
{
"ruby.lint": {
"rubocop": {
"except": ["Style/AsciiComments"]
}
},
"ruby.useLanguageServer": true
}
This issue may be independent from scripts. A simple one that can reproduce the error:
# Comments with non-ascii character: ©