Skip to content

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

feat: the worse thing→the worst thing (#4800)

Andrew Dunbar20fe33b76e7e
diff --git a/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs b/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs
index 2e0518139..8c84235ee 100644
--- a/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs
@@ -2168,6 +2168,16 @@ fn detect_at_worst_atomic() {
);
}
+// -the worst thing-
+#[test]
+fn detect_the_worse_thing() {
+ assert_suggestion_result(
+ "A 16-32 decoder is pretty simple, a 16-32-48 isn't the worse thing in the world",
+ test_linter(),
+ "A 16-32 decoder is pretty simple, a 16-32-48 isn't the worst thing in the world",
+ );
+}
+
// -worst case scenario-
#[test]
fn correct_worse_case_space() {
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index caeada259..f14bc7b68 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -1256,6 +1256,7 @@ pub fn lint_group() -> LintGroup {
(&["worst than"], &["worse than"]),
// worse -> worst
(&["at worse"], &["at worst"]),
+ (&["the worse thing"], &["the worst thing"]),
(&["worse case scenario", "worse-case scenario", "worse-case-scenario"], &["worst-case scenario"]),
(&["worse ever"], &["worst ever"]),
],