Skip to content

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

feat: condensated → condensed (#4439)

Andrew Dunbar48381cbbd47a
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index becc7164e..7e10c0f3f 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -4605,6 +4605,13 @@
"label": "Comprises Of"
}
},
+ {
+ "Bool": {
+ "name": "CondensateVerb",
+ "state": true,
+ "label": "Condensate Verb"
+ }
+ },
{
"Bool": {
"name": "Confident",
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index 6ff2a5671..95fac100b 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -124,6 +124,17 @@ pub fn lint_group() -> LintGroup {
"Suggests replacing the nonstandard verb `combinate` with the standard `combine`.",
LintKind::Nonstandard
),
+ "CondensateVerb" => (
+ &[
+ // "condensate" is a legitimate noun but a mistake when used as a verb.
+ ("condensated", "condensed"),
+ ("condensating", "condensing"),
+ // "condensates" is a legitimate plural but a mistake when used as a 3rd person singular present verb.
+ ],
+ "Did you mean `condense` rather than the nonstandard `condensate`?",
+ "Suggests replacing the nonstandard verb `condensate` with the standard `condense`.",
+ LintKind::Nonstandard
+ ),
"CompulseToCompel" => (
&[
("compulse", "compel"),
diff --git a/harper-core/src/linting/phrase_set_corrections/one_to_one_tests.rs b/harper-core/src/linting/phrase_set_corrections/one_to_one_tests.rs
index 6ff0acadb..5fe369dff 100644
--- a/harper-core/src/linting/phrase_set_corrections/one_to_one_tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/one_to_one_tests.rs
@@ -288,6 +288,26 @@ fn correct_combinating() {
);
}
+// CondensateVerb
+
+#[test]
+fn correct_condensated() {
+ assert_suggestion_result(
+ "Having this info condensated in the package list would help to draw conclusions whether some packages need upgrade.",
+ test_linter(),
+ "Having this info condensed in the package list would help to draw conclusions whether some packages need upgrade.",
+ )
+}
+
+#[test]
+fn correct_condensating() {
+ assert_suggestion_result(
+ "Apparently this is needed to minimize the risk of having water condensating.",
+ test_linter(),
+ "Apparently this is needed to minimize the risk of having water condensing.",
+ )
+}
+
// CompulseToCompel
#[test]