Skip to content

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

fix: move Weir rules to the correct directory

Elijah Potter09b815f31625
diff --git a/weir_rules/AtLeasToLeast.weir b/harper-core/src/linting/weir_rules/AtLeasToLeast.weir
similarity index 100%
rename from weir_rules/AtLeasToLeast.weir
rename to harper-core/src/linting/weir_rules/AtLeasToLeast.weir
diff --git a/weir_rules/BetterOffPhrase.weir b/harper-core/src/linting/weir_rules/BetterOffPhrase.weir
similarity index 100%
rename from weir_rules/BetterOffPhrase.weir
rename to harper-core/src/linting/weir_rules/BetterOffPhrase.weir
diff --git a/weir_rules/BluRayHyphen.weir b/harper-core/src/linting/weir_rules/BluRayHyphen.weir
similarity index 100%
rename from weir_rules/BluRayHyphen.weir
rename to harper-core/src/linting/weir_rules/BluRayHyphen.weir
diff --git a/weir_rules/CauseItIsBecause.weir b/harper-core/src/linting/weir_rules/CauseItIsBecause.weir
similarity index 100%
rename from weir_rules/CauseItIsBecause.weir
rename to harper-core/src/linting/weir_rules/CauseItIsBecause.weir
diff --git a/weir_rules/ColdModalTypo.weir b/harper-core/src/linting/weir_rules/ColdModalTypo.weir
similarity index 100%
rename from weir_rules/ColdModalTypo.weir
rename to harper-core/src/linting/weir_rules/ColdModalTypo.weir
diff --git a/weir_rules/DoubleCheckHyphen.weir b/harper-core/src/linting/weir_rules/DoubleCheckHyphen.weir
similarity index 100%
rename from weir_rules/DoubleCheckHyphen.weir
rename to harper-core/src/linting/weir_rules/DoubleCheckHyphen.weir
diff --git a/weir_rules/EachOthersPossessive.weir b/harper-core/src/linting/weir_rules/EachOthersPossessive.weir
similarity index 100%
rename from weir_rules/EachOthersPossessive.weir
rename to harper-core/src/linting/weir_rules/EachOthersPossessive.weir
diff --git a/weir_rules/EasyGoingCompoundAdjective.weir b/harper-core/src/linting/weir_rules/EasyGoingCompoundAdjective.weir
similarity index 100%
rename from weir_rules/EasyGoingCompoundAdjective.weir
rename to harper-core/src/linting/weir_rules/EasyGoingCompoundAdjective.weir
diff --git a/weir_rules/ExitedExcitedContext.weir b/harper-core/src/linting/weir_rules/ExitedExcitedContext.weir
similarity index 100%
rename from weir_rules/ExitedExcitedContext.weir
rename to harper-core/src/linting/weir_rules/ExitedExcitedContext.weir
diff --git a/weir_rules/FirstPersonModifierHyphen.weir b/harper-core/src/linting/weir_rules/FirstPersonModifierHyphen.weir
similarity index 100%
rename from weir_rules/FirstPersonModifierHyphen.weir
rename to harper-core/src/linting/weir_rules/FirstPersonModifierHyphen.weir
diff --git a/weir_rules/HaveNegNoAny.weir b/harper-core/src/linting/weir_rules/HaveNegNoAny.weir
similarity index 100%
rename from weir_rules/HaveNegNoAny.weir
rename to harper-core/src/linting/weir_rules/HaveNegNoAny.weir
diff --git a/weir_rules/IntroCueCommaBeforeThanks.weir b/harper-core/src/linting/weir_rules/IntroCueCommaBeforeThanks.weir
similarity index 100%
rename from weir_rules/IntroCueCommaBeforeThanks.weir
rename to harper-core/src/linting/weir_rules/IntroCueCommaBeforeThanks.weir
diff --git a/weir_rules/IsBeenAuxSequence.weir b/harper-core/src/linting/weir_rules/IsBeenAuxSequence.weir
similarity index 100%
rename from weir_rules/IsBeenAuxSequence.weir
rename to harper-core/src/linting/weir_rules/IsBeenAuxSequence.weir
diff --git a/weir_rules/ItTimeAuxiliary.weir b/harper-core/src/linting/weir_rules/ItTimeAuxiliary.weir
similarity index 100%
rename from weir_rules/ItTimeAuxiliary.weir
rename to harper-core/src/linting/weir_rules/ItTimeAuxiliary.weir
diff --git a/weir_rules/KnowNothingVerb.weir b/harper-core/src/linting/weir_rules/KnowNothingVerb.weir
similarity index 100%
rename from weir_rules/KnowNothingVerb.weir
rename to harper-core/src/linting/weir_rules/KnowNothingVerb.weir
diff --git a/weir_rules/LookInto.weir b/harper-core/src/linting/weir_rules/LookInto.weir
similarity index 100%
rename from weir_rules/LookInto.weir
rename to harper-core/src/linting/weir_rules/LookInto.weir
diff --git a/weir_rules/MakeupCompoundNoun.weir b/harper-core/src/linting/weir_rules/MakeupCompoundNoun.weir
similarity index 90%
rename from weir_rules/MakeupCompoundNoun.weir
rename to harper-core/src/linting/weir_rules/MakeupCompoundNoun.weir
index 6fbb5c959..fb19791e9 100644
--- a/weir_rules/MakeupCompoundNoun.weir
+++ b/harper-core/src/linting/weir_rules/MakeupCompoundNoun.weir
@@ -1,5 +1,5 @@
expr determiner [the, a, an, this, that, these, those, my, your, his, her, its, our, their]
-expr main <([(@determiner make up), (@determiner ADJ make up)]), (make up)>
+expr main <([((@determiner make up) !DET), ((@determiner ADJ make up) !DET)]), (make up)>
let message "Use the closed compound for this cosmetics noun form."
let description "Finds determiner-led noun phrases where the split spelling appears and closes it."
@@ -28,6 +28,7 @@ test "She asked them to make up before dinner." "She asked them to make up befor
test "The team tried to make up ground in Q4." "The team tried to make up ground in Q4."
test "This makeup kit is already packed." "This makeup kit is already packed."
test "Makeup tutorials are everywhere." "Makeup tutorials are everywhere."
+test "The ordinary moments that make up a life well-lived." "The ordinary moments that make up a life well-lived."
# Expected limits / false negatives currently out of scope
diff --git a/weir_rules/OvertimeCompoundNoun.weir b/harper-core/src/linting/weir_rules/OvertimeCompoundNoun.weir
similarity index 100%
rename from weir_rules/OvertimeCompoundNoun.weir
rename to harper-core/src/linting/weir_rules/OvertimeCompoundNoun.weir
diff --git a/weir_rules/PleasRequestVerb.weir b/harper-core/src/linting/weir_rules/PleasRequestVerb.weir
similarity index 100%
rename from weir_rules/PleasRequestVerb.weir
rename to harper-core/src/linting/weir_rules/PleasRequestVerb.weir
diff --git a/weir_rules/PostItNoteHyphen.weir b/harper-core/src/linting/weir_rules/PostItNoteHyphen.weir
similarity index 100%
rename from weir_rules/PostItNoteHyphen.weir
rename to harper-core/src/linting/weir_rules/PostItNoteHyphen.weir
diff --git a/weir_rules/PrincipleToPrincipalRoleNoun.weir b/harper-core/src/linting/weir_rules/PrincipleToPrincipalRoleNoun.weir
similarity index 100%
rename from weir_rules/PrincipleToPrincipalRoleNoun.weir
rename to harper-core/src/linting/weir_rules/PrincipleToPrincipalRoleNoun.weir
diff --git a/weir_rules/RelayOnForRely.weir b/harper-core/src/linting/weir_rules/RelayOnForRely.weir
similarity index 100%
rename from weir_rules/RelayOnForRely.weir
rename to harper-core/src/linting/weir_rules/RelayOnForRely.weir
diff --git a/weir_rules/SneakPeekPreview.weir b/harper-core/src/linting/weir_rules/SneakPeekPreview.weir
similarity index 100%
rename from weir_rules/SneakPeekPreview.weir
rename to harper-core/src/linting/weir_rules/SneakPeekPreview.weir
diff --git a/weir_rules/TheWhetherWeather.weir b/harper-core/src/linting/weir_rules/TheWhetherWeather.weir
similarity index 100%
rename from weir_rules/TheWhetherWeather.weir
rename to harper-core/src/linting/weir_rules/TheWhetherWeather.weir
diff --git a/weir_rules/ThereAfterCompound.weir b/harper-core/src/linting/weir_rules/ThereAfterCompound.weir
similarity index 100%
rename from weir_rules/ThereAfterCompound.weir
rename to harper-core/src/linting/weir_rules/ThereAfterCompound.weir
diff --git a/weir_rules/ThereMissingIsClause.weir b/harper-core/src/linting/weir_rules/ThereMissingIsClause.weir
similarity index 100%
rename from weir_rules/ThereMissingIsClause.weir
rename to harper-core/src/linting/weir_rules/ThereMissingIsClause.weir
diff --git a/weir_rules/ThieveNoun.weir b/harper-core/src/linting/weir_rules/ThieveNoun.weir
similarity index 100%
rename from weir_rules/ThieveNoun.weir
rename to harper-core/src/linting/weir_rules/ThieveNoun.weir
diff --git a/weir_rules/ThinkKnowOff.weir b/harper-core/src/linting/weir_rules/ThinkKnowOff.weir
similarity index 100%
rename from weir_rules/ThinkKnowOff.weir
rename to harper-core/src/linting/weir_rules/ThinkKnowOff.weir
diff --git a/weir_rules/TomorrowPossessiveModifier.weir b/harper-core/src/linting/weir_rules/TomorrowPossessiveModifier.weir
similarity index 100%
rename from weir_rules/TomorrowPossessiveModifier.weir
rename to harper-core/src/linting/weir_rules/TomorrowPossessiveModifier.weir
diff --git a/weir_rules/WasComprisedOf.weir b/harper-core/src/linting/weir_rules/WasComprisedOf.weir
similarity index 100%
rename from weir_rules/WasComprisedOf.weir
rename to harper-core/src/linting/weir_rules/WasComprisedOf.weir
diff --git a/weir_rules/WokVerbTypo.weir b/harper-core/src/linting/weir_rules/WokVerbTypo.weir
similarity index 100%
rename from weir_rules/WokVerbTypo.weir
rename to harper-core/src/linting/weir_rules/WokVerbTypo.weir
diff --git a/weir_rules/YourOutClauseAgreement.weir b/harper-core/src/linting/weir_rules/YourOutClauseAgreement.weir
similarity index 100%
rename from weir_rules/YourOutClauseAgreement.weir
rename to harper-core/src/linting/weir_rules/YourOutClauseAgreement.weir
diff --git a/weir_rules/BelieveInPreposition.weir b/weir_rules/BelieveInPreposition.weir
deleted file mode 100644
index b74d44fd4..000000000
--- a/weir_rules/BelieveInPreposition.weir
+++ /dev/null
@@ -1,37 +0,0 @@
-expr main [(believe to)]
-
-let message "This verb usually takes `in` here."
-let description "Replaces `believe to` with `believe in` in common object-taking usage."
-let kind "Grammar"
-let becomes "believe in"
-let strategy "MatchCase"
-
-# True positives
-
-test "I believe to this plan." "I believe in this plan."
-test "They believe to ghosts." "They believe in ghosts."
-test "Many teens believe to luck." "Many teens believe in luck."
-test "Do you believe to fate?" "Do you believe in fate?"
-test "We still believe to science." "We still believe in science."
-test "I believe to your potential." "I believe in your potential."
-test "BELIEVE TO YOURSELF FOR ONCE." "BELIEVE IN YOURSELF FOR ONCE."
-test "I wonder if you believe to miracles." "I wonder if you believe in miracles."
-
-# True negatives / false positives
-
-allows "I believe in this plan."
-allows "They believe that this plan works."
-allows "I choose to believe this story."
-allows "We believe in each other."
-allows "Do you believe in fate?"
-
-# Known false positives (current boundary)
-
-test "I believe to this day that we were right." "I believe in this day that we were right."
-test "I believe to this moment it is true." "I believe in this moment it is true."
-
-# Potential false negatives (accepted gaps)
-
-allows "She believes to her team."
-allows "We believed to that strategy for years."
-allows "He is believing to the mission again."
diff --git a/weir_rules/ExistentialPluralAgreement.weir b/weir_rules/ExistentialPluralAgreement.weir
deleted file mode 100644
index 0e90e3516..000000000
--- a/weir_rules/ExistentialPluralAgreement.weir
+++ /dev/null
@@ -1,38 +0,0 @@
-expr manyCase <((is there many !a), (is there))>
-expr tooManyCase <((is there too many), (is there))>
-expr fewCase <((is there few), (is there))>
-expr tooFewCase <((is there too few), (is there))>
-expr lotsCase <((is there lots of), (is there))>
-expr main [@manyCase, @tooManyCase, @fewCase, @tooFewCase, @lotsCase]
-
-let message "Use the plural verb form in this existential construction."
-let description "Adjusts `is there` to `are there` when it introduces a plural quantity phrase."
-let kind "Grammar"
-let becomes "are there"
-let strategy "MatchCase"
-
-# True positives
-
-test "Is there many users waiting?" "Are there many users waiting?"
-test "Is there few tickets left?" "Are there few tickets left?"
-test "Is there lots of noise tonight?" "Are there lots of noise tonight?"
-test "Is there too many redirects in this chain?" "Are there too many redirects in this chain?"
-test "Is there too few backups on that node?" "Are there too few backups on that node?"
-test "is there many examples in the guide?" "are there many examples in the guide?"
-test "IS THERE FEW OPTIONS REMAINING?" "ARE THERE FEW OPTIONS REMAINING?"
-test "I asked, is there many reasons to wait?" "I asked, are there many reasons to wait?"
-test "Is there lots of updates this morning?" "Are there lots of updates this morning?"
-
-# True negatives / false positives
-
-allows "Is there a user waiting?"
-allows "Is there an update?"
-allows "Are there many users waiting?"
-allows "There is many users waiting."
-allows "Is there many a reason to pause?"
-allows "Is there lots to do today?"
-
-# Potential false negatives (accepted gaps)
-
-allows "Is there, many users say, no quick fix?"
-allows "Is there really many users waiting?"
diff --git a/weir_rules/FullWithToOf.weir b/weir_rules/FullWithToOf.weir
deleted file mode 100644
index 60e2a4c40..000000000
--- a/weir_rules/FullWithToOf.weir
+++ /dev/null
@@ -1,26 +0,0 @@
-expr main (full with)
-
-let message "Use `of` after `full` in this construction."
-let description "Fixes the nonstandard phrase where `full` is followed by `with`."
-let kind "Usage"
-let becomes "full of"
-
-test "The pantry is full with snacks." "The pantry is full of snacks."
-test "Our inbox is full with alerts again." "Our inbox is full of alerts again."
-test "That thread is full with repeated arguments." "That thread is full of repeated arguments."
-test "Her notebook was full with sketches." "Her notebook was full of sketches."
-test "The comment section is full with bots." "The comment section is full of bots."
-test "A shared folder can be full with duplicate files." "A shared folder can be full of duplicate files."
-test "The cart was full with produce from the market." "The cart was full of produce from the market."
-test "Their feed is FULL WITH memes." "Their feed is FULL OF memes."
-test "By noon, the queue was full with pending jobs." "By noon, the queue was full of pending jobs."
-test "The room felt full with tension before the vote." "The room felt full of tension before the vote."
-
-test "The pantry is full of snacks." "The pantry is full of snacks."
-test "The glass is full." "The glass is full."
-test "The form is full-width on desktop." "The form is full-width on desktop."
-test "This section applies in full with respect to archived records." "This section applies in full of respect to archived records."
-test "Please fill the tank with fuel before sunrise." "Please fill the tank with fuel before sunrise."
-test "His hands were full with gloves on top." "His hands were full of gloves on top."
-test "A suitcase full with souvenirs sat by the door." "A suitcase full of souvenirs sat by the door."
-test "FULL with placeholders, the draft was still useful." "FULL of placeholders, the draft was still useful."
diff --git a/weir_rules/InAdjectiveMatter.weir b/weir_rules/InAdjectiveMatter.weir
deleted file mode 100644
index bca098e1f..000000000
--- a/weir_rules/InAdjectiveMatter.weir
+++ /dev/null
@@ -1,41 +0,0 @@
-expr booster [very, really, quite, fairly, rather, pretty, extremely]
-expr article [a, an]
-expr blockedAdj [legal, criminal, financial, policy, personnel, security, administrative, regulatory, disciplinary, constitutional, civil, private, public, diplomatic, technical, medical, tax]
-expr plainCase <((in @article !@blockedAdj matter), (matter))>
-expr boostedCase <((in @article @booster !@blockedAdj matter), (matter))>
-expr main [@plainCase, @boostedCase]
-
-let message "In this wording, `manner` is usually the intended noun."
-let description "Swaps `matter` to `manner` after `in a/an` plus a descriptive adjective, while skipping common topic-domain usages."
-let kind "Grammar"
-let becomes "manner"
-let strategy "MatchCase"
-
-# True positives
-
-test "Please answer in a respectful matter." "Please answer in a respectful manner."
-test "He spoke in a calm matter during the meeting." "He spoke in a calm manner during the meeting."
-test "She handled it in an efficient matter." "She handled it in an efficient manner."
-test "Try to react in a professional matter." "Try to react in a professional manner."
-test "They negotiated in a patient matter." "They negotiated in a patient manner."
-test "We should respond in a clear matter." "We should respond in a clear manner."
-test "She presented it in a very thoughtful matter." "She presented it in a very thoughtful manner."
-test "Please discuss this in a really careful matter." "Please discuss this in a really careful manner."
-test "IN A CALM MATTER, EXPLAIN THE ISSUE." "IN A CALM MANNER, EXPLAIN THE ISSUE."
-
-# False positives / true negatives
-
-allows "The case is now in a legal matter docket."
-allows "They consulted counsel in a financial matter."
-allows "The agency intervened in a regulatory matter."
-allows "This belongs in a private matter file."
-allows "He spoke in a calm manner during the meeting."
-allows "Please answer respectfully."
-
-# False negatives / boundary behavior
-
-allows "Please answer in a matter of minutes."
-allows "The report was in an order that looked odd."
-allows "They worked in a super calm matter."
-allows "Try to respond in a, calm matter."
-allows "We discussed this in careful matter."
diff --git a/weir_rules/SayTellYou.weir b/weir_rules/SayTellYou.weir
deleted file mode 100644
index c0ce021b4..000000000
--- a/weir_rules/SayTellYou.weir
+++ /dev/null
@@ -1,30 +0,0 @@
-expr guard ![AUX, VERB]
-expr main <((say you) @guard), (say)>
-
-let message "Use `tell` when your direct object is the person you are naming."
-let description "`say` wants a clause after it; when a person (`you`) appears as the object, swap in `tell`."
-let kind "Usage"
-let becomes "tell"
-let strategy "MatchCase"
-
-# True positives
-
-test "I want to say you the truth." "I want to tell you the truth."
-test "Can I say you something before we leave?" "Can I tell you something before we leave?"
-test "He promised to say you the rules at the meeting." "He promised to tell you the rules at the meeting."
-test "Say you the news once it lands." "Tell you the news once it lands."
-test "I'll say you the password later today." "I'll tell you the password later today."
-test "Say you, in private, anything you need." "Tell you, in private, anything you need."
-test "They plan to say you her schedule before noon." "They plan to tell you her schedule before noon."
-test "She started to say you the whole saga." "She started to tell you the whole saga."
-test "say you your concerns, and I'll listen." "tell you your concerns, and I'll listen."
-test "SAY YOU THIS IDEA NEEDS REVIEW." "TELL YOU THIS IDEA NEEDS REVIEW."
-
-# True negatives / false positives
-
-allows "Say you are wrong."
-allows "Say you will wait until tomorrow."
-allows "Say you have seen the problem."
-allows "Say you can help with this."
-allows "Say you like that idea."
-allows "Say you might be right."