Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: add "turn for the worst"->"turn for the worse"
hippietraile2d6b74dae71
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rsindex 334b5879c..b0a68eaec 100644--- a/harper-core/src/linting/phrase_corrections.rs+++ b/harper-core/src/linting/phrase_corrections.rs@@ -633,6 +633,12 @@ pub fn lint_group() -> LintGroup {"Use `worse` for comparing. (`Worst` is for the extreme case)","Corrects `much worst` to `much worse` for proper comparative usage."),+ "TurnForTheWorse" => (+ ["turn for the worst"],+ ["turn for the worse"],+ "Use `turn for the worse` for a negative change in circumstances. Avoid the incorrect `turn for the worst`.",+ "Corrects the nonstandard `turn for the worst` to the idiomatic `turn for the worse`, used to describe a situation that has deteriorated."+ ),"WorseAndWorse" => (["worst and worst", "worse and worst", "worst and worse"],["worse and worse"],@@ -925,6 +931,18 @@ mod tests {);}#[test]+ fn detect_turn_for_the_worse_atomic() {+ assert_suggestion_result("turn for the worst", lint_group(), "turn for the worse");+ }+ #[test]+ fn detect_turn_for_the_worse_real_world() {+ assert_suggestion_result(+ "Very surprised to see this repo take such a turn for the worst.",+ lint_group(),+ "Very surprised to see this repo take such a turn for the worse.",+ );+ }+ #[test]fn detect_worst_and_worst_atomic() {assert_suggestion_result("worst and worst", lint_group(), "worse and worse");}