Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: once a while→once in a while (#1191)
Andrew Dunbar6cba852b17c7
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rsindex 1a37da545..f53044e51 100644--- a/harper-core/src/linting/phrase_corrections.rs+++ b/harper-core/src/linting/phrase_corrections.rs@@ -1177,6 +1177,12 @@ pub fn lint_group() -> LintGroup {"The correct term is `as well` with a space.","Corrects `aswell`, which should be written as two words."),+ "OnceInAWhile" => (+ ["once a while"],+ ["once in a while"],+ "The correct idiom is `once in a while`.",+ "Corrects `once a while`, which requires the word `in`."+ ),});group.set_all_rules_to(Some(true));@@ -2500,4 +2506,13 @@ mod tests {"format Cargo.toml as well #5893 - rust-lang/rustfmt",);}++ #[test]+ fn corrects_once_a_while() {+ assert_suggestion_result(+ "For me it is a SMB mount I have on the client device that I sync only once a while for a backup into the cloud.",+ lint_group(),+ "For me it is a SMB mount I have on the client device that I sync only once in a while for a backup into the cloud.",+ );+ }}