analyzer: Make new filesWithClientDiagnostics field private
Change-Id: I5ff762c54434fb81425275ef002b4186ceedc1dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341801
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
index cb97077..8dcd723 100644
--- a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
@@ -135,7 +135,7 @@
/// This is an optimization to avoid sending empty diagnostics when they are
/// unnecessary (at startup, when a file is re-analyzed because a file it
/// imports was modified, etc).
- final Set<String> filesWithClientDiagnostics = {};
+ final Set<String> _filesWithClientDiagnostics = {};
/// Initialize a newly created server to send and receive messages to the
/// given [channel].
@@ -632,15 +632,15 @@
}
void publishDiagnostics(String path, List<Diagnostic> errors) {
- if (errors.isEmpty && !filesWithClientDiagnostics.contains(path)) {
+ if (errors.isEmpty && !_filesWithClientDiagnostics.contains(path)) {
// Don't sent empty set if client is already empty.
return;
}
if (errors.isEmpty) {
- filesWithClientDiagnostics.remove(path);
+ _filesWithClientDiagnostics.remove(path);
} else {
- filesWithClientDiagnostics.add(path);
+ _filesWithClientDiagnostics.add(path);
}
final params = PublishDiagnosticsParams(