Automattic / Automattic/harper

Need to flag "trying to" followed by another verb in the gerund/present participle form

Open
#4,304 0 comments 0 reactions 0 assignees View on GitHub
enhancement grammar harper-core linting
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

Image

> if this is trying to competing with v8/llm

I wonder if we need a list of verbs which have a special sense followed by to? You can follow any verb by "to" with the meaning of "in order to", but there are also a set of verbs which have a special sense, such as "try to", "need to", "want to", "have to", "intend to", "ought to", "afford to", "pretend to", etc.

Or maybe `*ing to *ing` is enough?

----
I played with this a bit and there would be false positives with such a naïve approach:
- From **needing to wanting**.
- Corrects the wrong preposition `on` to `in` when **referring to writing** code.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the quoted "trying to competing" example and the listed false positives. Decide whether the rule should target a verb list or the broader pattern, then verify that the chosen behavior catches the reported construction without correcting "needing to wanting" or "referring to writing" incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.