Skip to content

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

feat: and the such→and such; as long that→as long as (#3675)

Andrew Dunbar74064b218eb9
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 5c201d7f4..3bb2cb3b2 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -5180,6 +5180,13 @@
"label": "Leaving In Droves"
}
},
+ {
+ "Bool": {
+ "name": "AndSuch",
+ "state": true,
+ "label": "And Such"
+ }
+ },
{
"Bool": {
"name": "RunIntoProblemsOrTrouble",
diff --git a/harper-core/src/linting/weir_rules/AndSuch.weir b/harper-core/src/linting/weir_rules/AndSuch.weir
new file mode 100644
index 000000000..960fe84bd
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/AndSuch.weir
@@ -0,0 +1,8 @@
+expr main (and the such)
+let message "Did you mean `and such`?"
+let description "Corrects `and the such` to `and such`."
+let kind "Usage"
+let becomes "and such"
+
+test "some of the rvm site documentation about the available useful rvm environment variables and the such" "some of the rvm site documentation about the available useful rvm environment variables and such"
+test "I've been trying to update my library to using patterns and the such, and as a preliminary" "I've been trying to update my library to using patterns and such, and as a preliminary"
diff --git a/harper-core/src/linting/weir_rules/AsLongAs.weir b/harper-core/src/linting/weir_rules/AsLongAs.weir
index 502d751c3..929369104 100644
--- a/harper-core/src/linting/weir_rules/AsLongAs.weir
+++ b/harper-core/src/linting/weir_rules/AsLongAs.weir
@@ -1,8 +1,10 @@
-expr main (aslong as)
+expr main [(aslong as), (as long that)]
-let message "`As long` should be written as two words."
-let description "Corrects `aslong as` to `as long as`."
-let kind "BoundaryError"
+let message "`As long` is two words and the last word should be `as`."
+let description "Corrects `aslong as` and `as long that` to `as long as`."
+let kind "Usage"
let becomes "as long as"
test "server loads up fine but cant log on client side aslong as the plugin is installed" "server loads up fine but cant log on client side as long as the plugin is installed"
+test "Allow creation of assets with a replicas > current cluster size as long that there is quorum." "Allow creation of assets with a replicas > current cluster size as long as there is quorum."
+test "As long that it has the right symbols" "As long as it has the right symbols"