diff --git a/src/rules/if_change_then_change.rs b/src/rules/if_change_then_change.rs index 121f5c3..6131d57 100644 --- a/src/rules/if_change_then_change.rs +++ b/src/rules/if_change_then_change.rs @@ -97,11 +97,11 @@ pub fn ictc(hunks: &Vec) -> anyhow::Result> { severity: diagnostic::Severity::Error, code: "if-change-then-change".to_string(), message: format!( - "{}[{}, {}) was modified, but no if-change-then-change block in {} was modified", + "Expected change in {} because {}[{}, {}) was modified", + b.thenchange.display(), b.path.display(), b.begin, b.end, - b.thenchange.display() ), }) .collect(); diff --git a/src/rules/pls_no_land.rs b/src/rules/pls_no_land.rs index 0a21645..a4117d4 100644 --- a/src/rules/pls_no_land.rs +++ b/src/rules/pls_no_land.rs @@ -9,7 +9,7 @@ use std::io::{BufRead, BufReader}; use std::path::PathBuf; lazy_static::lazy_static! { - static ref RE: Regex = Regex::new(r"(?i)(DO[\s_-]+NOT[\s_-]+LAND)").unwrap(); + static ref RE: Regex = Regex::new(r"(?i)(DO[\s_-]*NOT[\s_-]*LAND)").unwrap(); } // Checks for $re and other forms thereof in source code @@ -44,7 +44,7 @@ fn pls_no_land_impl(path: &PathBuf) -> anyhow::Result