This is an old revision of the document!

Table of Contents

Lint tool

Lint allows you to check syntax of templates (XML well-formedness) without running them. It is useful to run after upgrade of PHPTAL to ensure that everything still works. You can also use it in SVN pre-commit hook to prevent ill-formed templates from being committed to your repository.

[|Download latest phptal_lint.php]


This is command-line tool.

 phptal_lint.php [-e extensions] [-i php_file_or_directory] file_or_directory_to_check ...


phptal_lint.php .

Scan current directory for all templates (templates are recognized by popular file extensions). TALES modifiers (as in ${mycustommodifier:foo/bar}) will be ignored.

phptal_lint.php -e xhtml,zpt,tal,phtml -i myproject/includes/phptalmodifiers.php myproject/templates/

Checks only *.xhtml, *.zpt, *.tal and *.phtml files in myproject/templates/. Will load myproject/includes/phptalmodifiers.php file first assuming it defines all TALES modifiers used by the templates.