Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: various mistakes with `lots`, `lot's`, and `a lot` (#4289)
Andrew Dunbar78308fdf9135
diff --git a/harper-core/default_config.json b/harper-core/default_config.jsonindex 0067c9ed6..048ef1491 100644--- a/harper-core/default_config.json+++ b/harper-core/default_config.json@@ -5159,6 +5159,13 @@"label": "Looking Forward To"}},+ {+ "Bool": {+ "name": "Lots",+ "state": true,+ "label": "Lots"+ }+ },{"Bool": {"name": "LowHangingFruit",diff --git a/harper-core/src/linting/weir_rules/Lots/ALots.weir b/harper-core/src/linting/weir_rules/Lots/ALots.weirnew file mode 100644index 000000000..0511668ec--- /dev/null+++ b/harper-core/src/linting/weir_rules/Lots/ALots.weir@@ -0,0 +1,11 @@+expr main (a lots)++let message "Are you confusing `lot's` and `lots`? The contraction of `lot is` and `lot has` is `lot's`."+let description "Corrects `a lots` to `a lot's`."+let kind "Punctuation"+let becomes "a lot's"++# a lot has ...+test "a lots changed overtime, add latest depends support" "a lot's changed overtime, add latest depends support"+# a lot is ...+test "A lots changing around here!" "A lot's changing around here!"diff --git a/harper-core/src/linting/weir_rules/Lots/ALotsOf.weir b/harper-core/src/linting/weir_rules/Lots/ALotsOf.weirnew file mode 100644index 000000000..3da3767df--- /dev/null+++ b/harper-core/src/linting/weir_rules/Lots/ALotsOf.weir@@ -0,0 +1,9 @@+expr main (a lots of)++let message "Are you confusing `a lot` and `lots`?"+let description "Corrects `a lots of` to `a lot of` or `lots of`."+let kind "Usage"+let becomes ["a lot of", "lots of"]++test "I found a lots of compiler errors." "I found a lot of compiler errors."+test "I found a lots of compiler errors." "I found lots of compiler errors."diff --git a/harper-core/src/linting/weir_rules/Lots/LotsAndLots.weir b/harper-core/src/linting/weir_rules/Lots/LotsAndLots.weirnew file mode 100644index 000000000..646020ac1--- /dev/null+++ b/harper-core/src/linting/weir_rules/Lots/LotsAndLots.weir@@ -0,0 +1,8 @@+expr main [(lot's and lot's), (lot's and lots), (lots and lot's)]++let message "Are you confusing `lots` and `let's`? There is no apostrophe in `lots`."+let description "Corrects `lot's and lot's` to `lots and lots`."+let kind "Punctuation"+let becomes "lots and lots"++test "and repeat the 2 and 3 lot's and lot's of times" "and repeat the 2 and 3 lots and lots of times"diff --git a/harper-core/src/linting/weir_rules/Lots/LotsOf.weir b/harper-core/src/linting/weir_rules/Lots/LotsOf.weirnew file mode 100644index 000000000..6fcfea78c--- /dev/null+++ b/harper-core/src/linting/weir_rules/Lots/LotsOf.weir@@ -0,0 +1,8 @@+expr main (lot's of)++let message "Are you confusing `lots` and `let's`? There is no apostrophe in `lots`."+let description "Corrects `lot's of` to `lots of`."+let kind "Punctuation"+let becomes "lots of"++test "Lot's of (rough WIP) work to bring the repo current with gpui-ce v0.3.3." "Lots of (rough WIP) work to bring the repo current with gpui-ce v0.3.3."diff --git a/harper-core/src/linting/weir_rules/Lots/LotsOn.weir b/harper-core/src/linting/weir_rules/Lots/LotsOn.weirnew file mode 100644index 000000000..ce0bd9adb--- /dev/null+++ b/harper-core/src/linting/weir_rules/Lots/LotsOn.weir@@ -0,0 +1,8 @@+expr main (lot's on)++let message "Are you confusing `lots` and `let's`? There is no apostrophe in `lots`."+let description "Corrects `lot's on` to `lots on`."+let kind "Punctuation"+let becomes "lots on"++test "I'm finding lot's on how to do this once the array is created" "I'm finding lots on how to do this once the array is created"diff --git a/harper-core/src/linting/weir_rules/Lots/LotsTo.weir b/harper-core/src/linting/weir_rules/Lots/LotsTo.weirnew file mode 100644index 000000000..76aa94763--- /dev/null+++ b/harper-core/src/linting/weir_rules/Lots/LotsTo.weir@@ -0,0 +1,8 @@+expr main (lot's to)++let message "Are you confusing `lots` and `let's`? There is no apostrophe in `lots`."+let description "Corrects `lot's to` to `lots to`."+let kind "Punctuation"+let becomes "lots to"++test "security, i/o support, token cost - lot's to improve!" "security, i/o support, token cost - lots to improve!"