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.
When running a rubocop linter, absolute paths are being passed to the command, causing the underlying command to fail and never return in the Ruby Language Server output panel.
Your environment
vscode-ruby version: 0.27.0
Ruby version: 2.7.1p83
Ruby version manager (if any): rvm
VS Code version: 1.47.3
Operating System: MacOS 10.15.5
Using language server? (eg useLanguageServer is true in your configuration?) true
Rubocop version: 0.88.0
Expected behavior
I would expect the linter to lint the file.
Actual behavior
The file does not lint, due to absolute paths being passed.
Running the command listed in the output panel
$ cat app/overrides/change_footer.rb | rubocop -s /Users/[REDACTED]/Library/Mobile Documents/com~apple~CloudDocs/path/to/project/app/overrides/change_footer.rb -f json -l
-s/--stdin requires exactly one path, relative to the root of the project. RuboCop will use this path to determine which cops are enabled (via eg. Include/Exclude), and so that certain cops like Naming/FileName can be checked.
Pipe source from STDIN. This is useful for editor integration. Takes one argument, a path, relative to the root of the project. RuboCop will use this path to determine which cops are enabled (via eg. Include/Exclude), and so that certain cops like Naming/FileName can be checked.
The text was updated successfully, but these errors were encountered:
After debugging further, it appears the problem stems from spaces in the document.uri. Because this is a valid file path on many OS's, (and one that cannot be changed in my specific use case), I will open a PR that will place the document.uri in single quotes
When running a rubocop linter, absolute paths are being passed to the command, causing the underlying command to fail and never return in the Ruby Language Server output panel.
Your environment
vscode-ruby
version: 0.27.0useLanguageServer
is true in your configuration?) trueExpected behavior
I would expect the linter to lint the file.
Actual behavior
The file does not lint, due to absolute paths being passed.
Running the command listed in the output panel
The passed path should be relative:
Relevant settings.json entries
Ruby Language Server output
Relevant Rubocop Info:
From official docs
The text was updated successfully, but these errors were encountered: