Automattic / Automattic/harper

Problems with the it's→its linter

Open
#2,220 0 comments 1 reaction 0 assignees View on GitHub
bug linting punctuation
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

**Describe the bug**

1. `it's` with an ASCII apostrophe is linted to change to `its` but `it’s` with a Unicode apostrophe is not.
2. The `LintKind` is erroneously set to `Agreement` but that's for things like "these is" or "they says" where two POSes that have properties that must "agree", such as "number" (singular vs plural). This is a kind of spelling mistake but `Punctuation` is a tighter fit.

**Screenshots**

`it's` with an ASCII/typewriter apostrophe is linted:
Image

`it’s` with a typesetting/"smart" apostrophe is not linted:

Image

Contributor guide

Open the contributing guide

Research direction

Locate the linter rule handling “it's” and the code assigning its LintKind. First compare the ASCII and Unicode apostrophe cases, then add or update focused tests so both forms are linted consistently and the classification is Punctuation rather than Agreement.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
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.