Automattic / Automattic/harper

Misses "to many [plural noun]" -> "too many [plural noun]" and other "to" --> "too" errors

Open
#3,939 1 comment 1 reaction 0 assignees View on GitHub
enhancement false-negative harper-core linting
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

# Examples:
"Too" (misspelled as "to") is always an adjective here and must be corrected
1. "There are to many berries." (remove "berries" and it works)
1. "To many people and the boat may sink."
1. "He likes to many types of chili peppers."
1. "To little effort was put into the project."
1. "We have to much food!" (LanguageTool detects this)
1. "To little"
1. "To loud"
1. "Is she **to** angry to read this?" (LanguageTool detects this)

# Edge cases:
Here "to" is a preposition which should not be corrected to "too".
1. "To many the world is beautiful."
1. "To few the chair is comfortable." (LanguageTool incorrectly suggests "to" --> "too"!)
1. "To many people live on Earth." (ambiguous as pointed out in [a comment](https://github.com/Automattic/harper/issues/3939#issuecomment-5155946914))

Contributor guide

Open the contributing guide

Research direction

Start with issue #3939's examples and edge cases, then locate the existing grammar-rule entry point and its related tests. Check the reported positive cases alongside the prepositional and ambiguous cases; done means the intended “too” errors are detected without changing the documented exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.