Skip to content

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

feat(core): add `allows` keyword to Weir (#2602)

Elijah Potterf7ca97ea0f8d
diff --git a/harper-core/src/linting/weir_rules/AOkHyphen.weir b/harper-core/src/linting/weir_rules/AOkHyphen.weir
index 62ea64960..a5ca55a45 100644
--- a/harper-core/src/linting/weir_rules/AOkHyphen.weir
+++ b/harper-core/src/linting/weir_rules/AOkHyphen.weir
@@ -23,7 +23,7 @@ test "You were totally a ok host." "You were totally a-ok host."
test "Being a ok line of communication matters." "Being a-ok line of communication matters."
test "It has been a ok solution in the past." "It has been a-ok solution in the past."
-test "The dashboard shows A-OK feedback." "The dashboard shows A-OK feedback."
-test "Our status is OK." "Our status is OK."
-test "This is a good plan." "This is a good plan."
-test "AOK signals readiness." "AOK signals readiness."
+allows "The dashboard shows A-OK feedback."
+allows "Our status is OK."
+allows "This is a good plan."
+allows "AOK signals readiness."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/AllOfASudden.weir b/harper-core/src/linting/weir_rules/AllOfASudden.weir
index 6859b2821..91c5a6d30 100644
--- a/harper-core/src/linting/weir_rules/AllOfASudden.weir
+++ b/harper-core/src/linting/weir_rules/AllOfASudden.weir
@@ -14,5 +14,5 @@ test "He whispered, \"all the sudden we were alone.\"" "He whispered, \"all of a
test "ALL THE SUDDEN THE ROOM WENT DARK." "ALL OF A SUDDEN THE ROOM WENT DARK."
test "They were laughing all the sudden." "They were laughing all of a sudden."
test "It stormed all of sudden after a warm morning." "It stormed all of a sudden after a warm morning."
-test "Their excitement and suddenness were all the suddenness she remembered." "Their excitement and suddenness were all the suddenness she remembered."
+allows "Their excitement and suddenness were all the suddenness she remembered."
test "This all the sudden change surprised everyone." "This all of a sudden change surprised everyone."
diff --git a/harper-core/src/linting/weir_rules/Alongside.weir b/harper-core/src/linting/weir_rules/Alongside.weir
index 93be74e4b..8a67d929d 100644
--- a/harper-core/src/linting/weir_rules/Alongside.weir
+++ b/harper-core/src/linting/weir_rules/Alongside.weir
@@ -12,6 +12,6 @@ test "The skiff pulled along side." "The skiff pulled alongside."
test "\"We drifted along side,\" she said." "\"We drifted alongside,\" she said."
test "They stood along side, waiting patiently." "They stood alongside, waiting patiently."
test "Cars lined up along side the curb." "Cars lined up alongside the curb."
-test "They walked alongside the river." "They walked alongside the river."
-test "They walked along the side of the river." "They walked along the side of the river."
-test "We camped along the lakeside all weekend." "We camped along the lakeside all weekend."
+allows "They walked alongside the river."
+allows "They walked along the side of the river."
+allows "We camped along the lakeside all weekend."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/AsFollows.weir b/harper-core/src/linting/weir_rules/AsFollows.weir
index 3d5bb7c22..7dbf78f94 100644
--- a/harper-core/src/linting/weir_rules/AsFollows.weir
+++ b/harper-core/src/linting/weir_rules/AsFollows.weir
@@ -17,9 +17,9 @@ test "Is this description as follow the sample?" "Is this description as follows
test "You can verify as follow once the build completes." "You can verify as follows once the build completes."
# Ensure unrelated uses of "follow" are not affected
-test "Follow the instructions as written." "Follow the instructions as written."
-test "We follow-up on these requests weekly." "We follow-up on these requests weekly."
-test "This is the way to follow as best you can." "This is the way to follow as best you can."
-test "As follows the plan will unfold." "As follows the plan will unfold."
-test "I will follow your lead." "I will follow your lead."
-test "The as follows section is helpful." "The as follows section is helpful."
+allows "Follow the instructions as written."
+allows "We follow-up on these requests weekly."
+allows "This is the way to follow as best you can."
+allows "As follows the plan will unfold."
+allows "I will follow your lead."
+allows "The as follows section is helpful."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/Beforehand.weir b/harper-core/src/linting/weir_rules/Beforehand.weir
index d951d4a15..a21f217d3 100644
--- a/harper-core/src/linting/weir_rules/Beforehand.weir
+++ b/harper-core/src/linting/weir_rules/Beforehand.weir
@@ -6,4 +6,4 @@ let becomes "beforehand"
test "Let me know before hand if you will attend." "Let me know beforehand if you will attend."
test "I prepared the documents before-hand." "I prepared the documents beforehand."
-test "We finished the preparations beforehand." "We finished the preparations beforehand."
+allows "We finished the preparations beforehand."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/BewareOf.weir b/harper-core/src/linting/weir_rules/BewareOf.weir
index 1e1b9b9e9..c9b19148b 100644
--- a/harper-core/src/linting/weir_rules/BewareOf.weir
+++ b/harper-core/src/linting/weir_rules/BewareOf.weir
@@ -20,8 +20,8 @@ test "Beware among the wild animals outside the park." "Beware of the wild anima
test "Beware between the gaps in the scaffolding." "Beware of the gaps in the scaffolding."
test "BEWARE WITH THE LOUD CRASHING." "BEWARE OF THE LOUD CRASHING."
-test "Beware of the dog that guards the porch." "Beware of the dog that guards the porch."
-test "Beware the gap between the platforms." "Beware the gap between the platforms."
-test "Beware every time you go near the cliff." "Beware every time you go near the cliff."
-test "Some people say beware: the path narrows." "Some people say beware: the path narrows."
-test "Beware of tall waves on this beach." "Beware of tall waves on this beach."
+allows "Beware of the dog that guards the porch."
+allows "Beware the gap between the platforms."
+allows "Beware every time you go near the cliff."
+allows "Some people say beware: the path narrows."
+allows "Beware of tall waves on this beach."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/CoursingThroughVeins.weir b/harper-core/src/linting/weir_rules/CoursingThroughVeins.weir
index 3d159cbe4..cbac31ad9 100644
--- a/harper-core/src/linting/weir_rules/CoursingThroughVeins.weir
+++ b/harper-core/src/linting/weir_rules/CoursingThroughVeins.weir
@@ -7,4 +7,4 @@ let becomes "coursing through veins"
test "cursing through veins" "coursing through veins"
test "It felt like the drugs were cursing through veins." "It felt like the drugs were coursing through veins."
-test "He was cursing through the entire meeting." "He was cursing through the entire meeting."
+allows "He was cursing through the entire meeting."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/DoIAdjective.weir b/harper-core/src/linting/weir_rules/DoIAdjective.weir
index 55a0917e0..82473d516 100644
--- a/harper-core/src/linting/weir_rules/DoIAdjective.weir
+++ b/harper-core/src/linting/weir_rules/DoIAdjective.weir
@@ -18,8 +18,8 @@ test "Do I not interested in attending?" "Am I not interested in attending?"
test "Do I not ready yet?" "Am I not ready yet?"
test "do I concerned about the changes?" "am I concerned about the changes?"
-test "Do I want to help you?" "Do I want to help you?"
-test "Do I need to finish this tonight?" "Do I need to finish this tonight?"
-test "Do I have to explain everything?" "Do I have to explain everything?"
-test "Do I run the tests again?" "Do I run the tests again?"
-test "Do I look like I'm not listening?" "Do I look like I'm not listening?"
+allows "Do I want to help you?"
+allows "Do I need to finish this tonight?"
+allows "Do I have to explain everything?"
+allows "Do I run the tests again?"
+allows "Do I look like I'm not listening?"
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/DoNotWant.weir b/harper-core/src/linting/weir_rules/DoNotWant.weir
index 2fdc5eab5..38acdaa10 100644
--- a/harper-core/src/linting/weir_rules/DoNotWant.weir
+++ b/harper-core/src/linting/weir_rules/DoNotWant.weir
@@ -7,4 +7,4 @@ let becomes ["don't want", "do not want"]
test "I don't wan to pay for this." "I don't want to pay for this."
test "Don't Wan that option." "Don't Want that option."
-test "I don't want to leave." "I don't want to leave."
+allows "I don't want to leave."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/DoToDueTo.weir b/harper-core/src/linting/weir_rules/DoToDueTo.weir
index 74dec3a29..fccc897db 100644
--- a/harper-core/src/linting/weir_rules/DoToDueTo.weir
+++ b/harper-core/src/linting/weir_rules/DoToDueTo.weir
@@ -17,8 +17,8 @@ test "The app crashed do to memory leaks." "The app crashed due to memory leaks.
test "Tickets sold quickly do to a viral post." "Tickets sold quickly due to a viral post."
test "It failed do to data loss." "It failed due to data loss."
-test "What did you do to the file?" "What did you do to the file?"
-test "Please do to the file what you did to the other one." "Please do to the file what you did to the other one."
-test "Don't do to others what you wouldn't want done to you." "Don't do to others what you wouldn't want done to you."
-test "We need to do to this spreadsheet what we did last week." "We need to do to this spreadsheet what we did last week."
-test "She asked what the update would do to her settings." "She asked what the update would do to her settings."
+allows "What did you do to the file?"
+allows "Please do to the file what you did to the other one."
+allows "Don't do to others what you wouldn't want done to you."
+allows "We need to do to this spreadsheet what we did last week."
+allows "She asked what the update would do to her settings."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/DoubleNegative.weir b/harper-core/src/linting/weir_rules/DoubleNegative.weir
index e05bb4086..3e321f349 100644
--- a/harper-core/src/linting/weir_rules/DoubleNegative.weir
+++ b/harper-core/src/linting/weir_rules/DoubleNegative.weir
@@ -19,8 +19,8 @@ test "I DIDN'T HAVE NO IDEA WHEN THIS WOULD END." "I DIDN'T HAVE ANY IDEA WHEN T
test "She did not make no progress yet." "She did not make any progress yet."
# Should not change when there's no double negative `no`
-test "I didn't have any idea what to do." "I didn't have any idea what to do."
-test "I didn't say no to the invitation." "I didn't say no to the invitation."
-test "She doesn't have any idea why the alarm rang." "She doesn't have any idea why the alarm rang."
-test "I did not see any sign of trouble." "I did not see any sign of trouble."
-test "No friends came over." "No friends came over."
+allows "I didn't have any idea what to do."
+allows "I didn't say no to the invitation."
+allows "She doesn't have any idea why the alarm rang."
+allows "I did not see any sign of trouble."
+allows "No friends came over."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/EggYolk.weir b/harper-core/src/linting/weir_rules/EggYolk.weir
index 5340b2069..6484a0b9c 100644
--- a/harper-core/src/linting/weir_rules/EggYolk.weir
+++ b/harper-core/src/linting/weir_rules/EggYolk.weir
@@ -11,7 +11,7 @@ test "Add the EGG YOKE to the batter." "Add the EGG YOLK to the batter."
test "Separate the egg yoke, then fold it in." "Separate the egg yolk, then fold it in."
test "The runny egg yoke spilled over the toast." "The runny egg yolk spilled over the toast."
test "Blend the cream with each egg yoke before baking." "Blend the cream with each egg yolk before baking."
-test "The custard calls for one egg yolk." "The custard calls for one egg yolk."
-test "Reserve the egg yolks for later." "Reserve the egg yolks for later."
-test "The artisan carved a wooden yoke for the oxen." "The artisan carved a wooden yoke for the oxen."
-test "Crack the eggs so no yoke spills." "Crack the eggs so no yoke spills."
+allows "The custard calls for one egg yolk."
+allows "Reserve the egg yolks for later."
+allows "The artisan carved a wooden yoke for the oxen."
+allows "Crack the eggs so no yoke spills."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/Excellent.weir b/harper-core/src/linting/weir_rules/Excellent.weir
index f53b55fa6..d8f6758a0 100644
--- a/harper-core/src/linting/weir_rules/Excellent.weir
+++ b/harper-core/src/linting/weir_rules/Excellent.weir
@@ -6,6 +6,6 @@ let kind "Enhancement"
let becomes "excellent"
test "Her results were very good this semester." "Her results were excellent this semester."
-test "The performance was excellent, drawing praise from all critics." "The performance was excellent, drawing praise from all critics."
-test "He radiated a sense of very goodness in his charitable acts." "He radiated a sense of very goodness in his charitable acts."
+allows "The performance was excellent, drawing praise from all critics."
+allows "He radiated a sense of very goodness in his charitable acts."
test "She generally gave herself very good advice" "She generally gave herself excellent advice"
diff --git a/harper-core/src/linting/weir_rules/ExpandWithout.weir b/harper-core/src/linting/weir_rules/ExpandWithout.weir
index 92cd56d59..cfd817daf 100644
--- a/harper-core/src/linting/weir_rules/ExpandWithout.weir
+++ b/harper-core/src/linting/weir_rules/ExpandWithout.weir
@@ -8,5 +8,5 @@ let becomes "without"
test "She lacks w/o experience." "She lacks without experience."
test "He has w/o skills w/o knowledge." "He has without skills without knowledge."
test "The report includes w/o details." "The report includes without details."
-test "She works with out effort." "She works with out effort."
+allows "She works with out effort."
test "She’s w/o a plan." "She’s without a plan."
diff --git a/harper-core/src/linting/weir_rules/HeDos.weir b/harper-core/src/linting/weir_rules/HeDos.weir
index d66dd1678..9c540e20c 100644
--- a/harper-core/src/linting/weir_rules/HeDos.weir
+++ b/harper-core/src/linting/weir_rules/HeDos.weir
@@ -15,8 +15,8 @@ test "She never dos that." "She never does that."
test "It really dos." "It really does."
test "He dos." "He does."
test "She dos, then she stops." "She does, then she stops."
-test "I dos it." "I dos it."
-test "They dos it." "They dos it."
-test "Dos is Spanish for two." "Dos is Spanish for two."
-test "He does it." "He does it."
-test "He doso it." "He doso it."
+allows "I dos it."
+allows "They dos it."
+allows "Dos is Spanish for two."
+allows "He does it."
+allows "He doso it."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/HeartToHeard.weir b/harper-core/src/linting/weir_rules/HeartToHeard.weir
index 8e71fcfc4..e93e92b91 100644
--- a/harper-core/src/linting/weir_rules/HeartToHeard.weir
+++ b/harper-core/src/linting/weir_rules/HeartToHeard.weir
@@ -16,8 +16,8 @@ test "Have the police ever heart of this?" "Have the police ever heard of this?"
test "Have the staff ever herd of the policy?" "Have the staff ever heard of the policy?"
test "Haven't you heart of that movie?" "Haven't you heard of that movie?"
test "Haven't you ever herd of that movie?" "Haven't you ever heard of that movie?"
-test "Have you heard of this band?" "Have you heard of this band?"
-test "Have the police heard of this?" "Have the police heard of this?"
-test "Have the heart of this story been told?" "Have the heart of this story been told?"
-test "I have a herd of cattle." "I have a herd of cattle."
-test "I have heart of the matter already." "I have heart of the matter already."
+allows "Have you heard of this band?"
+allows "Have the police heard of this?"
+allows "Have the heart of this story been told?"
+allows "I have a herd of cattle."
+allows "I have heart of the matter already."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/HowMach.weir b/harper-core/src/linting/weir_rules/HowMach.weir
index 567ec7741..65279b8d0 100644
--- a/harper-core/src/linting/weir_rules/HowMach.weir
+++ b/harper-core/src/linting/weir_rules/HowMach.weir
@@ -15,8 +15,8 @@ test "Ask how mach light you need." "Ask how much light you need."
test "How mach did you train for this race?" "How much did you train for this race?"
test "How match of those settings are legal?" "How much of those settings are legal?"
test "HOW MACH DO YOU WANT IT?" "HOW MUCH DO YOU WANT IT?"
-test "Now that we know how match() works, let's refactor." "Now that we know how match() works, let's refactor."
-test "How Match.com Got Women to Sign Up for Online Dating." "How Match.com Got Women to Sign Up for Online Dating."
-test "The engine develops 131.7kN and the speed of the aircraft is Mach 2." "The engine develops 131.7kN and the speed of the aircraft is Mach 2."
-test "Tell me how much time you need." "Tell me how much time you need."
-test "I can't decide how much of this to keep." "I can't decide how much of this to keep."
+allows "Now that we know how match() works, let's refactor."
+allows "How Match.com Got Women to Sign Up for Online Dating."
+allows "The engine develops 131.7kN and the speed of the aircraft is Mach 2."
+allows "Tell me how much time you need."
+allows "I can't decide how much of this to keep."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/InsteadOf.weir b/harper-core/src/linting/weir_rules/InsteadOf.weir
index 37b3a2c44..5b76754a6 100644
--- a/harper-core/src/linting/weir_rules/InsteadOf.weir
+++ b/harper-core/src/linting/weir_rules/InsteadOf.weir
@@ -6,4 +6,4 @@ let kind "BoundaryError"
let becomes "instead of"
test "He used water in stead of soda." "He used water instead of soda."
-test "He used water instead of soda." "He used water instead of soda."
+allows "He used water instead of soda."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/Intact.weir b/harper-core/src/linting/weir_rules/Intact.weir
index c50682ffb..fcdabb528 100644
--- a/harper-core/src/linting/weir_rules/Intact.weir
+++ b/harper-core/src/linting/weir_rules/Intact.weir
@@ -6,4 +6,4 @@ let kind "BoundaryError"
let becomes "intact"
test "The code remains in tact after the merge." "The code remains intact after the merge."
-test "The data set remains intact." "The data set remains intact."
+allows "The data set remains intact."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/LastNight.weir b/harper-core/src/linting/weir_rules/LastNight.weir
index 72ff2a0c4..071a83352 100644
--- a/harper-core/src/linting/weir_rules/LastNight.weir
+++ b/harper-core/src/linting/weir_rules/LastNight.weir
@@ -9,4 +9,4 @@ test "I was there yesterday night." "I was there last night."
test "Yesterday night was fun." "Last night was fun."
test "Yesterday night, we watched a movie." "Last night, we watched a movie."
test "They left yesterday night after the show." "They left last night after the show."
-test "I remember last night clearly." "I remember last night clearly."
+allows "I remember last night clearly."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/LaughOfAt.weir b/harper-core/src/linting/weir_rules/LaughOfAt.weir
index b3ccc43e9..94ea29807 100644
--- a/harper-core/src/linting/weir_rules/LaughOfAt.weir
+++ b/harper-core/src/linting/weir_rules/LaughOfAt.weir
@@ -15,11 +15,11 @@ test "Don't laugh of your teammate again." "Don't laugh at your teammate again."
test "The crowd laughs of Mary when she trips." "The crowd laughs at Mary when she trips."
test "I was laughing of Alex when the joke landed." "I was laughing at Alex when the joke landed."
test "They laugh of me even when I'm serious." "They laugh at me even when I'm serious."
-test "The laugh of the audience shook the rafters." "The laugh of the audience shook the rafters."
-test "That's the laugh of the most relentless critic." "That's the laugh of the most relentless critic."
-test "The laugh of the baby warmed everyone." "The laugh of the baby warmed everyone."
-test "We had a laugh of relief when it ended." "We had a laugh of relief when it ended."
-test "A laugh of astonishment escaped him." "A laugh of astonishment escaped him."
-test "Her laugh of disbelief made us pause." "Her laugh of disbelief made us pause."
-test "The laugh of a friend sounded distant." "The laugh of a friend sounded distant."
-test "I savor the laugh of children playing outside." "I savor the laugh of children playing outside."
+allows "The laugh of the audience shook the rafters."
+allows "That's the laugh of the most relentless critic."
+allows "The laugh of the baby warmed everyone."
+allows "We had a laugh of relief when it ended."
+allows "A laugh of astonishment escaped him."
+allows "Her laugh of disbelief made us pause."
+allows "The laugh of a friend sounded distant."
+allows "I savor the laugh of children playing outside."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/LeaveToFor.weir b/harper-core/src/linting/weir_rules/LeaveToFor.weir
index e6a49d00f..d6d46fd92 100644
--- a/harper-core/src/linting/weir_rules/LeaveToFor.weir
+++ b/harper-core/src/linting/weir_rules/LeaveToFor.weir
@@ -16,8 +16,8 @@ test "We are leaving to Brazil soon." "We are leaving for Brazil soon."
test "I leave to Spain next Monday." "I leave for Spain next Monday."
test "He left to Italy soon after the ceremony." "He left for Italy soon after the ceremony."
test "The crew is leaving to Paris soon." "The crew is leaving for Paris soon."
-test "I leave it to you." "I leave it to you."
-test "Leave it to me, and I'll handle it." "Leave it to me, and I'll handle it."
-test "We are leaving to the west soon." "We are leaving to the west soon."
-test "We left to surprise them." "We left to surprise them."
-test "They leave to inform the board tomorrow." "They leave to inform the board tomorrow."
+allows "I leave it to you."
+allows "Leave it to me, and I'll handle it."
+allows "We are leaving to the west soon."
+allows "We left to surprise them."
+allows "They leave to inform the board tomorrow."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/LikeAsIf.weir b/harper-core/src/linting/weir_rules/LikeAsIf.weir
index e610ab90a..944c80530 100644
--- a/harper-core/src/linting/weir_rules/LikeAsIf.weir
+++ b/harper-core/src/linting/weir_rules/LikeAsIf.weir
@@ -8,5 +8,5 @@ test "And looks like as if linux-personality hasn't got any changes for 8 years.
test "She looks like as if she’s tired." "She looks as if she’s tired."
test "He seems like as if he’s happy." "He seems as if he’s happy."
test "It feels like as if it’s a dream." "It feels as if it’s a dream."
-test "She acts like a hero." "She acts like a hero."
+allows "She acts like a hero."
test "She seems like as if she’s in love." "She seems as if she’s in love."
diff --git a/harper-core/src/linting/weir_rules/LooksLikes.weir b/harper-core/src/linting/weir_rules/LooksLikes.weir
index b34879d89..7961ccd2d 100644
--- a/harper-core/src/linting/weir_rules/LooksLikes.weir
+++ b/harper-core/src/linting/weir_rules/LooksLikes.weir
@@ -17,9 +17,9 @@ test "She looked likes, well there it is." "She looked like, well there it is."
test "Those who are looking likes a miracle never arrive." "Those who are looking like a miracle never arrive."
test "Looks likes the worst scenario." "Looks like the worst scenario."
-test "Looks like the winner." "Looks like the winner."
-test "He likes to code every day." "He likes to code every day."
-test "She looked like a star." "She looked like a star."
-test "I was looking carefully." "I was looking carefully."
-test "I like how it looks." "I like how it looks."
-test "Like how he likes the team." "Like how he likes the team."
+allows "Looks like the winner."
+allows "He likes to code every day."
+allows "She looked like a star."
+allows "I was looking carefully."
+allows "I like how it looks."
+allows "Like how he likes the team."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/ManagerialReins.weir b/harper-core/src/linting/weir_rules/ManagerialReins.weir
index fc2692b73..2f2f5b43d 100644
--- a/harper-core/src/linting/weir_rules/ManagerialReins.weir
+++ b/harper-core/src/linting/weir_rules/ManagerialReins.weir
@@ -11,7 +11,7 @@ test "The managerial reigns belong to Carla now." "The managerial reins belong t
test "By winter, he held the managerial reigns, and morale improved." "By winter, he held the managerial reins, and morale improved."
test "Who will hold the managerial reigns after April?" "Who will hold the managerial reins after April?"
test "\"managerial reigns\" showed up in the draft notes." "\"managerial reins\" showed up in the draft notes."
-test "He kept the managerial reins despite the reshuffle." "He kept the managerial reins despite the reshuffle."
-test "Legends of ancient reigns filled the museum." "Legends of ancient reigns filled the museum."
+allows "He kept the managerial reins despite the reshuffle."
+allows "Legends of ancient reigns filled the museum."
test "They debated who should manage the managerial reigns for the quarter." "They debated who should manage the managerial reins for the quarter."
test "Their memo shouted MANAGERIAL REIGNS." "Their memo shouted MANAGERIAL REINS."
diff --git a/harper-core/src/linting/weir_rules/OnSecondThought.weir b/harper-core/src/linting/weir_rules/OnSecondThought.weir
index 67ac9654b..bbe6a42db 100644
--- a/harper-core/src/linting/weir_rules/OnSecondThought.weir
+++ b/harper-core/src/linting/weir_rules/OnSecondThought.weir
@@ -6,5 +6,5 @@ let kind "Typo"
let becomes "second thought"
test "I was going to buy it, but on second though, maybe I'll wait." "I was going to buy it, but on second thought, maybe I'll wait."
-test "She considered driving home, but on second thought, she decided to walk." "She considered driving home, but on second thought, she decided to walk."
+allows "She considered driving home, but on second thought, she decided to walk."
test "My second though is that I'd prefer something else entirely." "My second thought is that I'd prefer something else entirely."
diff --git a/harper-core/src/linting/weir_rules/PasswordProtectedHyphen.weir b/harper-core/src/linting/weir_rules/PasswordProtectedHyphen.weir
index 1b4198db6..a6ddbd585 100644
--- a/harper-core/src/linting/weir_rules/PasswordProtectedHyphen.weir
+++ b/harper-core/src/linting/weir_rules/PasswordProtectedHyphen.weir
@@ -22,6 +22,6 @@ test "Password protected emails pile up." "Password-protected emails pile up."
test "The password protected gallery remains hidden." "The password-protected gallery remains hidden."
test "A password protected iphone case is ready." "A password-protected iphone case is ready."
test "A password protected drive keeps everything safe." "A password-protected drive keeps everything safe."
-test "The area is password protected." "The area is password protected."
-test "She mentioned password protected with no follow-up." "She mentioned password protected with no follow-up."
-test "The password protected from clause does not match." "The password protected from clause does not match."
+allows "The area is password protected."
+allows "She mentioned password protected with no follow-up."
+allows "The password protected from clause does not match."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/PedalToTheMetal.weir b/harper-core/src/linting/weir_rules/PedalToTheMetal.weir
index f1ce4bd5d..2bbb6a423 100644
--- a/harper-core/src/linting/weir_rules/PedalToTheMetal.weir
+++ b/harper-core/src/linting/weir_rules/PedalToTheMetal.weir
@@ -16,9 +16,9 @@ test "Pedal to the medal, please, once we cross the start line." "Pedal to the m
test "Keep saying pedal to the medal until the rival hears it." "Keep saying pedal to the metal until the rival hears it."
test "PEDAL TO THE MEDAL seems to be the rally cry." "PEDAL TO THE METAL seems to be the rally cry."
-test "Pedal to the metal is the correct idiom." "Pedal to the metal is the correct idiom."
-test "She earned a medal for her performance." "She earned a medal for her performance."
-test "The medal ceremony happened before the race." "The medal ceremony happened before the race."
-test "Pedal to the mettle, not the medal, outlines courage." "Pedal to the mettle, not the medal, outlines courage."
-test "The medal in our archive dates to 1895." "The medal in our archive dates to 1895."
-test "They pedaled to the medal." "They pedaled to the medal."
+allows "Pedal to the metal is the correct idiom."
+allows "She earned a medal for her performance."
+allows "The medal ceremony happened before the race."
+allows "Pedal to the mettle, not the medal, outlines courage."
+allows "The medal in our archive dates to 1895."
+allows "They pedaled to the medal."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/RainbowColoredHyphen.weir b/harper-core/src/linting/weir_rules/RainbowColoredHyphen.weir
index fc16484dc..2661daa5a 100644
--- a/harper-core/src/linting/weir_rules/RainbowColoredHyphen.weir
+++ b/harper-core/src/linting/weir_rules/RainbowColoredHyphen.weir
@@ -16,8 +16,8 @@ test "Cream coloured curtains softened the gallery lights." "Cream-coloured curt
test "The designer chose rainbow colored tiles for the backsplash." "The designer chose rainbow-colored tiles for the backsplash."
test "Our lineup now shows cream colored lipsticks and rainbow colored gloss." "Our lineup now shows cream-colored lipsticks and rainbow-colored gloss."
-test "The rainbow colored the sky with a soft gradient." "The rainbow colored the sky with a soft gradient."
-test "She rainbow colored every triangle on the quilt." "She rainbow colored every triangle on the quilt."
-test "The artist cream colored the mural in minutes." "The artist cream colored the mural in minutes."
-test "The leaves were rainbow colored after the festival lights." "The leaves were rainbow colored after the festival lights."
-test "Cream colored the vase intentionally for the commission." "Cream colored the vase intentionally for the commission."
+allows "The rainbow colored the sky with a soft gradient."
+allows "She rainbow colored every triangle on the quilt."
+allows "The artist cream colored the mural in minutes."
+allows "The leaves were rainbow colored after the festival lights."
+allows "Cream colored the vase intentionally for the commission."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/RallyToReally.weir b/harper-core/src/linting/weir_rules/RallyToReally.weir
index 6a5dfb7ef..0cca7a73b 100644
--- a/harper-core/src/linting/weir_rules/RallyToReally.weir
+++ b/harper-core/src/linting/weir_rules/RallyToReally.weir
@@ -16,12 +16,12 @@ test "It was not rally raining on our drive." "It was not really raining on our
test "He had been rally preparing to leave." "He had been really preparing to leave."
test "Ain't rally happening yet?" "Ain't really happening yet?"
test "Weren't we rally celebrating that plan?" "Weren't we really celebrating that plan?"
-test "Be rally precise when you describe the steps." "Be rally precise when you describe the steps."
+allows "Be rally precise when you describe the steps."
test "He was RALLY going to go all night." "He was REALLY going to go all night."
-test "The rally celebrating our victory lasted forever." "The rally celebrating our victory lasted forever."
-test "I really appreciate your effort." "I really appreciate your effort."
-test "Rally fans gathered outside the stadium." "Rally fans gathered outside the stadium."
-test "We had a rally before the game." "We had a rally before the game."
-test "The news rallied the team but left them motivated." "The news rallied the team but left them motivated."
-test "We were ready to rally around the idea." "We were ready to rally around the idea."
+allows "The rally celebrating our victory lasted forever."
+allows "I really appreciate your effort."
+allows "Rally fans gathered outside the stadium."
+allows "We had a rally before the game."
+allows "The news rallied the team but left them motivated."
+allows "We were ready to rally around the idea."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/RedundantPretty.weir b/harper-core/src/linting/weir_rules/RedundantPretty.weir
index ad6bfd2f6..4a1000fdc 100644
--- a/harper-core/src/linting/weir_rules/RedundantPretty.weir
+++ b/harper-core/src/linting/weir_rules/RedundantPretty.weir
@@ -14,7 +14,7 @@ test "We had a pretty decent time." "We had a decent time."
test "The movie was Pretty Decent." "The movie was Decent."
test "The movie was PRETTY DECENT." "The movie was DECENT."
-test "The movie was pretty good." "The movie was pretty good."
-test "The movie was decent." "The movie was decent."
-test "It was quite decent." "It was quite decent."
-test "Pretty much anything works." "Pretty much anything works."
+allows "The movie was pretty good."
+allows "The movie was decent."
+allows "It was quite decent."
+allows "Pretty much anything works."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/SendAnEmailTo.weir b/harper-core/src/linting/weir_rules/SendAnEmailTo.weir
index 6932aedaa..cfda4ada0 100644
--- a/harper-core/src/linting/weir_rules/SendAnEmailTo.weir
+++ b/harper-core/src/linting/weir_rules/SendAnEmailTo.weir
@@ -14,5 +14,5 @@ test "Can you send an email to her?" "Can you email her?"
test "They decided to send an email to all users." "They decided to email all users."
test "Send an email to John, please." "email John, please."
test "Before noon, send an email to marketing." "Before noon, email marketing."
-test "Please write an email to John." "Please write an email to John."
-test "She sent a message to John." "She sent a message to John."
+allows "Please write an email to John."
+allows "She sent a message to John."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/ThanksALot.weir b/harper-core/src/linting/weir_rules/ThanksALot.weir
index fa6673462..3a216c6ea 100644
--- a/harper-core/src/linting/weir_rules/ThanksALot.weir
+++ b/harper-core/src/linting/weir_rules/ThanksALot.weir
@@ -6,4 +6,4 @@ let kind "Grammar"
let becomes "thanks a lot"
test "thanks lot" "thanks a lot"
-test "thanks a lot" "thanks a lot"
+allows "thanks a lot"
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/TheirToThere.weir b/harper-core/src/linting/weir_rules/TheirToThere.weir
index 08c0bcfe8..f2895625d 100644
--- a/harper-core/src/linting/weir_rules/TheirToThere.weir
+++ b/harper-core/src/linting/weir_rules/TheirToThere.weir
@@ -24,12 +24,11 @@ test "Their must be a simpler way." "There must be a simpler way."
test "Their has been a change in scope." "There has been a change in scope."
test "Their have been delays all week." "There have been delays all week."
-test "Their car is in the driveway." "Their car is in the driveway."
-test "We used their tools for the repair." "We used their tools for the repair."
-test "Their team was excited." "Their team was excited."
-test "I appreciate their help." "I appreciate their help."
-test "Their willpower is strong." "Their willpower is strong."
-
+allows "Their car is in the driveway."
+allows "We used their tools for the repair."
+allows "Their team was excited."
+allows "I appreciate their help."
+allows "Their willpower is strong."
test "Their is a cat sleeping on the radiator." "There is a cat sleeping on the radiator."
test "I left the keys their on the counter." "I left the keys there on the counter."
test "Their are three clean mugs in the cupboard." "There are three clean mugs in the cupboard."
diff --git a/harper-core/src/linting/weir_rules/TheirToTheyre.weir b/harper-core/src/linting/weir_rules/TheirToTheyre.weir
index 4acf45479..0e1ae371c 100644
--- a/harper-core/src/linting/weir_rules/TheirToTheyre.weir
+++ b/harper-core/src/linting/weir_rules/TheirToTheyre.weir
@@ -31,35 +31,34 @@ test "Their not answering any messages." "They're not answering any messages."
test "Their going to be a problem if we don't hurry." "They're going to be a problem if we don't hurry."
test "Their probably wondering where we went." "They're probably wondering where we went."
-test "Their backpacks were stacked neatly by the door." "Their backpacks were stacked neatly by the door."
-test "I admired their patience during the long, glitchy delay." "I admired their patience during the long, glitchy delay."
-test "Their dog sprinted across the yard like a furry comet." "Their dog sprinted across the yard like a furry comet."
-test "The committee revised their proposal after the budget changed." "The committee revised their proposal after the budget changed."
-test "Their laughter drifted down the hallway, bright and unguarded." "Their laughter drifted down the hallway, bright and unguarded."
-test "We borrowed their ladder to reach the stubborn light fixture." "We borrowed their ladder to reach the stubborn light fixture."
-test "Their apartment smells like coffee, citrus, and old paperbacks." "Their apartment smells like coffee, citrus, and old paperbacks."
-test "The kids lost their mittens somewhere between the car and the rink." "The kids lost their mittens somewhere between the car and the rink."
-test "Their answer was careful, precise, and unexpectedly kind." "Their answer was careful, precise, and unexpectedly kind."
-test "The artists framed their sketches before the gallery opened." "The artists framed their sketches before the gallery opened."
-test "Their server crashed, but their backup plan worked flawlessly." "Their server crashed, but their backup plan worked flawlessly."
-test "I couldn't ignore their evidence; it was meticulously documented." "I couldn't ignore their evidence; it was meticulously documented."
-test "Their garden is a riot of basil, tomatoes, and bee traffic." "Their garden is a riot of basil, tomatoes, and bee traffic."
-test "The hikers checked their maps twice before leaving the trailhead." "The hikers checked their maps twice before leaving the trailhead."
-test "Their team celebrated quietly--relieved more than triumphant." "Their team celebrated quietly--relieved more than triumphant."
-test "Users should be able to visualize their connected notes as a knowledge graph, allowing them to explore relationships and identify patterns." "Users should be able to visualize their connected notes as a knowledge graph, allowing them to explore relationships and identify patterns."
-test "The frustration was palpable; the team felt they were fighting a constant uphill battle against their own data infrastructure." "The frustration was palpable; the team felt they were fighting a constant uphill battle against their own data infrastructure."
-test "Historians and sociologists have long examined how societies construct and maintain narratives about their past." "Historians and sociologists have long examined how societies construct and maintain narratives about their past."
-test "Traditional maps, often produced by the colonizers, replaced native nomenclature with European equivalents, effectively severing a vital link between people and their ancestral lands." "Traditional maps, often produced by the colonizers, replaced native nomenclature with European equivalents, effectively severing a vital link between people and their ancestral lands."
-test "She believes I should prioritize their needs above my own." "She believes I should prioritize their needs above my own."
-test "Each player places their pawn on GRI Headquarters (designated space on the board)." "Each player places their pawn on GRI Headquarters (designated space on the board)."
-test "This fragmented view hindered their ability to make timely adjustments, ultimately impacting their return on investment." "This fragmented view hindered their ability to make timely adjustments, ultimately impacting their return on investment."
-test "My shift was nearing its end, and I was conducting my final rounds, ensuring each patient was comfortable and their needs were met." "My shift was nearing its end, and I was conducting my final rounds, ensuring each patient was comfortable and their needs were met."
-test "Upon opening the application, users see a prioritized list of information cards related to their most recently accessed projects or tasks in connected applications." "Upon opening the application, users see a prioritized list of information cards related to their most recently accessed projects or tasks in connected applications."
-test "For instance, a musician who has lost their hearing might collaborate with a visual artist to create a series of abstract paintings that attempt to translate the emotional impact of music into a visual form." "For instance, a musician who has lost their hearing might collaborate with a visual artist to create a series of abstract paintings that attempt to translate the emotional impact of music into a visual form."
-test "Their relatively low density facilitates handling and transportation." "Their relatively low density facilitates handling and transportation."
-test "The growing interest in mycelium-based construction materials stems from their potential to offer a sustainable alternative to conventional building materials." "The growing interest in mycelium-based construction materials stems from their potential to offer a sustainable alternative to conventional building materials."
-test "Similarly, the individual experiencing sensory loss must actively reconstruct their understanding of the world, mapping the contours of their new, altered reality." "Similarly, the individual experiencing sensory loss must actively reconstruct their understanding of the world, mapping the contours of their new, altered reality."
-
+allows "Their backpacks were stacked neatly by the door."
+allows "I admired their patience during the long, glitchy delay."
+allows "Their dog sprinted across the yard like a furry comet."
+allows "The committee revised their proposal after the budget changed."
+allows "Their laughter drifted down the hallway, bright and unguarded."
+allows "We borrowed their ladder to reach the stubborn light fixture."
+allows "Their apartment smells like coffee, citrus, and old paperbacks."
+allows "The kids lost their mittens somewhere between the car and the rink."
+allows "Their answer was careful, precise, and unexpectedly kind."
+allows "The artists framed their sketches before the gallery opened."
+allows "Their server crashed, but their backup plan worked flawlessly."
+allows "I couldn't ignore their evidence; it was meticulously documented."
+allows "Their garden is a riot of basil, tomatoes, and bee traffic."
+allows "The hikers checked their maps twice before leaving the trailhead."
+allows "Their team celebrated quietly--relieved more than triumphant."
+allows "Users should be able to visualize their connected notes as a knowledge graph, allowing them to explore relationships and identify patterns."
+allows "The frustration was palpable; the team felt they were fighting a constant uphill battle against their own data infrastructure."
+allows "Historians and sociologists have long examined how societies construct and maintain narratives about their past."
+allows "Traditional maps, often produced by the colonizers, replaced native nomenclature with European equivalents, effectively severing a vital link between people and their ancestral lands."
+allows "She believes I should prioritize their needs above my own."
+allows "Each player places their pawn on GRI Headquarters (designated space on the board)."
+allows "This fragmented view hindered their ability to make timely adjustments, ultimately impacting their return on investment."
+allows "My shift was nearing its end, and I was conducting my final rounds, ensuring each patient was comfortable and their needs were met."
+allows "Upon opening the application, users see a prioritized list of information cards related to their most recently accessed projects or tasks in connected applications."
+allows "For instance, a musician who has lost their hearing might collaborate with a visual artist to create a series of abstract paintings that attempt to translate the emotional impact of music into a visual form."
+allows "Their relatively low density facilitates handling and transportation."
+allows "The growing interest in mycelium-based construction materials stems from their potential to offer a sustainable alternative to conventional building materials."
+allows "Similarly, the individual experiencing sensory loss must actively reconstruct their understanding of the world, mapping the contours of their new, altered reality."
test "Their far too warm for that." "They're far too warm for that."
test "Their far too cold for that." "They're far too cold for that."
test "Their even, just as I said!" "They're even, just as I said!"
diff --git a/harper-core/src/linting/weir_rules/ThereToTheir.weir b/harper-core/src/linting/weir_rules/ThereToTheir.weir
index 7781b96fd..79f9ef21c 100644
--- a/harper-core/src/linting/weir_rules/ThereToTheir.weir
+++ b/harper-core/src/linting/weir_rules/ThereToTheir.weir
@@ -34,16 +34,16 @@ test "There relatively low density facilitates handling and transportation." "Th
test "The growing interest in mycelium-based construction materials stems from there potential to offer a sustainable alternative to conventional building materials." "The growing interest in mycelium-based construction materials stems from their potential to offer a sustainable alternative to conventional building materials."
test "Similarly, the individual experiencing sensory loss must actively reconstruct there understanding of the world, mapping the contours of there new, altered reality." "Similarly, the individual experiencing sensory loss must actively reconstruct their understanding of the world, mapping the contours of their new, altered reality."
-test "There are several options to consider." "There are several options to consider."
-test "I left the keys there on the counter." "I left the keys there on the counter."
-test "We should meet there after work, near the fountain." "We should meet there after work, near the fountain."
-test "There will be more questions." "There will be more questions."
-test "There isn't any time left." "There isn't any time left."
-test "There's a note taped under the table." "There's a note taped under the table."
-test "I saw him standing there, perfectly still." "I saw him standing there, perfectly still."
-test "Leave the umbrella there by the door." "Leave the umbrella there by the door."
-test "The answer is right there in the first paragraph." "The answer is right there in the first paragraph."
-test "Are there known issues between these specific versions of Elementor and ACF that I’m unaware of?" "Are there known issues between these specific versions of Elementor and ACF that I’m unaware of?"
-test "There are lots of different phases." "There are lots of different phases."
-test "Yet, there are pockets of silence, moments where the urban soundscape recedes." "Yet, there are pockets of silence, moments where the urban soundscape recedes."
-test "While there are areas for improvement, the plugin is already a valuable tool for developers who want a modern and efficient debugging experience." "While there are areas for improvement, the plugin is already a valuable tool for developers who want a modern and efficient debugging experience."
+allows "There are several options to consider."
+allows "I left the keys there on the counter."
+allows "We should meet there after work, near the fountain."
+allows "There will be more questions."
+allows "There isn't any time left."
+allows "There's a note taped under the table."
+allows "I saw him standing there, perfectly still."
+allows "Leave the umbrella there by the door."
+allows "The answer is right there in the first paragraph."
+allows "Are there known issues between these specific versions of Elementor and ACF that I’m unaware of?"
+allows "There are lots of different phases."
+allows "Yet, there are pockets of silence, moments where the urban soundscape recedes."
+allows "While there are areas for improvement, the plugin is already a valuable tool for developers who want a modern and efficient debugging experience."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/TheyreToTheir.weir b/harper-core/src/linting/weir_rules/TheyreToTheir.weir
index 65b07c406..17ed3f6e8 100644
--- a/harper-core/src/linting/weir_rules/TheyreToTheir.weir
+++ b/harper-core/src/linting/weir_rules/TheyreToTheir.weir
@@ -5,32 +5,31 @@ let description "Corrects `they're` when the intended meaning is `their`."
let kind "Grammar"
let becomes "their"
-test "They're going to be late." "They're going to be late."
-test "I think they're already here." "I think they're already here."
-test "They're not sure what to do next." "They're not sure what to do next."
-test "They're coming over after work." "They're coming over after work."
-test "Tell them they're invited to the meeting." "Tell them they're invited to the meeting."
-test "They're trying to fix the bug right now." "They're trying to fix the bug right now."
-test "They're going to love this movie." "They're going to love this movie."
-test "They're the fastest team in the league." "They're the fastest team in the league."
-test "They're supposed to call you back today." "They're supposed to call you back today."
-test "They're leaving in five minutes." "They're leaving in five minutes."
-test "I heard they're moving to Denver." "I heard they're moving to Denver."
-test "They're just kidding--don't worry." "They're just kidding--don't worry."
-test "They're going to email the final draft tonight." "They're going to email the final draft tonight."
-test "They're not available until Tuesday." "They're not available until Tuesday."
-test "They're planning a surprise party." "They're planning a surprise party."
-test "Looks like they're running behind schedule." "Looks like they're running behind schedule."
-test "They're the ones who approved it." "They're the ones who approved it."
-test "They're going to miss the train." "They're going to miss the train."
-test "They're still waiting for the test results." "They're still waiting for the test results."
-test "They're not allowed to park here." "They're not allowed to park here."
-test "They're going to change the policy." "They're going to change the policy."
-test "They're ready to start whenever you are." "They're ready to start whenever you are."
-test "They're not answering any messages." "They're not answering any messages."
-test "They're going to be a problem if we don't hurry." "They're going to be a problem if we don't hurry."
-test "They're probably wondering where we went." "They're probably wondering where we went."
-
+allows "They're going to be late."
+allows "I think they're already here."
+allows "They're not sure what to do next."
+allows "They're coming over after work."
+allows "Tell them they're invited to the meeting."
+allows "They're trying to fix the bug right now."
+allows "They're going to love this movie."
+allows "They're the fastest team in the league."
+allows "They're supposed to call you back today."
+allows "They're leaving in five minutes."
+allows "I heard they're moving to Denver."
+allows "They're just kidding--don't worry."
+allows "They're going to email the final draft tonight."
+allows "They're not available until Tuesday."
+allows "They're planning a surprise party."
+allows "Looks like they're running behind schedule."
+allows "They're the ones who approved it."
+allows "They're going to miss the train."
+allows "They're still waiting for the test results."
+allows "They're not allowed to park here."
+allows "They're going to change the policy."
+allows "They're ready to start whenever you are."
+allows "They're not answering any messages."
+allows "They're going to be a problem if we don't hurry."
+allows "They're probably wondering where we went."
test "They're backpacks were stacked neatly by the door." "Their backpacks were stacked neatly by the door."
test "I admired they're patience during the long, glitchy delay." "I admired their patience during the long, glitchy delay."
test "They're dog sprinted across the yard like a furry comet." "Their dog sprinted across the yard like a furry comet."
diff --git a/harper-core/src/linting/weir_rules/TongueInCheek.weir b/harper-core/src/linting/weir_rules/TongueInCheek.weir
index 262943bc9..20b67a8eb 100644
--- a/harper-core/src/linting/weir_rules/TongueInCheek.weir
+++ b/harper-core/src/linting/weir_rules/TongueInCheek.weir
@@ -13,5 +13,5 @@ test "Their tone was TONGUE AND CHEEK all night." "Their tone was TONGUE IN CHEE
test "Tongue and cheek banter kept the meeting light." "Tongue in cheek banter kept the meeting light."
test "Her note (totally tongue and cheek) made us smile." "Her note (totally tongue in cheek) made us smile."
test "Was that tongue and cheek or sincere?" "Was that tongue in cheek or sincere?"
-test "Their comments were deliberately tongue in cheek." "Their comments were deliberately tongue in cheek."
-test "That was a tongue-in-cheek reply." "That was a tongue-in-cheek reply."
+allows "Their comments were deliberately tongue in cheek."
+allows "That was a tongue-in-cheek reply."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/TrueToWord.weir b/harper-core/src/linting/weir_rules/TrueToWord.weir
index db7a5bf0d..065f0aac6 100644
--- a/harper-core/src/linting/weir_rules/TrueToWord.weir
+++ b/harper-core/src/linting/weir_rules/TrueToWord.weir
@@ -19,8 +19,8 @@ test "One stays true to one's words while keeping a diary." "One stays true to o
test "I'm true to my words." "I'm true to my word."
test "True to your words, you resumed the pledge." "True to your word, you resumed the pledge."
-test "She was true to her word." "She was true to her word."
-test "They were true to the words they heard in class." "They were true to the words they heard in class."
-test "Being true to your word is the goal." "Being true to your word is the goal."
-test "The article praised her true words." "The article praised her true words."
-test "Our team is true to the word we said earlier." "Our team is true to the word we said earlier."
+allows "She was true to her word."
+allows "They were true to the words they heard in class."
+allows "Being true to your word is the goal."
+allows "The article praised her true words."
+allows "Our team is true to the word we said earlier."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/TurnItOff.weir b/harper-core/src/linting/weir_rules/TurnItOff.weir
index 4c586c5f6..643446cda 100644
--- a/harper-core/src/linting/weir_rules/TurnItOff.weir
+++ b/harper-core/src/linting/weir_rules/TurnItOff.weir
@@ -7,6 +7,6 @@ let becomes "turn it off"
test "Turn it of" "Turn it off"
test "Turn i of" "Turn it off"
-test "turn it off" "turn it off"
-test "Turn it off" "Turn it off"
-test "run by one" "run by one"
+allows "turn it off"
+allows "Turn it off"
+allows "run by one"
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/WithoutOut.weir b/harper-core/src/linting/weir_rules/WithoutOut.weir
index 078b98b90..823424116 100644
--- a/harper-core/src/linting/weir_rules/WithoutOut.weir
+++ b/harper-core/src/linting/weir_rules/WithoutOut.weir
@@ -16,8 +16,8 @@ test "Without OUT, the process would stop." "Without, the process would stop."
test "WITHOUT OUT luck, the players backed down." "WITHOUT luck, the players backed down."
test "without out all hope, we succeeded." "without all hope, we succeeded."
test "Last week we moved without out delay." "Last week we moved without delay."
-test "Without outstanding debts we can pivot." "Without outstanding debts we can pivot."
-test "There is a without output fallback." "There is a without output fallback."
-test "The absence of outbuildings was puzzling." "The absence of outbuildings was puzzling."
-test "Without doubt, the plan succeeded." "Without doubt, the plan succeeded."
-test "Mind the output to ensure correctness." "Mind the output to ensure correctness."
+allows "Without outstanding debts we can pivot."
+allows "There is a without output fallback."
+allows "The absence of outbuildings was puzzling."
+allows "Without doubt, the plan succeeded."
+allows "Mind the output to ensure correctness."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/WorstCaseScenario.weir b/harper-core/src/linting/weir_rules/WorstCaseScenario.weir
index 47bc3d1a1..c86fd7e20 100644
--- a/harper-core/src/linting/weir_rules/WorstCaseScenario.weir
+++ b/harper-core/src/linting/weir_rules/WorstCaseScenario.weir
@@ -7,4 +7,4 @@ let becomes "worst-case scenario"
test "The worst case scenario can be calculated without looking at streams of data." "The worst-case scenario can be calculated without looking at streams of data."
test "CAPD worst-case-scenario cloud simulator for naughty clouds." "CAPD worst-case scenario cloud simulator for naughty clouds."
-test "Those are now on hold for month." "Those are now on hold for month."
+allows "Those are now on hold for month."
\ No newline at end of file
diff --git a/harper-core/src/linting/weir_rules/WroughtIron.weir b/harper-core/src/linting/weir_rules/WroughtIron.weir
index 805bfb6c0..38a45b0f5 100644
--- a/harper-core/src/linting/weir_rules/WroughtIron.weir
+++ b/harper-core/src/linting/weir_rules/WroughtIron.weir
@@ -7,4 +7,4 @@ let becomes "wrought iron"
test "The gate was crafted from rod iron." "The gate was crafted from wrought iron."
test "The artisan works in rot iron." "The artisan works in wrought iron."
-test "She specialized in wrought iron artwork." "She specialized in wrought iron artwork."
+allows "She specialized in wrought iron artwork."
\ No newline at end of file
diff --git a/harper-core/src/weir/ast.rs b/harper-core/src/weir/ast.rs
index 2f74bd8cc..5d7bcc985 100644
--- a/harper-core/src/weir/ast.rs
+++ b/harper-core/src/weir/ast.rs
@@ -56,12 +56,10 @@ impl Ast {
/// Iterate through all the tests in the tree, starting with the one first declared in the
/// tree.
pub fn iter_tests(&self) -> impl Iterator<Item = (&str, &str)> {
- self.stmts.iter().filter_map(|stmt| {
- if let AstStmtNode::Test { expect, to_be } = stmt {
- Some((expect.as_str(), to_be.as_str()))
- } else {
- None
- }
+ self.stmts.iter().filter_map(|stmt| match stmt {
+ AstStmtNode::Test { expect, to_be } => Some((expect.as_str(), to_be.as_str())),
+ AstStmtNode::Allows { value } => Some((value.as_str(), value.as_str())),
+ _ => None,
})
}
}
@@ -151,6 +149,7 @@ pub enum AstStmtNode {
SetExpr { name: String, value: AstExprNode },
Comment(String),
Test { expect: String, to_be: String },
+ Allows { value: String },
}
impl AstStmtNode {
@@ -174,4 +173,10 @@ impl AstStmtNode {
to_be: to_be.to_string(),
}
}
+
+ pub fn create_allow_test(value: impl ToString) -> Self {
+ Self::Allows {
+ value: value.to_string(),
+ }
+ }
}
diff --git a/harper-core/src/weir/mod.rs b/harper-core/src/weir/mod.rs
index 7420c9415..b15f8426c 100644
--- a/harper-core/src/weir/mod.rs
+++ b/harper-core/src/weir/mod.rs
@@ -190,6 +190,14 @@ impl WeirLinter {
.collect();
for (text, expected) in tests {
+ if text == expected && lint_count(&text, self) != 0 {
+ results.push(TestResult {
+ expected: text.to_string(),
+ got: text.to_string(),
+ });
+ continue;
+ }
+
let zeroth = transform_nth_str(&text, self, 0);
let first = transform_nth_str(&text, self, 1);
let second = transform_nth_str(&text, self, 2);
@@ -294,11 +302,13 @@ pub mod tests {
test "He RIGHT CLICKED the file." "He RIGHT-CLICKED the file."
test "Left click the checkbox." "Left-click the checkbox."
test "Middle click to open in a new tab." "Middle-click to open in a new tab."
+
+ allows "This test contains the correct version of right-click and therefore shouldn't error."
"#;
let mut linter = WeirLinter::new(source).unwrap();
assert_passes_all(&mut linter);
- assert_eq!(8, linter.count_tests());
+ assert_eq!(9, linter.count_tests());
}
#[test]
@@ -315,12 +325,14 @@ pub mod tests {
test "This account is still labeled as Google Apps for Work." "This account is still labeled as Google Workspace."
test "The pricing page mentions G Suit for legacy plans." "The pricing page mentions Google Workspace for legacy plans."
test "New customers sign up for Google Workspace." "New customers sign up for Google Workspace."
+
+ allows "This test contains the correct version of Google Workspace and therefore shouldn't error."
"#;
let mut linter = WeirLinter::new(source).unwrap();
assert_passes_all(&mut linter);
- assert_eq!(4, linter.count_tests());
+ assert_eq!(5, linter.count_tests());
}
#[test]
@@ -354,12 +366,32 @@ pub mod tests {
let strategy "Exact"
test "This--and--that" "This-and-that"
+
+ allows "this-and-that"
"#;
let mut linter = WeirLinter::new(source).unwrap();
assert_passes_all(&mut linter);
- assert_eq!(1, linter.count_tests());
+ assert_eq!(2, linter.count_tests());
+ }
+
+ #[test]
+ fn fails_on_ignore_test() {
+ let source = r#"
+ expr main test
+ let message ""
+ let description ""
+ let kind "Miscellaneous"
+ let becomes "-"
+ let strategy "Exact"
+
+ allows "test"
+ "#;
+
+ let mut linter = WeirLinter::new(source).unwrap();
+
+ assert_eq!(linter.run_tests().len(), 1)
}
#[test]
diff --git a/harper-core/src/weir/parsing/stmt.rs b/harper-core/src/weir/parsing/stmt.rs
index 720df4d5b..96648997c 100644
--- a/harper-core/src/weir/parsing/stmt.rs
+++ b/harper-core/src/weir/parsing/stmt.rs
@@ -177,6 +177,21 @@ fn parse_stmt(tokens: &[Token], source: &[char]) -> Result<FoundNode<Option<AstS
end + 1,
))
}
+ ['a', 'l', 'l', 'o', 'w', 's'] => {
+ let case = parse_quoted_string(&tokens[cursor + 1..], source)?;
+ cursor += 1 + case.next_idx;
+
+ if cursor != end {
+ return Err(Error::UnexpectedToken(
+ tokens[cursor].span.get_content_string(source),
+ ));
+ }
+
+ Ok(FoundNode::new(
+ Some(AstStmtNode::create_allow_test(case.node)),
+ end + 1,
+ ))
+ }
['t', 'e', 's', 't'] => {
let case = parse_quoted_string(&tokens[cursor + 1..], source)?;
cursor += 1 + case.next_idx;
@@ -370,6 +385,16 @@ mod tests {
)
}
+ #[test]
+ fn parses_allows() {
+ assert_eq!(
+ parse_str("allows \"this is the case\"", true)
+ .unwrap()
+ .stmts,
+ vec![AstStmtNode::create_allow_test("this is the case",)]
+ )
+ }
+
#[test]
fn parses_comment_expr_var_together() {
let ast = parse_str(
@@ -460,6 +485,12 @@ mod tests {
parse_str("let var+\"\"", false).unwrap();
}
+ #[test]
+ #[should_panic]
+ fn catches_non_whitespace_after_allows() {
+ parse_str("allows+\"\"", false).unwrap();
+ }
+
#[quickcheck]
fn catches_anything_after_test(a: String) {
if !a.is_empty() && !a.starts_with('\n') {
@@ -467,4 +498,12 @@ mod tests {
assert!(parse_str(code.as_str(), false).is_err())
}
}
+
+ #[quickcheck]
+ fn catches_anything_after_allows(a: String) {
+ if !a.is_empty() && !a.starts_with('\n') {
+ let code = format!("allows \"\" {a}");
+ assert!(parse_str(code.as_str(), false).is_err())
+ }
+ }
}
diff --git a/packages/web/src/routes/docs/weir/+page.md b/packages/web/src/routes/docs/weir/+page.md
index a36c22298..8c3b12a72 100644
--- a/packages/web/src/routes/docs/weir/+page.md
+++ b/packages/web/src/routes/docs/weir/+page.md
@@ -254,7 +254,7 @@ You can also assert that the rule _will not_ change anything.
```plaintext
# I don't expect the rule to change anything
-test "A" "A"
+allows "A"
```
In the future, expect new types of tests to become available.