Skip to content

feat: for nth time→for the nth time - #3750

Merged
hippietrail merged 1 commit into
Automattic:masterfrom
hippietrail:for-nth-time
Jul 2, 2026
Merged

feat: for nth time→for the nth time#3750
hippietrail merged 1 commit into
Automattic:masterfrom
hippietrail:for-nth-time

Conversation

@hippietrail

Copy link
Copy Markdown
Collaborator

Issues

N/A

Description

Somewhere I came across someone using "for first time" instead of "for the first time". This is very common amongst people still learning English as a second language, and probably some native speakers writing in a hurry or abbreviated style write it sometimes too.

This works for all single-word ordinals from "first" to "billionth". Plus some casuals like "zeroth", "umpteenth", "nth".

It avoids cases where "first time" etc is part of an adjective such as "first time buyers" by only considering when "time" is the last word in a "chunk" or when followed by "and" or "but".

Fuzzing would be appreciated. Please file issues any false positives or false negatives found.

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.

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 linting Related to lint rules and linter execution labels Jul 2, 2026
@hippietrail
hippietrail enabled auto-merge July 2, 2026 10:53
@hippietrail
hippietrail added this pull request to the merge queue Jul 2, 2026
Merged via the queue into Automattic:master with commit 3fbcbda Jul 2, 2026
12 checks passed
@hippietrail
hippietrail deleted the for-nth-time branch July 2, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 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