diff --git a/libs/sqf/src/analyze/lints/s19_extra_not.rs b/libs/sqf/src/analyze/lints/s19_extra_not.rs index fd4e46f1..c1b51547 100644 --- a/libs/sqf/src/analyze/lints/s19_extra_not.rs +++ b/libs/sqf/src/analyze/lints/s19_extra_not.rs @@ -11,7 +11,7 @@ use crate::{analyze::SqfLintData, Expression, UnaryCommand}; crate::analyze::lint!(LintS19ExtraNot); impl Lint for LintS19ExtraNot { - fn ident(&self) -> &str { + fn ident(&self) -> &'static str { "extra_not" } @@ -19,11 +19,11 @@ impl Lint for LintS19ExtraNot { 190 } - fn description(&self) -> &str { + fn description(&self) -> &'static str { "Checks for extra not before a comparison" } - fn documentation(&self) -> &str { + fn documentation(&self) -> &'static str { r"### Example **Incorrect** @@ -109,9 +109,9 @@ impl Code for Code19ExtraNot { fn message(&self) -> String { "Unneeded Not".to_string() } - // fn label_message(&self) -> String { - // "".to_string() - // } + fn label_message(&self) -> String { + "unneeded not".to_string() + } fn diagnostic(&self) -> Option { self.diagnostic.clone() } diff --git a/libs/sqf/tests/snapshots/lints__simple_s19_extra_not.snap b/libs/sqf/tests/snapshots/lints__simple_s19_extra_not.snap index 340a9513..af4d04ff 100644 --- a/libs/sqf/tests/snapshots/lints__simple_s19_extra_not.snap +++ b/libs/sqf/tests/snapshots/lints__simple_s19_extra_not.snap @@ -6,4 +6,4 @@ expression: lint(stringify! (s19_extra_not)) ┌─ s19_extra_not.sqf:1:1 │ 1 │ ! (5 isEqualTo 6) - │ ^ Unneeded Not + │ ^ unneeded not