Skip to content

Commit

Permalink
fix(cli)!: ignore empty scope by default
Browse files Browse the repository at this point in the history
Signed-off-by: KeisukeYamashita <[email protected]>
  • Loading branch information
KeisukeYamashita committed Oct 8, 2024
1 parent 8acb4fe commit 5796acc
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/rule/scope_empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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]
Expand All @@ -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());
}
}

0 comments on commit 5796acc

Please sign in to comment.