Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat: implements #746

hippietrailab00aa08e8a6
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rs
index a7c6c4742..31fda6cae 100644
--- a/harper-core/src/linting/phrase_corrections.rs
+++ b/harper-core/src/linting/phrase_corrections.rs
@@ -615,6 +615,12 @@ pub fn lint_group() -> LintGroup {
"Use `nerve-racking` for something that causes anxiety or tension.",
"Corrects common misspellings and missing hyphen in `nerve-racking`."
),
+ "InDetail" => (
+ ["in details"],
+ ["in detail"],
+ "Use singular `in detail` for referring to a detailed description.",
+ "Correct unidiomatic plural `in details` to `in detail`."
+ ),
});
group.set_all_rules_to(Some(true));
@@ -851,4 +857,18 @@ mod tests {
"It's nerve-racking to think about it because I have code inside the callback that resolves the member and somehow I feel like it's so ..",
);
}
+
+ #[test]
+ fn in_detail_atomic() {
+ assert_suggestion_result("in details", lint_group(), "in detail");
+ }
+
+ #[test]
+ fn in_detail_real_world() {
+ assert_suggestion_result(
+ "c++ - who can tell me \"*this pointer\" in details?",
+ lint_group(),
+ "c++ - who can tell me \"*this pointer\" in detail?",
+ );
+ }
}