Automattic / Automattic/harper

Oxford comma false positive

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

Description

The sentence "Last year, a friend and I were at the beach." wrongly triggers the Oxford comma error:

```
cargo run --bin harper-cli lint /tmp/oxford.md
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.16s
Running `target/debug/harper-cli lint /tmp/oxford.md`
/home/ux/.config/harper-ls/dictionary.txt: No such file or directory (os error 2)
/home/ux/.local/share/harper-ls/file_dictionaries/tmp%oxford.md%: No such file or directory (os error 2)
Advice:
╭─[oxford.md:1:1]

1 │ Last year, a friend and I were at the beach.
│ ───┬──
│ ╰──── An Oxford comma is necessary here.
───╯
```

Tested with Harper 0.37.0

Contributor guide

Open the contributing guide

Research direction

Start with the reported `harper-cli lint /tmp/oxford.md` reproduction and trace the Oxford comma diagnostic for the sentence shown. Done means this sentence no longer triggers a false positive while genuine Oxford comma errors continue to be reported.

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.