Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
chore: add "arise the question" to "rise the question" linter (#2413)
Andrew Dunbar46a3c074410c
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rsindex 4be893b27..c88785b64 100644--- a/harper-core/src/linting/phrase_set_corrections/mod.rs+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs@@ -497,10 +497,16 @@ pub fn lint_group() -> LintGroup {),"RiseTheQuestion" => (&[- (&["rise the question"], &["raise the question"]),- (&["rises the question"], &["raises the question"]),- (&["risen the question", "rose the question"], &["raised the question"]),- (&["rising the question"], &["raising the question"])+ (&["rise the question", "arise the question"], &["raise the question"]),+ (&["rises the question", "arises the question"], &["raises the question"]),+ (+ &[+ "risen the question", "rose the question", "rised the question",+ "arisen the question", "arose the question", "arised the question"+ ],+ &["raised the question"]+ ),+ (&["rising the question", "arising the question"], &["raising the question"])],"Use `raise` instead of `rise` when referring to the act of asking a question.","Corrects `rise the question` to `raise the question`.",diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rsindex b2ad1aa82..0d81b585f 100644--- a/harper-core/src/linting/phrase_set_corrections/tests.rs+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs@@ -1566,7 +1566,7 @@ fn dont_correct_so_much_nerve_wreck() {// -raise the question-#[test]-fn detect_raise_the_question() {+fn detect_rise_the_question() {assert_suggestion_result("That would rise the question how to deal with syntax errors etc.",lint_group(),@@ -1574,9 +1574,18 @@ fn detect_raise_the_question() {);}+#[test]+fn detect_arise_the_question() {+ assert_suggestion_result(+ "As e.g. UTC+1, might arise the question whether it includes summer and winter time",+ lint_group(),+ "As e.g. UTC+1, might raise the question whether it includes summer and winter time",+ );+}+// -raises the question-#[test]-fn detect_raises_the_question() {+fn detect_rises_the_question() {assert_suggestion_result("However, this rises the question as to whether this test is conceptually sound.",lint_group(),@@ -1584,9 +1593,18 @@ fn detect_raises_the_question() {);}+#[test]+fn detect_arises_the_question() {+ assert_suggestion_result(+ "And it arises the question, why?",+ lint_group(),+ "And it raises the question, why?",+ );+}+// -raising the question-#[test]-fn detect_raising_the_question() {+fn detect_rising_the_question() {assert_suggestion_result("as soon as a infoHash query is performed, a Torrent file is retried, rising the question of:",lint_group(),@@ -1594,7 +1612,16 @@ fn detect_raising_the_question() {);}-// -rose the question-+#[test]+fn detect_arising_the_question() {+ assert_suggestion_result(+ "arising the question whether the requirement of wgpu::Features::DEPTH24PLUS_STENCIL8 is precise",+ lint_group(),+ "raising the question whether the requirement of wgpu::Features::DEPTH24PLUS_STENCIL8 is precise",+ );+}++// -raised the question-#[test]fn detect_rose_the_question() {assert_suggestion_result(@@ -1604,7 +1631,6 @@ fn detect_rose_the_question() {);}-// -risen the question-#[test]fn detect_risen_the_question() {assert_suggestion_result(@@ -1614,6 +1640,52 @@ fn detect_risen_the_question() {);}+#[test]+fn detect_rised_the_question() {+ assert_suggestion_result(+ "I rised the question to Emax Support and they just came back to me inmediately with the below response.",+ lint_group(),+ "I raised the question to Emax Support and they just came back to me inmediately with the below response.",+ );+}++#[test]+#[ignore = "Not actually an error after when it's 'there arose'"]+fn dont_fag_there_arose_the_question() {+ assert_suggestion_result(+ "Hello, while I have been using modals manager there arose the question related to customizing of modal header.",+ lint_group(),+ "Hello, while I have been using modals manager there arose the question related to customizing of modal header.",+ );+}++#[test]+fn detect_arised_the_question() {+ assert_suggestion_result(+ "and that fact arised the question in my mind, what does exactly is happening",+ lint_group(),+ "and that fact raised the question in my mind, what does exactly is happening",+ );+}++#[test]+fn detect_arose_the_question() {+ assert_suggestion_result(+ "This arose the question, could I store 32 digits on the stack?",+ lint_group(),+ "This raised the question, could I store 32 digits on the stack?",+ );+}++#[test]+fn detect_arisen_the_question() {+ assert_suggestion_result(+ "Some have arisen the question like how to use this wireless HD mini camera",+ lint_group(),+ "Some have raised the question like how to use this wireless HD mini camera",+ );+}+// ToToo// -a bridge too far-