misogi / vscode-ruby-rubocop

Rubocop extension for Visual Studio Code
https://marketplace.visualstudio.com/items/misogi.ruby-rubocop
MIT License
137 stars 68 forks source link

Plugin reports misleading rubocop path used #135

Open Epigene opened 4 years ago

Epigene commented 4 years ago

what happens If I misconfigure my rubocop.yml and save a ruby file to trigger linting, vscode-rubocop shows some random rubocop path /Users/augusts/.rvm/gems/ruby-2.3.4/bin/rubocop in the warning message. misleading

I don't think I have Ruby 2.3.4 installed, though maybe it's some system version.

what I expected to happen vscode-rubocop should report the actual rubocop path used, which is /Users/augusts/.rvm/gems/ruby-2.7.1/bin/rubocop, since I have "ruby.rubocop.executePath": "/Users/augusts/.rvm/gems/ruby-2.7.1/bin/" in settings.

env macOS Catalina 10.15.7 vscode-ruby-rubocop v0.8.5

$ code -v
1.51.1
e5a624b788d92b8d34d1392e4c4d9789406efe8f
x64

$ rvm list
   ruby-2.5.1 [ x86_64 ]
   ruby-2.5.3 [ x86_64 ]
   ruby-2.6.1 [ x86_64 ]
   ruby-2.6.3 [ x86_64 ]
=* ruby-2.7.1 [ x86_64 ]