Warn on Fullwidth Exclamation Mark (U+FF01) in comment
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
//! A
//!B
//! C
For the above Rust source code, rustdoc produces documentation containing only "A C". The line containing "B" is only a comment. The comment starts with https://www.compart.com/en/unicode/U+FF01.
I caught this in a real-world documentation PR from a Chinese contributor. See https://github.com/rust-lang/rust/pull/134241#pullrequestreview-2523541705.
In GitHub, the distinction is practically invisible.
In my text editor, it is more obvious.
Would it be reasonable for rustc and/or rustdoc to have reported a lint on such code?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by investigating how rustc and rustdoc recognize documentation comments and how existing lints report suspicious Unicode; define done as a warning for a comment beginning with U+FF01 without changing ordinary comment handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100