Skip to content

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

feat(core): add rule for #777

Elijah Potter11eaa4cf5bda
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rs
index 73e0dbf87..d8cbb5c04 100644
--- a/harper-core/src/linting/phrase_corrections.rs
+++ b/harper-core/src/linting/phrase_corrections.rs
@@ -359,6 +359,12 @@ pub fn lint_group() -> LintGroup {
"Did you mean `got rid of`?",
"Ensures `got rid of` is used instead of `got rid off`."
),
+ "LastButNotLeast" => (
+ ["last but not the least", "last, but not the least", "last but, not least"],
+ ["last but not least"],
+ "Use the more idiomatic phrasing.",
+ "Corrects common errors in the phrase `last but not least`."
+ )
});
group.set_all_rules_to(Some(true));
@@ -518,4 +524,13 @@ mod tests {
fn point_is_moot() {
assert_suggestion_result("Your point is mute.", lint_group(), "Your point is moot.");
}
+
+ #[test]
+ fn issue_777() {
+ assert_suggestion_result(
+ "Last but not the least, with VS2013 you can use Web Essentials 2013",
+ lint_group(),
+ "Last but not least, with VS2013 you can use Web Essentials 2013",
+ );
+ }
}