Open bobmaerten opened 3 months ago
Thanks for this report. We don't provide support for importing standard rules this way, so if you or (or someone else affected) would be able to take point on debugging the root cause and providing a PR, we'd be happy to merge it.
Hello there. 👋🏻
I have trouble running ruby-lsp from VSCode with a somehow tweaked rubocop config. I'm including Standard base.yml file as and inherited_gem.
Here the start of my
.rubocop.yml
file:And the error output of ruby-lsp
``` 2024-06-28 09:49:10.972 [info] (hcs) Ruby LSP Rails booting server 2024-06-28 09:49:10.972 [info] (hcs) /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/rubocop-1.64.1/lib/rubocop/config_loader.rb:205:in `absolute_path': no implicit conversion of nil into String (TypeError) File.absolute_path(file.is_a?(RemoteConfig) ? file.file : file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/rubocop-1.64.1/lib/rubocop/config_loader.rb:205:in `file_path' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/rubocop-1.64.1/lib/rubocop/config_loader.rb:48:in `load_file' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:60:in `config_for_plugin' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:42:in `block (2 levels) in combine_rubocop_configs' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:40:in `each' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:40:in `reduce' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:40:in `block in combine_rubocop_configs' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:137:in `fake_out_rubocop_default_configuration' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:39:in `combine_rubocop_configs' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/plugin/merges_plugins_into_rubocop_config.rb:30:in `call' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/creates_config_store/merges_user_config_extensions.rb:34:in `call' from /Users/bob/.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.39.0/lib/standard/creates_config_store.rb:23:in `block in call' fromIt seems to be related with changes made by #635 and #636 but I can't pinpoint the source problem. All I can tell is that fixing Standard version to 1.37.0 in my Gemfile fixes the problem ¯\(ツ)/¯