Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
Merge branch 'master' into along-time
Elijah Potter73d1e9aec936
diff --cc harper-core/src/linting/phrase_corrections.rsindex 1dd7bed5b,15822af55..8c26620c6--- a/harper-core/src/linting/phrase_corrections.rs+++ b/harper-core/src/linting/phrase_corrections.rs@@@ -751,12 -751,12 +751,18 @@@ pub fn lint_group() -> LintGroup"Use `as far back as` for referring to a time in the past.","Corrects nonstandard `as early back as` to `as far back as`."),+ "ALongTime" => (+ ["along time"],+ ["a long time"],+ "Use `a long time` for referring to a duration of time.",+ "Corrects `along time` to `a long time`."- )++ ),+ "EachAndEveryOne" => (+ ["each and everyone"],+ ["each and every one"],+ "Use `each and every one` for referring to a group of people or things.",+ "Corrects `each and everyone` to `each and every one`."+ ),});group.set_all_rules_to(Some(true));@@@ -1303,17 -1357,17 +1363,31 @@@ mod tests);}+ #[test]+ fn detect_a_long_time() {+ assert_suggestion_result("along time", lint_group(), "a long time");+ }++ #[test]+ fn detect_a_long_time_real_world() {+ assert_suggestion_result(+ "Fast refreshing is very slow had to wait along time for it to update.",+ lint_group(),+ "Fast refreshing is very slow had to wait a long time for it to update.",+ );+ }+++ #[test]+ fn detect_each_and_everyone() {+ assert_suggestion_result("each and everyone", lint_group(), "each and every one");+ }++ #[test]+ fn detect_each_and_everyone_real_world() {+ assert_suggestion_result(+ "I have modified each and everyone of them to keep only the best of the best!",+ lint_group(),+ "I have modified each and every one of them to keep only the best of the best!",+ );+ }}