Linting Rules
View MarkdownClean diagrams aren’t accidental. They’re enforced.
tlDiagram’s linter checks every diagram for architectural anti-patterns. Run it with tld validate.
These are heuristic checks for common issues that lead to messy, unreadable diagrams. They’re advisory and constantly evolving.
Configuring
Section titled “Configuring”The level is a global setting:
tld config set validation.level 2Or override per run:
tld validate --strictness 3tld validate --strictness 1Suppressing rules
Section titled “Suppressing rules”Disable specific rule codes:
tld config set validation.exclude_rules ARC002,ARC203Or include only some:
tld config set validation.include_rules ARC001,ARC004validation.allow_low_insight is a shortcut that turns ARC005 (Low Insight Ratio) off.
The rules
Section titled “The rules”Level 1 — structural
Section titled “Level 1 — structural”| Code | Rule | What it flags |
|---|---|---|
ARC001 | High Density | A view has too many elements to read |
ARC002 | Isolated Element | An element has no connectors in its view |
ARC003 | Shared Context | Elements in a view that only relate through a shared parent |
ARC004 | Depth Mismatch | Inconsistent nesting depth across a view |
ARC005 | Low Insight Ratio | A view has mostly elements and few connectors |
ARC006 | Dead-End Drilldown | An element owns a view with no content |
ARC007 | Abstraction Leak | Functions or classes placed at the root level |
Level 2 — metadata
Section titled “Level 2 — metadata”| Code | Rule | What it flags |
|---|---|---|
ARC102 | Missing Tech | An element has no technology field |
ARC103 | Unknown Technology | A technology isn’t in the catalog |
Level 3 — polish
Section titled “Level 3 — polish”| Code | Rule | What it flags |
|---|---|---|
ARC201 | Missing Desc | An element has no description |
ARC202 | Generic Naming | A vague, non-domain-specific name |
ARC203 | Missing Label | A connector has no label |
Drill into any rule with its code:
tld validate ARC001How warnings work
Section titled “How warnings work”Linting warnings are advisory. They don’t block anything. They appear in tld validate output, grouped by rule code, and in the editor.
A warning means “this might be a problem.” It’s your call whether to address it or acknowledge it.