Skip to content

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

feat:at worse→at worst (#1797)

Andrew Dunbaraa7422ebb612
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index 2f07f2fb8..a680d2652 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -381,6 +381,7 @@ pub fn lint_group() -> LintGroup {
(&["worst and worst", "worse and worst", "worst and worse"], &["worse and worse"]),
(&["worst than"], &["worse than"]),
// worse -> worst
+ (&["at worse"], &["at worst"]),
(&["worse case scenario", "worse-case scenario", "worse-case-scenario"], &["worst-case scenario"]),
(&["worse ever"], &["worst ever"]),
],
diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rs
index d55d36d69..973bef694 100644
--- a/harper-core/src/linting/phrase_set_corrections/tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs
@@ -1365,6 +1365,16 @@ fn detect_worse_and_worst_real_world() {
);
}
+// -at worst-
+#[test]
+fn detect_at_worst_atomic() {
+ assert_suggestion_result(
+ "Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.",
+ lint_group(),
+ "Partial moving of core objects to interpreter state is incorrect at best, unsafe at worst.",
+ );
+}
+
// -worst case scenario-
#[test]
fn correct_worse_case_space() {