Diagnostic codes
Every problem Tuimark finds is a diagnostic with a stable code. The letter names the pass (V parse, L layout, B bind), and the dump lists each one under errors with its severity, code, message, and source position. A dump with any error-severity diagnostic has "ok": false, and the CLI exits 2. Link to a code with its anchor, like /reference/diagnostics#v003.
Parse (V…)
Reported while reading the .tui document and its stylesheets. Most are errors: the dump is not ok.
| Code | When |
|---|---|
V001 | unknown tag; a version="2" tag in a version="1" document (message ends with (requires version="2")); input, button, list, modal, table, tabs, or tab inside a container each template |
V002 | unknown attribute; a version="2" attribute in a version="1" document (with the same hint); focusable, on:click, or on:focus inside a container each template; a version="3" attribute (stick on scroll, focus on modal, when on keymap, priority on column, scale on sparkline) in a version="1" or version="2" document, with (requires version="3") (on a 0.2b tag in a version="1" document only that tag's V001 is reported); stick inside a list <item> or a container each template (version="3") |
V003 | bad unit / color / token / CSS property; a version other than 1, 2, or 3; a version="2" value, property, pseudo-class, media feature, or built-in action in a version="1" document (with the hint); switch-to without to; a hyphenated built-in in an on:* attribute; a tab without a non-empty label; {path} in label, short, mark, or keycap; a sparkline without bind; a bad scope, min, or max; in a version="1" or version="2" document, with (requires version="3"): {path} in a tab's label or short, row-gap/column-gap, or the wrap values truncate-start/truncate-middle (an invalid wrap value lists the two only in a version="3" document); stick other than bottom, or stick on a scroll with axis="x"; a bad selector in a <keymap>'s when, once, at the <keymap>; a priority that is not a non-negative integer; a scale that is not a plain identifier (version="3") |
V004 | duplicate id; any id inside a container each template (version="2") |
V005 | not well-formed XML; or not a Tuimark document: a root element other than <tui> (or the phase-0 alias <app>), or a <tui> with no <screen> |
V006 | style src include cycle |
V007 | control character or ANSI in text (strip + error) |
V008 | native widget name not registered (v1.1+) |
V010 | dock and fr on the same axis |
V011 | each / if missing path; an each alias equal to an enclosing one (version="2") |
V012 | list/input/button/modal without id; a table, tabs, or tab without id (version="2"); a scroll with stick and no id (version="3") |
V013 | <text> has element children |
V014 | retired: never reported since 0.4.1, when version became optional (a <tui> without it is version="3") |
V015 | a class:NAME whose NAME is not [a-z_][a-z0-9_-]* or whose value is not path / !path (version="2") |
V016 | 0.2b structure (version="2"): a column whose parent is not a table; a table child other than column and one item, or a second item; text directly in a table; a table item with children or text; an element inside a column; a tab whose parent is not a tabs; a tabs child other than tab, or text directly in a tabs; children or text in a sparkline or a hints |
V017 | a table without each or without a column child; a tabs without a tab child (version="2") |
V018 | checked on a list/table without both each and key (or on a list of static items); a mark that is not 1 or 2 columns wide; mark without checked; on:change on a list without checked (version="2") |
Layout (L…)
Reported while laying out a frame, so they depend on the size you render at.
| Code | When |
|---|---|
L001 | fr child of non-flex parent |
L002 | % child of auto parent on that axis |
L003 | fixed + min exceeds parent (warning; clip); also a table whose visible columns' cell and % widths and auto/fr min-widths, plus the gaps, exceed its width; in a version="3" document, evaluated on the columns left once priority has hidden some |
L004 | modal is not last child of screen |
L005 | more than one bottom-docked status (warning) |
L006 | a scroll/list/table/overflow: scroll viewport can never show part of its content (warning); for a table, a body viewport of 0 rows while it has rows |
L007 | in a layout: grid container, a child with a document-written width, min-width, max-width, or flex (ignored), or an fr or % height (treated as auto) (warning; version="2") |
L008 | in a version="3" document, a painted text (not visibility: hidden, not a table cell/tab label/hint item) that loses columns (a document-unwritten nowrap line wider than its content box) or lines (more lines than its content box has rows, with overflow: hidden not document-written) without saying so (warning; version="3") |
L009 | in a version="3" document, a container that cuts a child, in flow or docked, on an axis it does not itself scroll, when overflow: hidden is not document-written on it; not for a list, a table, or a hints, for a node L003 already reports, or for a child L006 already reports (warning; version="3") |
Bind (B…)
Reported while resolving paths against the JSON data. validate checks them only when you pass --data.
| Code | When |
|---|---|
B001 | each path is missing or not an array (a list, or a col/row/box/table in version="2") |
B002 | if path missing; also a class:NAME guard path |
B003 | bind path missing (--strict upgrades to error); also a table's bind, placeholder, row key, and column cell templates, reported once per template and path whatever rows are visible; a tabs or sparkline bind; a missing path in a tab's label or short (version="3") |
B004 | action not in catalog |
B005 | keymap to/when id missing; a tab focus= that names no node, a node inside a list item, or a node outside that tab (version="2"); a modal focus= that names no node, a node outside the modal, or a node inside a list item or an each template (version="3"); a <keymap>'s when whose id names no node, or a node inside a list item or an each template, once, at the <keymap> (version="3") |
B006 | list + each without key (warning); also table + each without key |
B007 | a built-in action whose target is known without data to be incompatible (from to=, or a when that is exactly #id:focus); static, error (version="2"); evaluated against each row's effective when (version="3", <keymap when>) |
B008 | the value at a checked path is present and not an array (error; version="2") |
B009 | the value at a sparkline bind is present and not an array, or holds an element that is neither a number nor null (warning; version="2") |
B010 | the value at a tabs bind is present, not null, and not the id of a visible tab; the first visible tab is active and the store is not written (warning; version="2") |