Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat: in need for→in need of (#1359)

Andrew Dunbar06eba6635aea
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rs
index 5a715d618..8e545861f 100644
--- a/harper-core/src/linting/phrase_corrections.rs
+++ b/harper-core/src/linting/phrase_corrections.rs
@@ -1278,6 +1278,12 @@ pub fn lint_group() -> LintGroup {
"This word has a more standard, more common synonym.",
"Suggests the more standard and common synonym `brutality`."
),
+ "InNeedOf" => (
+ ["in need for"],
+ ["in need of"],
+ "Use `in need of` for when something is required or necessary.",
+ "Corrects `in need for` to `in need of`."
+ ),
"PeaceOfMind" => (
["piece of mind"],
["peace of mind"],
@@ -2787,6 +2793,15 @@ mod tests {
)
}
+ #[test]
+ fn corrects_in_need_of() {
+ assert_suggestion_result(
+ "In need for a native control for map symbols (map legend) #5203.",
+ lint_group(),
+ "In need of a native control for map symbols (map legend) #5203.",
+ );
+ }
+
#[test]
fn corrects_piece_of_mind() {
assert_suggestion_result(