Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix: Allow exception `need to match` for `NeedToNoun` (#2448)
Samuel Plumppu61aa31dde34b
diff --git a/harper-core/src/linting/need_to_noun.rs b/harper-core/src/linting/need_to_noun.rsindex ce5a8f195..10d3477b5 100644--- a/harper-core/src/linting/need_to_noun.rs+++ b/harper-core/src/linting/need_to_noun.rs@@ -31,7 +31,7 @@ impl Default for NeedToNoun {.t_any().t_any().t_any()- .then_word_set(&["be"]);+ .then_word_set(&["be", "match"]);let a = SequenceExpr::default().then_kind_where(|kind| kind.is_nominal())@@ -457,4 +457,17 @@ mod tests {NeedToNoun::default(),);}++ #[test]+ fn allows_need_to_match_2446() {+ assert_no_lints(+ "You don't need to match string errors explicitly.",+ NeedToNoun::default(),+ );+ }++ #[test]+ fn allows_need_to_match_exactly_2446() {+ assert_no_lints("They need to match exactly.", NeedToNoun::default());+ }}