-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect inherit_gem
directive
#142
Comments
Hi @swiknaba, did you find a solution? we are having as similar problem :( |
sadly, I have no solution. Currently, I just enforce the rubocop config path in VSCode, and I've put that in a |
I resolve the same issue by upgrading my
|
Thanks really helpful. |
I started investigating an issue, and though it was related to #62 (comment), however, I believe "my" problem is a different one.
Assume a
.rubocop.yml
file as follows:(taken from https://github.com/toshimaru/rubocop-rails_config/#usage)
then this VSCode extension does not correctly inherit the settings from the rubocop-rails_config gem.
Docs for the
inherit_gem
directive: https://docs.rubocop.org/rubocop/configuration.html#inheriting-configuration-from-a-dependency-gemHow to test
Write code that follows the style of the said gem, but violates Rubocop default settings. Then
bundle exec rubocop
will succeed, but running rubocop:lint using this VSCode extension will fail.Setting the rubocop config path in VSCode to
~/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/bundler/gems/rubocop-rails_config-xxx/config/rails.yml
solves the problem, but is not desired, since it should support different settings for each repo, i.e. just leaving the field blank should resolve the local.rubocop.yml
file correctly.The text was updated successfully, but these errors were encountered: