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
I had a bad .rubocop.yml configuration and the LSP server wanted to show the error but it couldn't find the log method to use for that. I use VSCode with a rubocop extension (https://github.com/rubocop/vscode-rubocop) that uses the LSP.
I was able to workaround the issue by manually editing the LSP server source code on disk and adding a log method:
moduleRuboCopmoduleLsp# Language Server Protocol of RuboCop.# @api privateclassServer# Inserted method below...deflog(message)Logger.log(message)enddefinitialize(config_store)@reader=LanguageServer::Protocol::Transport::Io::Reader.new($stdin)@writer=LanguageServer::Protocol::Transport::Io::Writer.new($stdout)@runtime=RuboCop::Lsp::Runtime.new(config_store)@routes=Routes.new(self)end# ... more code ...endendend
Expected behavior
I expected to see some error log.
Actual behavior
LSP Server crashes because of missing method with the following output:
I had a bad
.rubocop.yml
configuration and the LSP server wanted to show the error but it couldn't find the log method to use for that. I use VSCode with a rubocop extension (https://github.com/rubocop/vscode-rubocop) that uses the LSP.I was able to workaround the issue by manually editing the LSP server source code on disk and adding a log method:
Expected behavior
I expected to see some error log.
Actual behavior
LSP Server crashes because of missing method with the following output:
I can't use
rubocop --debug
because the extension calls rubocop itself and I don't know how to modify it.Steps to reproduce the problem
.rubocop.yml
with faulty configuration like:RuboCop version
The text was updated successfully, but these errors were encountered: