Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: in this/that regards→in this/that regard (#3482)
Andrew Dunbarfb6a23525d7a
diff --git a/harper-core/default_config.json b/harper-core/default_config.jsonindex bab72398e..29ac17fc3 100644--- a/harper-core/default_config.json+++ b/harper-core/default_config.json@@ -5159,6 +5159,13 @@"label": "Crave For"}},+ {+ "Bool": {+ "name": "InThisThatRegard",+ "state": true,+ "label": "In This/That Regard"+ }+ },{"Bool": {"name": "AsMuchAs",diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rsindex f90d3813d..241ca6fac 100644--- a/harper-core/src/linting/phrase_set_corrections/mod.rs+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs@@ -421,6 +421,15 @@ pub fn lint_group() -> LintGroup {"Corrects unidiomatic plural `in details` to `in detail`.",LintKind::Usage),+ "InThisThatRegard" => (+ &[+ ("in this regards", "in this regard"),+ ("in that regards", "in that regard"),+ ],+ "Use `in this/that regard` with singular `regard`.",+ "Corrects `in this/that regards` to `in this/that regard`.",+ LintKind::Usage+ ),"InflectionPoint" => (&[("infliction point", "inflection point"),diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rsindex 4391c6cf8..931a8cb96 100644--- a/harper-core/src/linting/phrase_set_corrections/tests.rs+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs@@ -1305,6 +1305,26 @@ fn in_more_detail_real_world() {);}+// InThisThatRegard++#[test]+fn fix_in_this_regards() {+ assert_suggestion_result(+ "I am testing many apps for our custom TROMjaro Linux, so I can be helpful in this regards.",+ lint_group(),+ "I am testing many apps for our custom TROMjaro Linux, so I can be helpful in this regard.",+ );+}++#[test]+fn fix_in_that_regards() {+ assert_suggestion_result(+ "Looks like that are all settings I can make in the Buderus in that regards.",+ lint_group(),+ "Looks like that are all settings I can make in the Buderus in that regard.",+ );+}+// InflectionPoint#[test]