From 236bc9e5c5fef89323ff56d216e7e003e5d84452 Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:09:57 -0400 Subject: [PATCH] Fix linting --- lib/ruby_lsp/server.rb | 4 +++- test/server_test.rb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index fab031a23..7d4eaeeee 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -969,7 +969,9 @@ def perform_initial_indexing false end rescue StandardError => error - send_message(Notification.window_show_error("Error while indexing (see [troubleshooting steps](https://shopify.github.io/ruby-lsp/troubleshooting#indexing)): #{error.message}")) + message = "Error while indexing (see [troubleshooting steps]" \ + "(https://shopify.github.io/ruby-lsp/troubleshooting#indexing)): #{error.message}" + send_message(Notification.window_show_error(message)) end # Indexing produces a high number of short lived object allocations. That might lead to some fragmentation and diff --git a/test/server_test.rb b/test/server_test.rb index f4f5438c8..9c6cbef15 100644 --- a/test/server_test.rb +++ b/test/server_test.rb @@ -186,8 +186,10 @@ def test_initialized_recovers_from_indexing_failures notification = @server.pop_response assert_equal("window/showMessage", notification.method) + expected_message = "Error while indexing (see [troubleshooting steps]" \ + "(https://shopify.github.io/ruby-lsp/troubleshooting#indexing)): boom!" assert_equal( - "Error while indexing (see [troubleshooting steps](https://shopify.github.io/ruby-lsp/troubleshooting#indexing)): boom!", + expected_message, T.cast(notification.params, RubyLsp::Interface::ShowMessageParams).message, ) end