Skip to content

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

feat: may of us/you/them→many of ... (#3761)

Andrew Dunbara759a2666bab
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 2f9930ec0..752e1eed2 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -2818,6 +2818,13 @@
"state": true,
"label": "Hazzle"
}
+ },
+ {
+ "Bool": {
+ "name": "MayOfPronoun",
+ "state": true,
+ "label": "May Of Pronoun"
+ }
}
]
}
diff --git a/harper-core/src/linting/weir_rules/MayOfPronoun/Them.weir b/harper-core/src/linting/weir_rules/MayOfPronoun/Them.weir
new file mode 100644
index 000000000..43a9412f9
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/MayOfPronoun/Them.weir
@@ -0,0 +1,8 @@
+expr main (may of them)
+let message "Did you mean `many of them`?"
+let description "Corrects the typo `may of them` to `many of them`"
+let kind "Typo"
+let becomes "many of them"
+
+test "For may of them they don't follow proper semver." "For many of them they don't follow proper semver."
+test "Sorting keys in a group may be controversial though, as it seems may of them are ordered by important" "Sorting keys in a group may be controversial though, as it seems many of them are ordered by important"
diff --git a/harper-core/src/linting/weir_rules/MayOfPronoun/Us.weir b/harper-core/src/linting/weir_rules/MayOfPronoun/Us.weir
new file mode 100644
index 000000000..7dea1f957
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/MayOfPronoun/Us.weir
@@ -0,0 +1,8 @@
+expr main (may of us)
+let message "Did you mean `many of us`?"
+let description "Corrects the typo `may of us` to `many of us`"
+let kind "Typo"
+let becomes "many of us"
+
+test "It's really a great work, maybe may of us want to use this to generate a 3D model for 2D real images" "It's really a great work, maybe many of us want to use this to generate a 3D model for 2D real images"
+test "great, you don't know how so may of us are looking forward to this" "great, you don't know how so many of us are looking forward to this"
diff --git a/harper-core/src/linting/weir_rules/MayOfPronoun/You.weir b/harper-core/src/linting/weir_rules/MayOfPronoun/You.weir
new file mode 100644
index 000000000..e1acb9f0f
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/MayOfPronoun/You.weir
@@ -0,0 +1,8 @@
+expr main (may of you)
+let message "Did you mean `many of you`?"
+let description "Corrects the typo `may of you` to `many of you`"
+let kind "Typo"
+let becomes "many of you"
+
+test "I, like may of you guys, have followed this thing for years, for many others, decades." "I, like many of you guys, have followed this thing for years, for many others, decades."
+test "How may of you are going? I will be there for sure!" "How many of you are going? I will be there for sure!"