mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 05:34:58 +02:00
Use Severity::Warning for miette warnings (#16146)
# Description Changes miette warnings to use `Severity::Warning` instead of the default `Severity::Error`. This shows them in a different color and with a different icon: <img width="650" height="266" alt="image" src="https://github.com/user-attachments/assets/3ff0d3cf-ab1e-47f2-aff7-586ecea5a32a" /> # User-Facing Changes * Warnings now look less like errors
This commit is contained in:
@ -7,6 +7,7 @@ use thiserror::Error;
|
||||
use super::ReportMode;
|
||||
|
||||
#[derive(Clone, Debug, Error, Diagnostic, Serialize, Deserialize)]
|
||||
#[diagnostic(severity(Warning))]
|
||||
pub enum ParseWarning {
|
||||
#[error("{dep_type} deprecated.")]
|
||||
#[diagnostic(code(nu::parser::deprecated))]
|
||||
|
@ -1220,7 +1220,7 @@ This is an internal Nushell error, please file an issue https://github.com/nushe
|
||||
},
|
||||
|
||||
#[error("{deprecation_type} deprecated.")]
|
||||
#[diagnostic(code(nu::shell::deprecated))]
|
||||
#[diagnostic(code(nu::shell::deprecated), severity(Warning))]
|
||||
DeprecationWarning {
|
||||
deprecation_type: &'static str,
|
||||
suggestion: String,
|
||||
|
Reference in New Issue
Block a user