Run the evaluator tool
Edit on GitHubThis document describes how to check if code is compliant with Spryker’s standards using the evaluator tool.
Prerequisites
- Install the evaluator by installing Spryker SDK.
Running the evaluator without installing Spryker SDK
Alternatively, you can use the spryker-sdk
image from the project directory without installing it. To do that, run all the commands in this doc as follows: `docker run -ti -v $PWD:/data/project –entrypoint bash spryker/php-sdk:latest -c ‘cd /data/project && ../bin/console {COMMAND}’.
- Get general information about the tool and see all the commands related to evaluation in the
analyze
section:
spryker-sdk list
Run an evaluation
To evaluate your code, run the evaluator in one of the following ways:
- Evaluate the code of all the modules:
spryker-sdk analyze:php:code-compliance
- Evaluate the code of needed modules:
spryker-sdk analyze:php:code-compliance -m '{NAMESPACE}.{MODULE_NAME} {NAMESPACE}.{MODULE_NAME} ...'
Example:
spryker-sdk analyze:php:code-compliance -m 'Pyz.ProductStorage'
The command creates `analyze:php:code-compliance.violations.yaml` in the `reports` folder.
To view the report, run the following command:
spryker-sdk analyze:php:code-compliance-report
Resolve upgradability issues
If the report contains upgradability issues, to resolve them, see Upgradability guidelines.
Thank you!
For submitting the form