Make disabled diagnostics an argument of corresponding function

This commit is contained in:
Igor Aleksanov
2020-08-18 13:32:29 +03:00
parent c26c911ec1
commit b56cfcca10
7 changed files with 43 additions and 39 deletions

View File

@@ -363,6 +363,14 @@ impl Config {
self.client_caps.status_notification = get_bool("statusNotification");
}
}
pub fn disabled_diagnostics(&self) -> Option<HashSet<String>> {
if self.analysis.disabled_diagnostics.is_empty() {
None
} else {
Some(self.analysis.disabled_diagnostics.clone())
}
}
}
#[derive(Deserialize)]