mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:45:50 +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;
|
use super::ReportMode;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Error, Diagnostic, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Error, Diagnostic, Serialize, Deserialize)]
|
||||||
|
#[diagnostic(severity(Warning))]
|
||||||
pub enum ParseWarning {
|
pub enum ParseWarning {
|
||||||
#[error("{dep_type} deprecated.")]
|
#[error("{dep_type} deprecated.")]
|
||||||
#[diagnostic(code(nu::parser::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.")]
|
#[error("{deprecation_type} deprecated.")]
|
||||||
#[diagnostic(code(nu::shell::deprecated))]
|
#[diagnostic(code(nu::shell::deprecated), severity(Warning))]
|
||||||
DeprecationWarning {
|
DeprecationWarning {
|
||||||
deprecation_type: &'static str,
|
deprecation_type: &'static str,
|
||||||
suggestion: String,
|
suggestion: String,
|
||||||
|
Reference in New Issue
Block a user