feat: improve performance by delaying computation of fixes for diagnostics
This commit is contained in:
@@ -57,7 +57,8 @@ pub fn diagnostics(
|
||||
let crate_name =
|
||||
module.krate().display_name(db).as_deref().unwrap_or("unknown").to_string();
|
||||
println!("processing crate: {}, module: {}", crate_name, _vfs.file_path(file_id));
|
||||
for diagnostic in analysis.diagnostics(&DiagnosticsConfig::default(), file_id).unwrap()
|
||||
for diagnostic in
|
||||
analysis.diagnostics(&DiagnosticsConfig::default(), false, file_id).unwrap()
|
||||
{
|
||||
if matches!(diagnostic.severity, Severity::Error) {
|
||||
found_error = true;
|
||||
|
||||
@@ -1182,7 +1182,7 @@ pub(crate) fn publish_diagnostics(
|
||||
|
||||
let diagnostics: Vec<Diagnostic> = snap
|
||||
.analysis
|
||||
.diagnostics(&snap.config.diagnostics(), file_id)?
|
||||
.diagnostics(&snap.config.diagnostics(), false, file_id)?
|
||||
.into_iter()
|
||||
.map(|d| Diagnostic {
|
||||
range: to_proto::range(&line_index, d.range),
|
||||
|
||||
Reference in New Issue
Block a user