Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: tent to → tend to (#4701)
Andrew Dunbarcfac911a05dc
diff --git a/harper-core/default_config.json b/harper-core/default_config.jsonindex fe239385b..bc00a372f 100644--- a/harper-core/default_config.json+++ b/harper-core/default_config.json@@ -6074,6 +6074,13 @@"label": "Take Pride in"}},+ {+ "Bool": {+ "name": "TendTo",+ "state": true,+ "label": "Tend to"+ }+ },{"Bool": {"name": "ThatChallenged",diff --git a/harper-core/src/linting/weir_rules/TendTo/TendTo.weir b/harper-core/src/linting/weir_rules/TendTo/TendTo.weirnew file mode 100644index 000000000..b8cc4fa50--- /dev/null+++ b/harper-core/src/linting/weir_rules/TendTo/TendTo.weir@@ -0,0 +1,32 @@+expr main [<(tent to [agree, focus, have, think, use]), tent>, <([i, people, they, we, will, would, you] tent to), tent>]++let message "Did you mean `tend to`?"+let description "Flags `tent to` when it's likely a mistake for `tend to`."+let kind "Spelling"+let becomes "tend"++# real-world examples++test "I tent to think this is the sky." "I tend to think this is the sky."+test "I tent to agree that this is inconvenient." "I tend to agree that this is inconvenient."+test "some people tent to write else if even it's early breaking statement" "some people tend to write else if even it's early breaking statement"+test "We tent to use multiple params and I was wondering if it is possible" "We tend to use multiple params and I was wondering if it is possible"+test "The best startup ideas tent to have three things in common" "The best startup ideas tend to have three things in common"+test "We tent to use multiple params and I was wondering if it is possible" "We tend to use multiple params and I was wondering if it is possible"+test "I tent to believe that it might be some of your local issues." "I tend to believe that it might be some of your local issues."+test "I would tent to use the less abundant isotopes" "I would tend to use the less abundant isotopes"+test "the distribution of rtp locations is not something people tent to focus much on" "the distribution of rtp locations is not something people tend to focus much on"+test "you tent to complicate things in order to go and buy your genius one click solution" "you tend to complicate things in order to go and buy your genius one click solution"+test "he will tent to feel that its not generic" "he will tend to feel that its not generic"+test "I would tent to keep the current config." "I would tend to keep the current config."+test "and they tent to record the classes and pass it on to the students" "and they tend to record the classes and pass it on to the students"++# contrived examples++allows "I have a tent to sell."+allows "Campster has a new tent to distribute."+allows "I couldn't decide which tent to buy."+allows "I took that tent to the mountain."+allows "The company decided this is the tent to produce for next season."+allows "He told me this is the best tent to get."+allows "tips for attaching and securing the rooftop tent to your vehicle"diff --git a/harper-core/src/linting/weir_rules/TendTo/TendsTo.weir b/harper-core/src/linting/weir_rules/TendTo/TendsTo.weirnew file mode 100644index 000000000..1eb76b080--- /dev/null+++ b/harper-core/src/linting/weir_rules/TendTo/TendsTo.weir@@ -0,0 +1,16 @@+expr main <(that tents to), tents>++let message "Did you mean `tends to`?"+let description "Flags `tents to` when it's likely a mistake for `tends to`."+let kind "Spelling"+let becomes "tends"++# real-world examples++test "MinHash is a hashing scheme that tents to produce similar signatures" "MinHash is a hashing scheme that tends to produce similar signatures"++# contrived examples++allows "Pack up the tents to get a move on."+allows "There were many tents to see at the camping show."+allows "we got out of our tents to have a walk around the camp"