Automattic / Automattic/harper

Harper suggests I change the two dashes starting mail signatures to an em-dash

Open
#2,623 3 comments 0 reactions 0 assignees View on GitHub
bug harper-core linting
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
102

Description

**What got flagged?**
I write mail in Neovim (in a TUI mail client). Harper suggests I change the `-- ` near the end of the file that starts the user's signature to an em-dash. I have no way to add it to a dictionary — not that Harper offers to. I do use em-dashes in general, so I don't want to disable the feature, and I couldn't add it to a workspace dictionary because mail files being composed are in `/tmp/`.

**Why is this incorrect?**
`-- ` is the standard delimiter for an email [signature block](https://en.wikipedia.org/wiki/Signature_block). If I change it my signature won't be recognized.

**Example of correct usage:**
The following file, `mail` filetype in Vim/Neovim, be considered correct by Harper.
```
Hello world.

--
John Smith
```

**Suggested solution**
Perhaps Harper could ignore `-- ` in mail files when it's the only thing on the line?

Contributor guide

Open the contributing guide

Research direction

Start by tracing Harper's handling of the `-- ` line in mail or Neovim input and identify the rule that suggests an em-dash. Confirm that the signature delimiter is ignored only when it is the sole line content, while ordinary em-dash checks remain active; add a regression test for the shown example.

Written by the indexing model from the issue text.

Assessment

Tech stack
neovim, 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.