Skip to content

Commit

Permalink
feat: Improve warning on overlapping regex matches
Browse files Browse the repository at this point in the history
  • Loading branch information
VorpalBlade committed May 11, 2024
1 parent aa30a9b commit fe1d270
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ where
if re_matches.matched_any() {
let matches: Vec<_> = re_matches.iter().collect();
if matches.len() != 1 && self.warn_on_multiple_matches {
warn!(target: "ini-merge", "Overlapping regex matches for {section}/{key}, first action taken");
warn!(target: "ini-merge",
"Overlapping regex matches for {section}/{key}, first action taken. If this is intentional add the no-warn-multiple-key-matches directive");
}
let m = matches.first().unwrap();
return Some(Cow::Borrowed(self.regex_actions.get(*m).unwrap()));
Expand Down

0 comments on commit fe1d270

Please sign in to comment.