P0010 emoji¶
Rule: Docs and comments carry no emoji.
| Code | P0010 (stable, never reused) |
| Id | emoji |
| Category | prose |
| Source | spirit_level |
| Fix | by hand |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | off | |
| small-workspace | off | |
| medium | off | |
| big | off | |
| ai | warn |
emoji do not grep, diff or render the same everywhere |
| embedded | off | |
| ui | off | |
| egui | off | |
| units-strict | off | |
| units-paranoid | off |
Parameters¶
| Name | Type | Default | Meaning |
|---|---|---|---|
allow |
list of strings | ["✅", "🚧", "📋", "🐛"] |
emoji allowed (status marks of FEATURES.md) |
files |
list of strings | ["**/*.md"] |
globs of the Markdown files checked, relative to the root |
skip |
list of strings | [] |
globs of Markdown files left out |
comments |
boolean | true |
also check Rust comments |
Why¶
Emoji in docs and comments are decoration that agents add by habit: they do not grep, they render differently on every terminal, and they carry no meaning a word would not carry better. Status marks a project uses on purpose go into allow.
The rule checks pictographs, symbols and dingbats (not arrows, math or box drawing) in the Markdown files of files and in Rust comments; code spans and quoted text are left out.
How to fix¶
Say it in words, or add the mark to allow when the project uses it with a fixed meaning.
Configure¶
[lints.emoji]
level = "deny"
allow = ["✅", "🚧", "📋", "🐛"]
files = ["**/*.md"]
skip = []
comments = true
reason = "why this project wants it at this level"
Allow one finding in the code with // spirit-level: allow(emoji) <reason> (waivers); the code works there too, as in [lints.P0010].