Skip to content

U0007 ui-more-count

Rule: A cut list ends in a fold that opens to every item, never in "N more".

Code U0007 (stable, never reused)
Id ui-more-count
Category ui
Source spirit_level
Fix by hand

Level per tier

Tier Level Reason
small off
small-workspace off
medium off
big off
ai off
embedded off
ui warn "N more" hides items the person may need; a fold shows them on demand
egui warn "N more" hides items the person may need; a fold (ve_basics::fold_rest) shows them on demand
units-strict off
units-paranoid off

Parameters

Name Type Default Meaning
words list of strings ["more", "others"] words that, after a number, say how many items are not shown
fold-calls list of strings [] calls that make a fold, whose header may count what it holds
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

A list cut for room that ends in "3 more" or "…and 12 others" hides the items the person may need, and gives no way to see them. The practice: the rest goes under a fold, collapsed by default, whose header says what is inside and which opens to every item.

The lint reports a string literal in a UI crate where a number or a format placeholder is followed by one of words (more, others): "{} more", "and {n} others". Text in the arguments of fold-calls is a fold's header, which says what it holds ("3 more subagents, not busy"), and is not reported. Findings are estimates: the text may be a count with its own way to see the items. Two forms are fine where vhrd_egui allows them: a compact size of a widget that shows a count whose tooltip lists the items, and a +N chip in a cell of fixed width.

How to fix

End the list in a fold (vhrd_egui: ve_basics::fold_rest, or ScrollStrip for a row of chips). A bot or a CLI offers the rest as a button or --all.

Configure

[lints.ui-more-count]
level = "deny"
words = ["more", "others"]
fold-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-more-count) <reason> (waivers); the code works there too, as in [lints.U0007].