Skip to content

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

feat: at lest→at least (#3243)

Andrew Dunbarf8c7f4c7ad08
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 9050c89f5..2d5fc7a09 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -2308,6 +2308,13 @@
"label": "At Leas To Least"
}
},
+ {
+ "Bool": {
+ "name": "AtLestToLeast",
+ "state": true,
+ "label": "At Lest To Least"
+ }
+ },
{
"Bool": {
"name": "BeenThere",
diff --git a/harper-core/src/linting/weir_rules/AtLestToLeast.weir b/harper-core/src/linting/weir_rules/AtLestToLeast.weir
new file mode 100644
index 000000000..df38fef43
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/AtLestToLeast.weir
@@ -0,0 +1,10 @@
+expr main <([(at lest)]), lest>
+
+let message "Use the standard phrase with `least` here."
+let description "Fixes the mistake `at lest` when the intended expression is `at least`."
+let kind "Usage"
+let becomes "least"
+let strategy "MatchCase"
+
+test "Import of the unedited (at lest not intentional) original cvs repo of vtun.sourceforge.net." "Import of the unedited (at least not intentional) original cvs repo of vtun.sourceforge.net."
+test "if at lest 1 of the packages matching our filter have the script, carry on." "if at least 1 of the packages matching our filter have the script, carry on."
\ No newline at end of file