Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: look forward for→look forward to (#3109)
Andrew Dunbarab2d76c1a747
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rsindex 9d435a1e7..32b8986b6 100644--- a/harper-core/src/linting/phrase_set_corrections/mod.rs+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs@@ -417,6 +417,17 @@ pub fn lint_group() -> LintGroup {LintKind::Style),+ "LookForwardTo" => (+ &[+ ("look forward for", "look forward to"),+ ("looked forward for", "looked forward to"),+ ("looks forward for", "looks forward to"),+ ("looking forward for", "looking forward to")+ ],+ "The correct preposition in this phrase is `to`.",+ "Corrects `look forward for` to `look forward to`.",+ LintKind::Usage+ ),"MakeDoWith" => (&[("make due with", "make do with"),diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rsindex 1ceff09db..1c99780cc 100644--- a/harper-core/src/linting/phrase_set_corrections/tests.rs+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs@@ -1222,6 +1222,45 @@ fn litotes_more_preferable() {);}+// LookForwardTo++#[test]+fn fix_look_forward_for() {+ // I will mark this issue as an enhancement and will look forward for enrolling it.+ assert_suggestion_result(+ "I will mark this issue as an enhancement and will look forward for enrolling it.",+ lint_group(),+ "I will mark this issue as an enhancement and will look forward to enrolling it.",+ );+}++#[test]+fn fix_looked_forward_for() {+ assert_suggestion_result(+ "Looked forward for standalone components so much, please fix this.",+ lint_group(),+ "Looked forward to standalone components so much, please fix this.",+ );+}++#[test]+fn fix_looking_forward_for() {+ assert_suggestion_result(+ "Looking forward for Typed version of this stack navigation",+ lint_group(),+ "Looking forward to Typed version of this stack navigation",+ );+}++#[test]+fn fix_looks_forward_for() {+ assert_suggestion_result(+ "Please take this words as from one of your fans who looks forward for a great and interesting project :)",+ lint_group(),+ "Please take this words as from one of your fans who looks forward to a great and interesting project :)",+ );+}+// MakeDoWith#[test]