Automattic / Automattic/harper
Should flag questions lacking a question mark.
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 106
Description
**The Error**
**Examples:**
1. Do you often see questions like this.
2. Can they be fixed
3. Why does it happen!
4. Am I the only one who is annoyed.
**Potential Edge Cases**
Detecting questions is not as straightforward as you might think when the `?` is missing.
They mostly start a present of past form of "be" or "do", a modal verb such as "can" or "should", or an interrogative word such as "what" or "how". In all the verb cases, the negative contractions are also possible.
But this isn't enough on its own. Many statements also fit this pattern.
Maybe the interrogatives have to precede one of those types of verbs, and maybe a pronoun in subject form has to follow said verb?
**Implementation**
It might be easier to implement if there were a version of `ExprLinter` that worked on sentences rather than "chunks".
Contributor guide
Research direction
Start by locating the existing ExprLinter and understanding how it processes chunks, then assess what a sentence-level version would need for this rule. Use the examples and listed verb, contraction, interrogative, and subject patterns as the behavior to evaluate; done means reliably flagging questions without a question mark while avoiding matching ordinary statements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100