Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
Merge branch 'master' of https://github.com/Automattic/harper into trail-and-error
hippietraile936ba18fbd6
diff --cc harper-core/src/linting/phrase_corrections.rsindex e17bc9fba,4a7ce043e..191c5db6b--- a/harper-core/src/linting/phrase_corrections.rs+++ b/harper-core/src/linting/phrase_corrections.rs@@@ -923,12 -923,18 +923,24 @@@ pub fn lint_group() -> LintGroup"Use `without` instead of `w/o`","Expands the abbreviation `w/o` to the full word `without` for clarity."),+ "ExpandBecause" => (+ ["cuz"],+ ["because"],+ "Use `because` instead of informal `cuz`",+ "Expands the informal abbreviation `cuz` to the full word `because` for formality."+ ),+ "AtFaceValue" => (+ ["on face value"],+ ["at face value"],+ "`at face value is more idiomatic and more common.",+ "Corrects `on face value` to the more usual `at face value`."+ ),+ "TrialAndError" => (+ ["trail and error"],+ ["trial and error"],+ "You misspelled `trial`.",+ "Corrects `trail` to `trial` in `trial and error`."+ ),});group.set_all_rules_to(Some(true));@@@ -1762,12 -1768,21 +1774,29 @@@ mod tests);}- #[test]+ fn expand_cuz() {+ assert_suggestion_result(+ "Stick around cuz I got a surprise for you at the end.",+ lint_group(),+ "Stick around because I got a surprise for you at the end.",+ );+ }++ #[test]+ fn correct_on_face_value() {+ assert_suggestion_result(+ "Obviously what you want is possible and on face value it's a trivial change on our end.",+ lint_group(),+ "Obviously what you want is possible and at face value it's a trivial change on our end.",+ );+ }+++ #[test]+ fn correct_trail_and_error() {+ assert_suggestion_result(+ "It was produced through trail and error.",+ lint_group(),+ "It was produced through trial and error.",+ );+ }}