Automattic / Automattic/harper

Flag verbs agreeing with their object instead of with the subject

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

Description

This kind of usage is all over YouTube and everywhere else these days. Apparently it's known as "proximity agreement" or "attraction".

Examples:
- Some people are saying that Jimmy buying a bank whose main **product** **are** payday _loans_ targeted towards the youth sounds predatory. → ... whose main **product** **is** payday _loans_ ...
- The biggest **issue** I face daily **are** silent compiler _errors_ (SIGBUS) for trivial things, e.g. a typo in an import path.
- However, **one** of the huge factors that many are dissecting right now **are** the _shoes_.
- The only **upgrade** **are** the _wheels_ taken from a GTS, which are wider, 10in at the back and 8 in at the front.
- **80%** of it **are** _cliffs_ that plunge straight into the ocean and the other 20% are exposed reefs and beaches.
- Another **benefit** **are** _shaders_.
- **One** of the _things_ they found **were** these large directional antennas.
- The first **bucket** **are** _Legos_ that were sold and the proceeds of which were returned to Manel or Lego sets that were not sold and and given back to him.
- So, the scarce **resource** **are** experienced _maintainers_, which is why, as Greg put it, Linux optimizes for reviewers, not developers.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named in the issue, so begin by locating the grammar-rule implementation and its existing agreement tests. Use the listed examples to determine the expected warnings, and consider the work done when these subject–verb attraction cases are consistently flagged without regressing existing agreement checks.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.