Skip to content

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

feat: argument to be said→argument to be made (#3360)

Andrew Dunbar681abd42ca77
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 868e69d67..7312d7246 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -799,6 +799,13 @@
"label": "At All Costs"
}
},
+ {
+ "Bool": {
+ "name": "ArgumentToBeMade",
+ "state": true,
+ "label": "Argument To Be Made"
+ }
+ },
{
"Bool": {
"name": "Bollocks",
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index 9b31df6e6..05a2ac57c 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -61,6 +61,14 @@ pub fn lint_group() -> LintGroup {
"Corrects `adieu` to `ado`.",
LintKind::Eggcorn
),
+ "ArgumentToBeMade" => (
+ &[
+ ("argument to be said", "argument to be made"),
+ ],
+ "The phrase `argument to be made` is correct.",
+ "Corrects `argument to be said` to `argument to be made`.",
+ LintKind::Usage
+ ),
"Bollocks" => (
&[
("bullocks!", "bollocks!"),
diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rs
index 36f69fbed..e5abd77a0 100644
--- a/harper-core/src/linting/phrase_set_corrections/tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs
@@ -26,6 +26,26 @@ fn corrects_much_ado() {
);
}
+// ArgumentToBeMade
+
+#[test]
+fn corrects_theres_an_argument_to_be_said() {
+ assert_suggestion_result(
+ "I guess there s an argument to be said that if the TUCKR_HOME is already defined, it should use that instead.",
+ lint_group(),
+ "I guess there s an argument to be made that if the TUCKR_HOME is already defined, it should use that instead.",
+ );
+}
+
+#[test]
+fn corrects_there_is_an_argument_to_be_said() {
+ assert_suggestion_result(
+ "Same argument for smooth_image_crate, although there is an argument to be said this is more-generally useful than scale_image_crate",
+ lint_group(),
+ "Same argument for smooth_image_crate, although there is an argument to be made this is more-generally useful than scale_image_crate",
+ );
+}
+
// Bollocks
#[test]