Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

validate

Validate a TeaLeaf text file for syntactic correctness without compiling it.

Usage

tealeaf validate <file.tl>

Arguments

ArgumentRequiredDescription
<file.tl>YesPath to the TeaLeaf text file

Description

The validate command parses the text file and reports any syntax errors. It does not produce any output files.

Validation checks include:

  • Lexical analysis (valid tokens, string escaping)
  • Structural parsing (matched brackets, valid directives)
  • Schema reference validity (@table references defined @struct)
  • Include file resolution
  • Type syntax in schema definitions

Examples

# Validate a file
tealeaf validate config.tl

# Validate before compiling
tealeaf validate data.tl && tealeaf compile data.tl -o data.tlbx

Exit Codes

CodeMeaning
0File is valid
1Validation errors found

On success, prints ✓ Valid along with schema and key counts. On failure, prints ✗ Invalid: <error message> and exits with code 1.

See Also

  • info – inspect file contents
  • compile – compile (implies validation)