In a diagnostic group, mark the highest-severity diagnostic as primary

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-11-18 15:53:00 +01:00
parent 401b59be5c
commit 0e51365770
7 changed files with 100 additions and 63 deletions

View file

@ -1716,6 +1716,7 @@ mod tests {
group_id: 0,
message: "message 1".to_string(),
severity: lsp::DiagnosticSeverity::ERROR,
is_primary: true
}
),
(
@ -1723,7 +1724,8 @@ mod tests {
&Diagnostic {
group_id: 1,
severity: lsp::DiagnosticSeverity::WARNING,
message: "message 2".to_string()
message: "message 2".to_string(),
is_primary: true
}
)
]