Automattic / Automattic/harper
Automatic file and/or project vocabulary
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 102
Description
**What problem does this solve?**
Often in programming in comments, it would be really useful to have spell checking enabled - but because of all the specific terminology in the file (eg "BlogPost", "CommentCount", "color_mapper", etc) it has to be disabled to prevent thousands of false positives.
**Proposed Solution**
There could be two options "FileVocabulary" and possibly a "ProjectVocabulary" which automatically add variable names / keywords / etc (anything *outside* of the checked comments, essentially) in to the current vocab while checking the file.
I don't know whether the ProjectVocabulary is possible, or easily possible, but I think the file based one would help a lot.
**Examples**
```python
from pages.models import BasePage
class MagicalPage(BasePage):
"""
MagicalPage takes a lot of details from BasePage and includes all the
extra magic that makes it so special.
"""
```
Should not raise any spelling validation issues - as MagicalPage & BasePage are mentioned outside of the comment text.
But then
```python
# update MagcialPage to have more data
```
would have a spelling issue, as there is a typo there.
Contributor guide
Research direction
No implementation files, tests, or entry points are named. Start by tracing Harper’s current comment spell-checking and vocabulary handling, then use the Python examples as acceptance cases: identifiers outside comments are accepted, while misspellings inside comments are still reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100