Skip to content

feat: USD dollars→USD/US dollars#3467

Open
hippietrail wants to merge 2 commits into
Automattic:masterfrom
hippietrail:usd-dollars
Open

feat: USD dollars→USD/US dollars#3467
hippietrail wants to merge 2 commits into
Automattic:masterfrom
hippietrail:usd-dollars

Conversation

@hippietrail
Copy link
Copy Markdown
Collaborator

Issues

N/A

Description

Recently I heard people redundantly say the redundant "USD dollars" recently.

This PR enhances the RedundantAcronyms linter to fix this. Since "USD" is treated as an invariant plural like "sheep", new logic was needed to handle it. Since "PIN" also needed special logic, I added a Flag enum that can indicate either.

The Windsurf AI agent worked for a few seconds and I liked the logic it implemented to support the enum.

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 rust Pull requests that update Rust code linting labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linting rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant