Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/ruby_lsp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

module RubyLsp
class Server < BaseServer
NON_REPORTABLE_SETUP_ERRORS = [Bundler::GemNotFound, Bundler::GitError].freeze #: Array[singleton(StandardError)]
NON_REPORTABLE_SETUP_ERRORS = [
Bundler::GemNotFound,
Bundler::GitError,
Bundler::Dsl::DSLError,
].freeze #: Array[singleton(StandardError)]

# Only for testing
#: GlobalState
Expand Down
10 changes: 10 additions & 0 deletions test/server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,16 @@ def test_other_setup_errors_are_reported_to_telemetry
run_initialize_server_with_setup_error(StandardError.new("something unexpected"))
end

def test_dsl_error_setup_error_does_not_send_telemetry
RubyLsp::Notification.expects(:telemetry).never

run_initialize_server_with_setup_error(Bundler::Dsl::DSLError.new(
"There was an error parsing `Gemfile`: syntax errors found",
"Gemfile",
[],
))
end

def test_handles_editor_indexing_settings
capture_io do
@server.process_message({
Expand Down
Loading