Skip to content

feat: for same reason→for the same reason - #3941

Open
hippietrail wants to merge 3 commits into
Automattic:masterfrom
hippietrail:for-same-reason
Open

feat: for same reason→for the same reason#3941
hippietrail wants to merge 3 commits into
Automattic:masterfrom
hippietrail:for-same-reason

Conversation

@hippietrail

Copy link
Copy Markdown
Collaborator

Issues

N/A

Description

This one's been in my inbox for a while. People use "for x reason" instead of "for the x reason" or "for reasons".
This linter fixes all the common ones I could find.

I also converted WordSet into a real Rust collection that works with .collect() by implementing FromIterator thanks to Google Search's AI giving me really good tips on how to best use WordSet with a transformed collection rather than its usual static array of static &str.

This linter does not convert existing callsites of WordSet.

How Has This Been Tested?

cargo test

AI Disclosure

  • I am a human and didn't use any AI.
  • I used LLM features of my editor, but not an agent.
  • I used an AI agent interactively.
  • I am an agent or I got an agent to do the work autonomously.

I also used Google Search's AI.

If Your PR Implements or Enhances a Linter

  • I made up the sentences in the unit tests.
  • The sentences in the unit tests were generated by an AI.
  • I'm using examples from the bug report / feature request.
  • I collected real-world sentences for the unit tests.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have considered splitting this into smaller pull requests.

@hippietrail hippietrail added enhancement New feature or request rust Pull requests that update Rust code harper-core Related to the core grammar checking engine linting Related to lint rules and linter execution labels Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request harper-core Related to the core grammar checking engine linting Related to lint rules and linter execution rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant