Skip to content

lint

Lints config artifacts against the rules defined for each type.

Terminal window
tcli lint --type <type>

With no --type flag, every config artifact in the project is linted. Pass a config artifact <type> slug (e.g. preferences) to lint just that one.

Each config artifact type names a linter in the catalog (see Linters). Linters are code-first, so the exact rules live in tcli. A category may opt out with lint: none.

The deploy/export scripts that live inside a source directory are always excluded from linting, as are config artifacts marked custom in the manifest.

tcli lint exits non-zero if any violation is found and prints each one to stderr, making it suitable for CI. It exits 0 when everything passes.

Terminal window
$ tcli lint preferences
Found 3 lint violation(s):
Preferences: bad_name.xml: invalid name "bad_name" expected prefs_<scope>_<action>[__<target>][___<category>].xml
Preferences: wrong_extension.txt: disallowed extension ".txt" allowed: .xml
Preferences: wrong_extension.txt: invalid name "wrong_extension" expected prefs_<scope>_<action>[__<target>][___<category>].xml