From 5796acc655acf0bd3406ffd46a6c358f688f4adf Mon Sep 17 00:00:00 2001 From: KeisukeYamashita <19yamashita15@gmail.com> Date: Tue, 8 Oct 2024 15:01:17 +0200 Subject: [PATCH] fix(cli)!: ignore empty scope by default Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> --- src/rule/scope_empty.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/rule/scope_empty.rs b/src/rule/scope_empty.rs index 96a5f00..d9fad1d 100644 --- a/src/rule/scope_empty.rs +++ b/src/rule/scope_empty.rs @@ -16,7 +16,7 @@ pub struct ScopeEmpty { /// ScopeEmpty represents the scope-empty rule. impl Rule for ScopeEmpty { const NAME: &'static str = "scope-empty"; - const LEVEL: Level = Level::Error; + const LEVEL: Level = Level::Ignore; fn message(&self, _message: &Message) -> String { "scope is empty".to_string() @@ -79,10 +79,7 @@ mod tests { let violation = rule.validate(&message); assert!(violation.is_some()); assert_eq!(violation.clone().unwrap().level, Level::Error); - assert_eq!( - violation.unwrap().message, - "scope is empty".to_string() - ); + assert_eq!(violation.unwrap().message, "scope is empty".to_string()); } #[test] @@ -101,9 +98,6 @@ mod tests { let violation = rule.validate(&message); assert!(violation.is_some()); assert_eq!(violation.clone().unwrap().level, Level::Error); - assert_eq!( - violation.unwrap().message, - "scope is empty".to_string() - ); + assert_eq!(violation.unwrap().message, "scope is empty".to_string()); } }