Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: into a different direction→in a different direction (#3665)
Andrew Dunbarbcc98cd7b51d
diff --git a/harper-core/default_config.json b/harper-core/default_config.jsonindex c65dd60fb..fd4d266ba 100644--- a/harper-core/default_config.json+++ b/harper-core/default_config.json@@ -5327,6 +5327,13 @@"label": "Leaving In Droves"}},+ {+ "Bool": {+ "name": "InADifferentDirection",+ "state": true,+ "label": "In A Different Direction"+ }+ },{"Bool": {"name": "AndSuch",diff --git a/harper-core/src/linting/weir_rules/InADifferentDirection.weir b/harper-core/src/linting/weir_rules/InADifferentDirection.weirnew file mode 100644index 000000000..24f307199--- /dev/null+++ b/harper-core/src/linting/weir_rules/InADifferentDirection.weir@@ -0,0 +1,9 @@+expr main (into a different direction)++let message "Did you mean `in a different direction`?"+let description "Detects the incorrect use of the preposition `into` when describing a change in path, strategy, or orientation. A direction is abstract, requiring `in` rather than `into`."+let kind "Typo"+let becomes "in a different direction"++test "while humans need to redirect the momentum into a different direction by steering the movement vector" "while humans need to redirect the momentum in a different direction by steering the movement vector"+test "Right now, although I look into a different direction, I am following the previous path while moving (going forward or backward)." "Right now, although I look in a different direction, I am following the previous path while moving (going forward or backward)."