Automattic / Automattic/harper

`ExpandMemoryShorthands` flags `B` to expand to "bytes" when it's part of a hyphenated term.

Open
#1,932 0 comments 0 reactions 0 assignees View on GitHub
bug harper-core linting punctuation
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 12h
Merged PRs (30d)
106

Description

**What got flagged?**

Image

**Why is this incorrect?**

This `B` is part of the hyphenated compound term `B-tree`. But that would often be written as `B tree` without the hyphen, so shouldn't be flagged either.

Contributor guide

Open the contributing guide

Research direction

Start at the ExpandMemoryShorthands rule and reproduce the report with the hyphenated term B-tree and the unhyphenated form B tree. Trace how each form is classified, then add coverage showing that the B in both forms is not expanded to "bytes"; the issue is done when those examples no longer trigger the incorrect flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.