Skip to content

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

feat: a mean to an end→a means to an end (#3720)

Andrew Dunbarf7813dd54678
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 84980e289..68530c5c4 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -5312,6 +5312,13 @@
"state": true,
"label": "In Due Course"
}
+ },
+ {
+ "Bool": {
+ "name": "AMeansToAnEnd",
+ "state": true,
+ "label": "A Means To An End"
+ }
}
]
}
diff --git a/harper-core/src/linting/weir_rules/AMeansToAnEnd.weir b/harper-core/src/linting/weir_rules/AMeansToAnEnd.weir
new file mode 100644
index 000000000..1fdc76183
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/AMeansToAnEnd.weir
@@ -0,0 +1,9 @@
+expr main (a mean to an end)
+
+let message "The correct idiom is `a means to an end`."
+let description "Corrects `a mean to an end` to `a means to an end`"
+let kind "Usage"
+let becomes "a means to an end"
+
+test "coding, programming, anything really is a mean to an end, to get money" "coding, programming, anything really is a means to an end, to get money"
+test "It's a mean to an end, not the end itself." "It's a means to an end, not the end itself."