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 was archived by the owner on Jul 31, 2023. It is now read-only.
Repository navigation
This repository was 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.
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
Activity
coneybeare commentedon Aug 6, 2020
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 thedocument.uriin single quoteswingrunr21 commentedon Aug 7, 2020
That's the wrong formatter if you are using the language server, FYI
github-actions commentedon Sep 7, 2020
This issue has not had activity for 30 days. It will be automatically closed in 7 days.