kite validate
Validate one or more starkite scripts for syntax errors without executing them. Useful for CI/CD pipelines, pre-commit hooks, and editor integration.
Usage¶
Accepts one or more script file paths. Globs are expanded by the shell.
Flags¶
| Flag | Description |
|---|---|
--json |
Output validation results as JSON |
Exit codes¶
0— all scripts are valid1— one or more scripts have syntax errors2— file not found or read error
Examples¶
Validate a single script¶
Validate multiple scripts¶
kite validate scripts/*.star
# scripts/deploy.star: OK
# scripts/backup.star: OK
# scripts/broken.star: FAILED (1 errors)
# scripts/broken.star:14:3: undefined: missing_func
CI pre-commit hook¶
#!/bin/sh
# .git/hooks/pre-commit
kite validate $(git diff --cached --name-only --diff-filter=d | grep '\.star$')