Skip to content

feat: have ways to go → have a ways to go - #3810

Merged
hippietrail merged 6 commits into
Automattic:masterfrom
hippietrail:a-ways-to-go
Jul 22, 2026
Merged

feat: have ways to go → have a ways to go#3810
hippietrail merged 6 commits into
Automattic:masterfrom
hippietrail:a-ways-to-go

Conversation

@hippietrail

Copy link
Copy Markdown
Collaborator

Issues

N/A

Description

Some people hypercorrect the idiom "a ways to go" by removing the indefinite article which would seem to conflict with the plural noun "ways".

The linter handles all the false positives I could identify. It requires either the word "still" before "ways to go", or a few words or phrases that seem to occur only with the idiom and not literal texts about multiple paths to take.

Includes a new find_the_only_token_index_matching() method on ExprLinter so we can use InsertAfter rather than implement InsertBefore.

(Also includes silencing all the new warnings though they're unrelated.)

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 asked Google Search AI for refactoring help as well as my editor'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 enabled auto-merge July 22, 2026 07:17
@hippietrail
hippietrail added this pull request to the merge queue Jul 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 22, 2026
@hippietrail
hippietrail added this pull request to the merge queue Jul 22, 2026
Merged via the queue into Automattic:master with commit 1a37d21 Jul 22, 2026
12 checks passed
@hippietrail
hippietrail deleted the a-ways-to-go branch July 22, 2026 09:42
elijah-potter pushed a commit that referenced this pull request Jul 28, 2026
* feat: have ways to go → have a ways to go

Includes a new `find_the_only_token_index_matching()`

Includes silencing all the new warnings though they're unrelated.

* refactor: DRY out `find_the_only_token_index_matching()` vs `find_the_only_token_matching()`

* fix: the new errors clippy doesn't mention but cause CI to fail

* fix: more CI-only errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant