Skip to content

Commit d8eccfd

Browse files
committed
fix: add support for "in more detail"
1 parent ab00aa0 commit d8eccfd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

harper-core/src/linting/phrase_corrections.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,12 @@ pub fn lint_group() -> LintGroup {
621621
"Use singular `in detail` for referring to a detailed description.",
622622
"Correct unidiomatic plural `in details` to `in detail`."
623623
),
624+
"InMoreDetail" => (
625+
["in more details"],
626+
["in more detail"],
627+
"Use singular `in more detail` for referring to a detailed description.",
628+
"Correct unidiomatic plural `in more details` to `in more detail`."
629+
),
624630
});
625631

626632
group.set_all_rules_to(Some(true));
@@ -863,6 +869,11 @@ mod tests {
863869
assert_suggestion_result("in details", lint_group(), "in detail");
864870
}
865871

872+
#[test]
873+
fn in_more_detail_atomic() {
874+
assert_suggestion_result("in more details", lint_group(), "in more detail");
875+
}
876+
866877
#[test]
867878
fn in_detail_real_world() {
868879
assert_suggestion_result(
@@ -871,4 +882,13 @@ mod tests {
871882
"c++ - who can tell me \"*this pointer\" in detail?",
872883
);
873884
}
885+
886+
#[test]
887+
fn in_more_detail_real_world() {
888+
assert_suggestion_result(
889+
"Document the interface in more details · Issue #3 · owlbarn ...",
890+
lint_group(),
891+
"Document the interface in more detail · Issue #3 · owlbarn ...",
892+
);
893+
}
874894
}

0 commit comments

Comments
 (0)