Skip to content

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

feat: to no vail/vale/veil → to no avail (#4633)

Andrew Dunbar32608c24d11e
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 8434965cb..e251d2d27 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -6033,6 +6033,13 @@
"label": "Tongue In Cheek"
}
},
+ {
+ "Bool": {
+ "name": "ToNoAvail",
+ "state": true,
+ "label": "To No Avail"
+ }
+ },
{
"Bool": {
"name": "ToteTout",
diff --git a/harper-core/src/linting/weir_rules/ToNoAvail/VailVale.weir b/harper-core/src/linting/weir_rules/ToNoAvail/VailVale.weir
new file mode 100644
index 000000000..41f0f7540
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/ToNoAvail/VailVale.weir
@@ -0,0 +1,9 @@
+expr main <(to no [vale, vail]), ([vale, vail])>
+
+let message "Use the correct phrase for being ineffective."
+let description "Corrects wrong variants of `to no avail`, meaning `without success`."
+let kind "WordChoice"
+let becomes "avail"
+
+test "I tried to install different versions to no vail." "I tried to install different versions to no avail."
+test "I've tried updating the gpu driver, reinstalling it but to no vale." "I've tried updating the gpu driver, reinstalling it but to no avail."
diff --git a/harper-core/src/linting/weir_rules/ToNoAvail/Veil.weir b/harper-core/src/linting/weir_rules/ToNoAvail/Veil.weir
new file mode 100644
index 000000000..7847ea8ca
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/ToNoAvail/Veil.weir
@@ -0,0 +1,8 @@
+expr main <(but to no veil), (veil)>
+
+let message "Use the correct phrase for being ineffective."
+let description "Corrects wrong variants of `to no avail`, meaning `without success`."
+let kind "WordChoice"
+let becomes "avail"
+
+test "I have spent quite a lot time searching, but to no veil." "I have spent quite a lot time searching, but to no avail."