Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"there" vs "their" lint bug #267

Open
lukasmwerner opened this issue Nov 5, 2024 · 1 comment
Open

"there" vs "their" lint bug #267

lukasmwerner opened this issue Nov 5, 2024 · 1 comment
Labels
bug Something isn't working linting

Comments

@lukasmwerner
Copy link
Contributor

When checking an assignment I was working on I had the following false negative suggestion: Replace with: “their” harper_ls on the sentence: "Were there any special insights you had?"

This checking was done via harper_ls and in a html document
the full html reproducible snippet is the following:

<p id="question">What did you learn from the assignment? Were there any special insights you had? What did you find that you already knew?</p>
@lukasmwerner lukasmwerner added the bug Something isn't working label Nov 5, 2024
@grantlemons
Copy link
Contributor

It looks like the current implementation looks for a noun or adjectives then a noun after the, which---since any is an adjective---flags it for replacement.

EitherPattern::new(vec![
    Box::new(
        SequencePattern::default()
            .then_one_or_more_adjectives()
            .then_whitespace()
            .then_noun(),
    ),
    Box::new(SequencePattern::default().then_noun()),
]),

This seems like a pretty flawed implementation, I can think of several examples off the top of my head that would cause a false positive, seemingly all questions.

  • Were there cats at her house?
  • Were there any apples at the store?
  • Were there many kinds of fruit at the store?
  • Were there more than, or less, than six people at the party?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linting
Projects
None yet
Development

No branches or pull requests

2 participants