Automattic / Automattic/harper

False positive: in addition to <adjective> inside of parenthetical or nonrestrictive clause

Open
#2,206 1 comment 1 reaction 0 assignees View on GitHub
bug harper-core linting punctuation
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
102

Description

**What got flagged?**
> This builds themes of spiritual (in addition to personal) failure
> This builds themes of spiritual, in addition to personal, failure

"To" was flagged and suggested to be replaced with "too".

When the clause does not end after the adjective, the linter correctly picks up on the fact that the to is not meant to be a too, but when it does (as in a parenthetical or nonrestrictive comma clauses), it incorrectly suggests replacing the to.

**Why is this incorrect?**
Just reading it, this is not correct:
"this builds themes of spiritual, in addition too personal, failure"

**Example of correct usage:**
No correction should be offered here.

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating the rule that suggests replacing “to” with “too,” then reproduce the parenthetical and nonrestrictive-clause examples from the issue. Done means neither example receives a correction suggestion, with a regression test covering both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.