@@ -377,8 +377,7 @@ void linting_lsp_server_handler::config_document::on_text_changed(
377
377
378
378
void linting_lsp_server_handler::lintable_document::on_text_changed (
379
379
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_ );
382
381
}
383
382
384
383
void linting_lsp_server_handler::unknown_document::on_text_changed (
@@ -477,8 +476,7 @@ void linting_lsp_server_handler::handle_text_document_did_open_notification(
477
476
this ->write_configuration_loader_error_notification (
478
477
document_path, config_file.error_to_string (), message_json);
479
478
}
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_ );
482
480
483
481
doc_ptr = std::move (doc);
484
482
} 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(
577
575
// TODO(strager): Don't copy document_uri if it contains only non-special
578
576
// characters.
579
577
// 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_ );
583
580
}
584
581
585
582
void linting_lsp_server_handler::unknown_document::on_config_file_changed (
@@ -717,15 +714,14 @@ void linting_lsp_server_handler::write_invalid_request_error_response(
717
714
718
715
lsp_linter::~lsp_linter () = default ;
719
716
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);
726
722
}
727
723
728
- void lsp_javascript_linter::lint_and_get_diagnostics_notification (
724
+ void lsp_javascript_linter::lint (
729
725
configuration& config, linter_options lint_options, padded_string_view code,
730
726
string8_view uri_json, string8_view version_json,
731
727
outgoing_lsp_message_queue& outgoing_messages) {
0 commit comments