Find the Exponential Software extensions you want
UNIX name | Owner | Status |
---|---|---|
eZCodeValidator | eZ Publish Legacy | stable |
Version | Compatible with |
---|---|
N/A | N/A |
Code validator is a configurable and extensible framework for running validators over project code. Multiple validators (for PHP, JavaScript, eZPublish templates etc.) are included in the project.
This project needs PHP 5.3+ to run. Besides that, some validators require additional tools:
Project may be configured using JSON file (default configuration is included - config.default.json). This way, log printers and validators may be set up.
Log printers write messages from validation to console/files etc. Types of messages (error, warning, debug etc.) that should be printed can be specified for each printer. Besides that, each log printer takes custom configuration.
Default configuration file uses two printers:
Validators check the code and push messages to log printers. For each validator blacklist and whitelist of file extensions should be provided. This allows to target specific files with specific validators (e.g. JavaScript files, ".js", should be validated with JSValidator). Besides that, each validator takes custom configuration.
run.php script takes couple of console parameters:
This script must be run from eZ Publish root folder. It takes two parameters:
It will use run.php to validate or format any modified files in the git repository.
Recommended use is to add one or more config files to the project, and then add a shell alias for easy access:
alias projectvalidate='/www/eZCodeValidator/ezcv.sh -c extension/project/doc/config.validate.json