rust-lang / rust-lang/rust-clippy
Detect `:emoji:` in documentation and suggest using Unicode emoji directly
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
What it does
If you use :emoji: (e.g. :rocket: for 🚀 or :crab: for 🦀) in documentation (e.g. README.md), it'll show up properly on github, but then not work in other places such as crates.io that don't include :emoji: support in their Markdown renderer.
Clippy could detect some of the most common emoji in documentation, and emit a rustfix-enabled suggestion to use the real Unicode emoji character instead.
Note: I'm not suggesting having a complete, comprehensive list of emoji names for detection, not least of which because that'd be more prone to false positives. I'm suggesting checking for the top few dozen commonly used emoji names.
Advantage
No response
Drawbacks
False positives. For instance, :thread: gets detected in the middle of std::thread::available_parallelism. That said, that isn't a problem when following the best practice of writing paths like that in backquotes,
Example
See the README of https://crates.io/crates/wtransport/0.4.0 for examples like :rocket:.
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
The issue targets documentation such as README.md and uses 🚀 and 🦀 as examples; start by locating Clippy's documentation-lint entry points and existing rustfix tests. Define the supported common names and false-positive behavior, then verify that documentation examples produce Unicode replacement suggestions without incorrectly flagging ordinary Rust paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100