The TechScript Formatter (tools/formatter) enforces a uniform style layout across all codebases.
Format a single file:
tech fmt main.txsFormat all files recursively in the current workspace:
tech fmt .Verify formatting on CI without editing files:
tech fmt --check .The formatter applies the following styling rules automatically:
- Indentation: Inserts 4 spaces per indentation level. Tabs are converted to spaces.
- Block Terminators: Ensures matching
endmarkers are aligned with their initiating keyword. - Whitespace:
- Inserts spaces around binary operators:
x = a + binstead ofx=a+b. - Removes trailing whitespaces from lines.
- Adds a single space after commas:
do add(a, b)instead ofdo add(a,b).
- Inserts spaces around binary operators:
- String Prefixes: Enforces the canonical
$prefix for interpolated strings (e.g. converting deprecatedf"..."to$"...").