test: pin phrasal-verb handling of "rollback" and "comeback" (#3239) - #3884
Merged
Merged
Conversation
…tic#3239) Both words are compound nouns whose dictionary entries once carried a stray verb flag inherited from an old Wiktionary import. While that flag was present the linter treated them as legitimate verbs and skipped them, so "I'm not going to rollback again" went unflagged. The dictionary entries are correct now and PhrasalVerbAsCompoundNoun handles both words, but nothing in the suite pinned that. The failure mode is worth guarding specifically: a data flag silently disabling a rule produces no error anywhere, and the rule keeps passing its other tests. Uses the sentences from the issue, plus a negative case so the nouns themselves stay unflagged. 5677 tests pass.
Collaborator
|
You're right. Some intermediate change must've fixed it by coincidence. I'm just going to quickly test locally then I'm pretty sure I should be able to merge this. Thanks. Oh I just noticed your observation about the dictionary. That rings a bell. I know I have spotted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re: #3239
What I found
I went to fix this and found it already works on
master. Both sentences from the issue behave correctly now:The dictionary entries are clean
rollback/~NSgandcomeback/~NgS, noVflag soPhrasalVerbAsCompoundNounreaches them and the generic particle logic does the rest (backis inparticle_endings, androll/comeboth carryV).So this issue looks resolvable as fixed, and I didn't want to open a PR pretending otherwise.
What this PR adds instead
Regression tests, because nothing currently pins it. I grepped there is no test mentioning
rollbackorcomebackanywhere in the suite.That gap seemed worth closing specifically because of how this bug worked: a stray verb flag in the dictionary silently disables the rule for that word. It throws no error, and the linter keeps passing all its other tests, so the regression would be invisible until someone reported it again.
Three tests using the issue's own sentences:
flag_rollback_used_as_a_verb_issue_3239flag_comeback_used_as_a_verb_issue_3239dont_flag_rollback_or_comeback_as_nouns_issue_3239negative case, so the nouns themselves stay unflaggedcargo test -p harper-core --lib: 5677 passed, 0 failed.Happy to close this if you'd rather just close the issue without the tests, or to fold them into an existing test if you prefer them grouped differently.