Skip to content

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

feat: curious on/of→curious about (#4080)

Andrew Dunbar64990c1cda0c
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 5fedd66b1..f60a2b95b 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -3357,6 +3357,13 @@
"label": "Complain As Noun"
}
},
+ {
+ "Bool": {
+ "name": "CuriousAbout",
+ "state": true,
+ "label": "Curious About"
+ }
+ },
{
"Bool": {
"name": "DoIAdjective",
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index 131834bdc..03fd919a6 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -757,15 +757,6 @@ pub fn lint_group() -> LintGroup {
"Corrects `copywrite` to `copyright`. `Copywrite` refers to writing copy, while `copyright` is the legal right to creative works.",
LintKind::WordChoice
),
- "Payed" => (
- &[
- (&["payed"], &["paid"]),
- (&["overpayed"], &["overpaid"]),
- ],
- "Use `paid` or `overpaid` here. `Payed` is a rare nautical spelling.",
- "Corrects `payed` to `paid` and `overpayed` to `overpaid`.",
- LintKind::Spelling
- ),
"DateBackFrom" => (
&[
(&["date back from"], &["date from", "date back to"]),
@@ -955,6 +946,15 @@ pub fn lint_group() -> LintGroup {
"Corrects common misspellings of `nowadays`.",
LintKind::Usage
),
+ "Payed" => (
+ &[
+ (&["payed"], &["paid"]),
+ (&["overpayed"], &["overpaid"]),
+ ],
+ "Use `paid` or `overpaid` here. `Payed` is a rare nautical spelling.",
+ "Corrects `payed` to `paid` and `overpayed` to `overpaid`.",
+ LintKind::Spelling
+ ),
"RiseTheQuestion" => (
&[
(&["rise the question", "arise the question"], &["raise the question"]),
@@ -982,6 +982,15 @@ pub fn lint_group() -> LintGroup {
"Corrects redundant `side tangent` and `side tangents` to more concise alternatives.",
LintKind::Redundancy
),
+ "ToTo" => (
+ &[
+ (&["to to"], &["to do"]),
+ (&["to-to"], &["to-do"]),
+ ],
+ "Did you mean to write `do` instead of a second `to`?",
+ "Corrects `to to` to `to do` and `to-to` to `to-do`, as they may be typos.",
+ LintKind::Typo
+ ),
"ToTooIdioms" => (
&[
(&["a bridge to far"], &["a bridge too far"]),
@@ -1070,15 +1079,6 @@ pub fn lint_group() -> LintGroup {
"Corrects `worse` and `worst` used in contexts where the other belongs.",
LintKind::Agreement
),
- "ToTo" => (
- &[
- (&["to to"], &["to do"]),
- (&["to-to"], &["to-do"]),
- ],
- "Did you mean to write `do` instead of a second `to`?",
- "Corrects `to to` to `to do` and `to-to` to `to-do`, as they may be typos.",
- LintKind::Typo
- ),
});
group.set_all_rules_to(Some(true));
diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rs
index a652d01c2..3c9520f67 100644
--- a/harper-core/src/linting/phrase_set_corrections/tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs
@@ -2445,26 +2445,6 @@ fn copywrote() {
);
}
-// Payed
-
-#[test]
-fn correct_payed() {
- assert_suggestion_result(
- "He payed the bill yesterday.",
- test_linter(),
- "He paid the bill yesterday.",
- );
-}
-
-#[test]
-fn correct_overpayed() {
- assert_suggestion_result(
- "He overpayed in part to have the specification met.",
- test_linter(),
- "He overpaid in part to have the specification met.",
- );
-}
-
// DateBackFrom
#[test]
@@ -3262,6 +3242,26 @@ fn fix_now_aday() {
);
}
+// Payed
+
+#[test]
+fn correct_payed() {
+ assert_suggestion_result(
+ "He payed the bill yesterday.",
+ test_linter(),
+ "He paid the bill yesterday.",
+ );
+}
+
+#[test]
+fn correct_overpayed() {
+ assert_suggestion_result(
+ "He overpayed in part to have the specification met.",
+ test_linter(),
+ "He overpaid in part to have the specification met.",
+ );
+}
+
// RaiseTheQuestion
// -raise the question-
diff --git a/harper-core/src/linting/weir_rules/CuriousAbout.weir b/harper-core/src/linting/weir_rules/CuriousAbout.weir
new file mode 100644
index 000000000..6b675fb76
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/CuriousAbout.weir
@@ -0,0 +1,11 @@
+expr main [(curious of), (curious on)]
+
+let message "Did you mean `curious about`?"
+let description "Corrects `curious of` and `curious on` to `curious about`."
+let kind "Usage"
+let becomes ["curious about"]
+
+test "we are working on in Docker in AWS but curious on recommended requirements" "we are working on in Docker in AWS but curious about recommended requirements"
+test "Curious on why QUIC works on 3.2 but not 3.3 in PUT on NonStop." "Curious about why QUIC works on 3.2 but not 3.3 in PUT on NonStop."
+test "started to get curious of how small a purpose trained LLM could be for the task" "started to get curious about how small a purpose trained LLM could be for the task"
+test "I'm curious of why this is a major performance problem for you." "I'm curious about why this is a major performance problem for you."