Skip to content

Linting Rules

View Markdown

Clean 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.

The level is a global setting:

Terminal window
tld config set validation.level 2

Or override per run:

Terminal window
tld validate --strictness 3
tld validate --strictness 1

Disable specific rule codes:

Terminal window
tld config set validation.exclude_rules ARC002,ARC203

Or include only some:

Terminal window
tld config set validation.include_rules ARC001,ARC004

validation.allow_low_insight is a shortcut that turns ARC005 (Low Insight Ratio) off.

CodeRuleWhat it flags
ARC001High DensityA view has too many elements to read
ARC002Isolated ElementAn element has no connectors in its view
ARC003Shared ContextElements in a view that only relate through a shared parent
ARC004Depth MismatchInconsistent nesting depth across a view
ARC005Low Insight RatioA view has mostly elements and few connectors
ARC006Dead-End DrilldownAn element owns a view with no content
ARC007Abstraction LeakFunctions or classes placed at the root level
CodeRuleWhat it flags
ARC102Missing TechAn element has no technology field
ARC103Unknown TechnologyA technology isn’t in the catalog
CodeRuleWhat it flags
ARC201Missing DescAn element has no description
ARC202Generic NamingA vague, non-domain-specific name
ARC203Missing LabelA connector has no label

Drill into any rule with its code:

Terminal window
tld validate ARC001

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.