Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
Merge branch 'master' into in-details
Elijah Potter309a799b1e19
diff --cc harper-core/src/linting/phrase_corrections.rsindex 30b916908,4e4b30a47..6067718b9--- a/harper-core/src/linting/phrase_corrections.rs+++ b/harper-core/src/linting/phrase_corrections.rs@@@ -615,18 -615,12 +615,24 @@@ 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`."+ ),+ "InMoreDetail" => (+ ["in more details"],+ ["in more detail"],+ "Use singular `in more detail` for referring to a detailed description.",+ "Correct unidiomatic plural `in more details` to `in more detail`."+ ),+ "Monumentous" => (+ ["monumentous"],+ ["momentous", "monumental"],+ "Retain `monumentous` for jocular effect. Otherwise `momentous` indicates great signifcance while `monumental` indicates imposing size.",+ "Advises using `momentous` or `monumental` instead of `monumentous` for serious usage."+ ),});group.set_all_rules_to(Some(true));@@@ -864,31 -858,17 +870,45 @@@ mod tests);}+ #[test]+ fn in_detail_atomic() {+ assert_suggestion_result("in details", lint_group(), "in detail");+ }++ #[test]+ fn in_more_detail_atomic() {+ assert_suggestion_result("in more details", lint_group(), "in more 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?",+ );+ }++ #[test]+ fn in_more_detail_real_world() {+ assert_suggestion_result(+ "Document the interface in more details · Issue #3 · owlbarn ...",+ lint_group(),+ "Document the interface in more detail · Issue #3 · owlbarn ...",+ );+ }+++ #[test]+ fn detect_monumentous_atomic() {+ assert_suggestion_result("monumentous", lint_group(), "momentous");+ }++ #[test]+ fn detect_monumentous_real_world() {+ assert_suggestion_result(+ "I think that would be a monumentous step in the right direction, and would DEFINATLY turn heads in not just the music industry, but every ...",+ lint_group(),+ "I think that would be a momentous step in the right direction, and would DEFINATLY turn heads in not just the music industry, but every ...",+ );+ }}