U0008 ui-label-punctuation¶
Rule: UI text writes the ellipsis as one character and button labels end without a full stop.
| Code | U0008 (stable, never reused) |
| Id | ui-label-punctuation |
| Category | ui |
| Source | spirit_level |
| Fix | exact: spl check --fix applies it |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | off | |
| small-workspace | off | |
| medium | off | |
| big | off | |
| ai | off | |
| embedded | off | |
| ui | deny |
one way to write the ellipsis and button labels; certain, rare, and spl check --fix applies it |
| egui | deny |
one way to write the ellipsis and button labels; certain, rare, and spl check --fix applies it |
| units-strict | off | |
| units-paranoid | off |
Parameters¶
| Name | Type | Default | Meaning |
|---|---|---|---|
calls |
list of strings | [] |
calls that show text to a person |
button-calls |
list of strings | [] |
calls that make a button from a label |
toolkits |
list of strings | ["egui", "eframe", "iced", "slint", "gtk4", "relm4", "dioxus", "leptos", "yew", "floem", "xilem", "makepad-widgets"] |
UI toolkits: a crate that depends on one directly is a UI crate, unless the crate map says ui = false |
Why¶
The same wording everywhere: a button that opens a dialog ends in "…", the one character, and a button label is an action, not a sentence, so it ends without a full stop. Three dots break differently, read differently to a screen reader and look different in proportional fonts.
The lint reports:
- "..." in text of the calls in
calls; - a full stop at the end of a label of
button-calls.
The ui tier knows no toolkit, so both lists are empty; the egui tier fills them. Whether a button opens a dialog is for review.
How to fix¶
spl check --fix writes "…" and drops the full stop.
Configure¶
[lints.ui-label-punctuation]
level = "deny"
calls = []
button-calls = []
toolkits = ["egui", "eframe", "iced", "slint", "gtk4", "relm4", "dioxus", "leptos", "yew", "floem", "xilem", "makepad-widgets"]
reason = "why this project wants it at this level"
Allow one finding in the code with // spirit-level: allow(ui-label-punctuation) <reason> (waivers); the code works there too, as in [lints.U0008].