Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Sep 30, 2024
1 parent 2a1b338 commit 236bc9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/ruby_lsp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion test/server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 236bc9e

Please sign in to comment.