feat: profile and visualize coverage of the current document (#1490)

* feat: draft

* feat: run coverage command in vscode

* feat: create and move location crate

* feat: run and visualize coverage

* feat: l10n
This commit is contained in:
Myriad-Dreamin 2025-03-15 11:49:51 +08:00 committed by GitHub
parent 99900b2c76
commit c96ea6d77f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 1668 additions and 471 deletions

View file

@ -188,6 +188,14 @@ impl Error {
pub fn arguments(&self) -> &[(&'static str, String)] {
self.err.args.as_deref().unwrap_or_default()
}
/// Returns the diagnostics attach to the error.
pub fn diagnostics(&self) -> Option<&[SourceDiagnostic]> {
match &self.err.kind {
ErrKind::RawDiag(diag) => Some(diag),
_ => None,
}
}
}
impl fmt::Display for Error {