Automattic / Automattic/harper
Incorrect OrthographicConsistency flag when word is connected to code
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 102
Description
I'm trying to have harper enabled as an LSP based linter as I edit code, but have consistently run into a bogus diagnostic in Typst script files. For example this line throws a bogus diagnostic:
https://github.com/alerque/decasify/blob/641fd3f1e695c82cc5706bc1f5f6d8269d5bc3c7/typst/decasify.typ#L24
All instances of `text.lang` in this file (and others) are flagged. This is totally bogus however, this is accessing a standard Typst API and a case sensitive property reference. Capitalizing it would be bogus. In fact I'm not sure what language or context something like this would ever be valid, but this would be bogus in most of the ones I can think of off the top of my head.
I've seen #2156 which is similar, but doesn't seem to be the same issue.
Contributor guide
Research direction
Start with the linked typst/decasify.typ example at line 24 and inspect how the OrthographicConsistency diagnostic treats words connected to code. Compare the behavior with issue #2156; done means standard case-sensitive references such as `text.lang` no longer receive a bogus capitalization diagnostic while ordinary orthographic checks remain intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100