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 1/2] 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()); } } From 27d1fe18648449087e7aff98bb2d21ac13631417 Mon Sep 17 00:00:00 2001 From: KeisukeYamashita <19yamashita15@gmail.com> Date: Tue, 8 Oct 2024 15:03:11 +0200 Subject: [PATCH 2/2] feat(web)!: make `ignore` default level for scope empty Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> --- web/src/content/docs/rules/scope-empty.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/content/docs/rules/scope-empty.md b/web/src/content/docs/rules/scope-empty.md index 9ed0c9c..65c55ce 100644 --- a/web/src/content/docs/rules/scope-empty.md +++ b/web/src/content/docs/rules/scope-empty.md @@ -3,7 +3,7 @@ title: Scope Empty description: Check if the scope exists --- -* Default: `error` +* Default: `ignore` ## ❌ Bad