This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
Support for ${workspaceRoot} in ruby.lint.rubocop.path #187
Labels
feature-request
Adds currently unsupported functionality
Your environment
vscode-ruby
version: 0.12.1Expected behavior
A common practice is to have a project's gems vendored, i.e. installed using
bundle install --path vendor/bundle --binstubs
.This enables each project to specify their own (potentially different) version of
rubocop
, rather than a single globally installed version.I'm trying to configure
vscode-ruby
to always lint my project's*.rb
files using the executable found in${workspaceRoot}/bin/rubocop
.Actual behavior
Attempt 1
vscode
settings.json
file:In the Developer Tools, the following messages are shown when vscode launches:
Linting fails because
vscode-ruby
is unable to find therubocop
executable, as the${workspaceRoot}
variable is not expanded/resolved.Attempt 2
vscode
settings.json
file:In the Developer Tools, the following messages are shown when vscode launches:
Despite this, linting does sometimes work, but not always.
I suspect that it is executing the command relative to
cwd
, so whencwd == workspaceRoot
it works, and whencwd !== workspaceRoot
it doesn't.There is an open issue regarding expanding/resolving variables in
settings.json
(microsoft/vscode#2809), but it has been discussed for over a year and doesn't seem to be nearing resolution any time soon.In lieu of this, some extensions such as the pythonVSCode implement their own support for expanding environment variables in their config.
Any chance of implementing something similar in
vscode-ruby
?The text was updated successfully, but these errors were encountered: