Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: IIRC correctly→IIRC (#1566)
Andrew Dunbarb6f66f5b93a9
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dictindex 01b7ce355..55ec26280 100644--- a/harper-core/dictionary.dict+++ b/harper-core/dictionary.dict@@ -4753,6 +4753,7 @@ IDF/Og # Israel's militaryIE/ONJIED/N # improvised explosive deviceIEEE/O # standards organization+IIRC # If I recall correctlyIKEA/Og # furniture companyIL/NOIMF/Og # International Monetary Funddiff --git a/harper-core/src/linting/phrase_corrections/mod.rs b/harper-core/src/linting/phrase_corrections/mod.rsindex a7f9e1ed2..de8ec731b 100644--- a/harper-core/src/linting/phrase_corrections/mod.rs+++ b/harper-core/src/linting/phrase_corrections/mod.rs@@ -733,6 +733,11 @@ pub fn lint_group() -> LintGroup {"Use the correct phrase for someone who perseveres.","Ensures the correct use of `real trouper`, distinguishing it from `trooper`, which refers to a soldier or police officer."),+ "RedundantIIRC" => (+ ["if IIRC", "IIRC correctly"], ["IIRC"],+ "`IIRC` already means 'if I recall correctly', so adding 'if' or 'correctly' is redundant.",+ "Flags redundant use of 'if' or 'correctly' with 'IIRC', since 'IIRC' already stands for 'if I recall correctly'."+ ),"RifeWith" => (["ripe with"],["rife with"],diff --git a/harper-core/src/linting/phrase_corrections/tests.rs b/harper-core/src/linting/phrase_corrections/tests.rsindex bc3757c31..dd31f16de 100644--- a/harper-core/src/linting/phrase_corrections/tests.rs+++ b/harper-core/src/linting/phrase_corrections/tests.rs@@ -1005,6 +1005,35 @@ fn corrects_points_of_view() {// RealTrouper// -none-+// RedundantIIRC+#[test]+#[ignore = "The bug in replace_with_match_case erroneously generates `iiRC`."]+fn correct_if_iirc_caps() {+ assert_suggestion_result(+ "This is due to the fact that if IIRC up to 2 processes mpirun will bind to core and then it will be socket.",+ lint_group(),+ "This is due to the fact that IIRC up to 2 processes mpirun will bind to core and then it will be socket.",+ );+}++#[test]+fn correct_if_iirc() {+ assert_suggestion_result(+ "if iirc getting it to work with the SQLite storage engine was turning into a whole project and we decided to punt it",+ lint_group(),+ "iirc getting it to work with the SQLite storage engine was turning into a whole project and we decided to punt it",+ );+}++#[test]+fn correct_iirc_correctly() {+ assert_suggestion_result(+ "IIRC correctly, someone on the Home Assistant forums went as far as discovering that RS-485 was being used.",+ lint_group(),+ "IIRC, someone on the Home Assistant forums went as far as discovering that RS-485 was being used.",+ );+}+// RifeWith// -none-