@@ -377,8 +377,7 @@ void linting_lsp_server_handler::config_document::on_text_changed(
377377
378378void linting_lsp_server_handler::lintable_document::on_text_changed (
379379 linting_lsp_server_handler& handler, string8_view document_uri_json) {
380- handler.linter_ .lint_and_get_diagnostics_notification (
381- *this , document_uri_json, handler.outgoing_messages_ );
380+ handler.linter_ .lint (*this , document_uri_json, handler.outgoing_messages_ );
382381}
383382
384383void linting_lsp_server_handler::unknown_document::on_text_changed (
@@ -477,8 +476,7 @@ void linting_lsp_server_handler::handle_text_document_did_open_notification(
477476 this ->write_configuration_loader_error_notification (
478477 document_path, config_file.error_to_string (), message_json);
479478 }
480- this ->linter_ .lint_and_get_diagnostics_notification (
481- *doc, uri->json , this ->outgoing_messages_ );
479+ this ->linter_ .lint (*doc, uri->json , this ->outgoing_messages_ );
482480
483481 doc_ptr = std::move (doc);
484482 } else if (this ->config_loader_ .is_config_file_path (document_path)) {
@@ -577,9 +575,8 @@ void linting_lsp_server_handler::lintable_document::on_config_file_changed(
577575 // TODO(strager): Don't copy document_uri if it contains only non-special
578576 // characters.
579577 // TODO(strager): Cache the result of to_json_escaped_string?
580- handler.linter_ .lint_and_get_diagnostics_notification (
581- *this , to_json_escaped_string_with_quotes (document_uri),
582- handler.outgoing_messages_ );
578+ handler.linter_ .lint (*this , to_json_escaped_string_with_quotes (document_uri),
579+ handler.outgoing_messages_ );
583580}
584581
585582void linting_lsp_server_handler::unknown_document::on_config_file_changed (
@@ -717,15 +714,14 @@ void linting_lsp_server_handler::write_invalid_request_error_response(
717714
718715lsp_linter::~lsp_linter () = default ;
719716
720- void lsp_linter::lint_and_get_diagnostics_notification (
721- linting_lsp_server_handler::lintable_document& doc, string8_view uri_json,
722- outgoing_lsp_message_queue& outgoing_messages) {
723- this ->lint_and_get_diagnostics_notification (
724- *doc.config , doc.lint_options , doc.doc .string (), uri_json,
725- doc.version_json , outgoing_messages);
717+ void lsp_linter::lint (linting_lsp_server_handler::lintable_document& doc,
718+ string8_view uri_json,
719+ outgoing_lsp_message_queue& outgoing_messages) {
720+ this ->lint (*doc.config , doc.lint_options , doc.doc .string (), uri_json,
721+ doc.version_json , outgoing_messages);
726722}
727723
728- void lsp_javascript_linter::lint_and_get_diagnostics_notification (
724+ void lsp_javascript_linter::lint (
729725 configuration& config, linter_options lint_options, padded_string_view code,
730726 string8_view uri_json, string8_view version_json,
731727 outgoing_lsp_message_queue& outgoing_messages) {
0 commit comments