Skip to content

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

feat: redundant "way with which" → "way" alone (#4739)

Andrew Dunbare73ff98dcce9
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 507f9acd7..17b431479 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -3494,6 +3494,13 @@
"label": "Way Too Adjective"
}
},
+ {
+ "Bool": {
+ "name": "WayWithWhich",
+ "state": true,
+ "label": "Way with Which"
+ }
+ },
{
"Bool": {
"name": "WidelyAccepted",
diff --git a/harper-core/src/linting/weir_rules/WayWithWhich.weir b/harper-core/src/linting/weir_rules/WayWithWhich.weir
new file mode 100644
index 000000000..18c233acc
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/WayWithWhich.weir
@@ -0,0 +1,8 @@
+expr main (way with which)
+
+let message "Change `way with which` to `way`."
+let description "Suggests removing the redundant `with which` from `way with which`."
+let kind "Redundancy"
+let becomes "way"
+
+test "maybe eventually with all of that context, uh they'll have a way with which to solve the problem" "maybe eventually with all of that context, uh they'll have a way to solve the problem"