Skip to content

feat(weir): add BoarderBorder rule to catch boarder/border word confusion#3481

Open
jlaportebot wants to merge 2 commits into
Automattic:masterfrom
jlaportebot:fix/boarder-border-confusion
Open

feat(weir): add BoarderBorder rule to catch boarder/border word confusion#3481
jlaportebot wants to merge 2 commits into
Automattic:masterfrom
jlaportebot:fix/boarder-border-confusion

Conversation

@jlaportebot
Copy link
Copy Markdown
Contributor

@jlaportebot jlaportebot commented May 23, 2026

@/tmp/pr3481_body.md

Copy link
Copy Markdown
Collaborator

@hippietrail hippietrail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Watch out with overusing "typo".


let message "Did you mean `border`?"
let description "Flags likely typo cases where `boarder` (a lodger) appears where `border` (an edge/boundary) is expected."
let kind "Typo"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost never a typo. I asked Google AI for the difference:

A typo happens when you know how to spell a word, but your fingers hit the wrong key, slip, or you type too fast. You meant to type "the", but accidentally hit "teh". It is a physical "slip of the hand".

The other kind is an actual spelling mistake. This occurs when you do not know the correct spelling of a word and mistakenly spell it the wrong way (e.g., spelling "definitely" as "definately").

@jlaportebot
Copy link
Copy Markdown
Contributor Author

Good point, @hippietrail! I've updated the rule:

  1. Changed let kind from "Typo" to "Spelling" — this is a spelling confusion (using the wrong homophone), not a physical slip of the hand.
  2. Updated the description and comments to say "spelling confusion" instead of "typo"

This aligns with other similar Weir rules like ToLoseTooLoose, YeaToYeah, and InLieuOf which all use "Spelling" as their kind. Pushed in 2709d14.

@jlaportebot
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback @hippietrail — I completely agree. This is a spelling confusion, not a typo. The current version of the rule already uses let kind "Spelling" (changed from Typo in commit 2709d14, then briefly went to WordChoice and back to Spelling in the latest commits). The kind is correct now — sorry for the noise from the intermediate commits!

@jlaportebot
Copy link
Copy Markdown
Contributor Author

Good point about the distinction. The rule already uses WordChoice as its kind (not Typo or Spelling) and the description says "word confusion" rather than "typo". Boarder↔Border is a genuine lexical confusion, not a finger-slip typo.

@jlaportebot jlaportebot force-pushed the fix/boarder-border-confusion branch from 37b6ebc to bc98dbb Compare May 31, 2026 08:00
@jlaportebot jlaportebot changed the title feat(weir): add BoarderBorder rule to catch boarder/border typo feat(weir): add BoarderBorder rule to catch boarder/border word confusion May 31, 2026
…sion

Flags boarder when used in contexts where border (edge/boundary) is intended:
- boarder of/between/around/with/on + cross the boarder
- Does NOT flag legitimate lodger-sense boarder
- Uses WordChoice kind (not Typo) — this is a word confusion, not a typo

Closes Automattic#3471
@jlaportebot jlaportebot force-pushed the fix/boarder-border-confusion branch from bc98dbb to e9aa462 Compare May 31, 2026 15:28
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.

2 participants