-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Code Review in the-build | ||
|
||
From your project where you have installed the-build, run `vendor/bin/phing code-review` to run the default set of code reviews. This target is provided in the default `build.xml` created for your project during install. | ||
|
||
This will review your code with: | ||
|
||
* Drupal Codesniffer | ||
* PHPmd | ||
* PHP Lint | ||
* PHPtodo | ||
|
||
Generally, you should configure your `build.xml` to run code reviews as part of your `test` target so that developers run the reviews by default. | ||
|
||
### PHP Lint | ||
|
||
PHP Lint uses the PHP interpreter directly to check for syntax errors. There is no configuration for this review. | ||
|
||
### [PHPMD](https://phpmd.org/) | ||
|
||
A more complicated and more general PHP code review than the Drupal Codesniffer standard. The default config for this review can be found within the-build at `conf/phpmd.xml`. To customize this config, copy that file to your project's `conf/` directory and add the build property: | ||
|
||
``` | ||
phpmd.rulesets=conf/phpmd.xml | ||
``` | ||
|
||
### Drupal Codesniffer | ||
|
||
Runs codesniffer using the standard provided by Drupal's [Coder](https://www.drupal.org/project/coder) module. Generally, you should not change the configuration for this review, but if do need to you can provide a different standard: | ||
|
||
``` | ||
drupal_code_sniffer.standard=vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml | ||
``` | ||
|
||
### [PHP To-do Finder](https://github.com/nilportugues/php-todo-finder) | ||
|
||
Sets a threshold for the number of "to do" comments allowable in a codebase. The default config for this review can be found within the-build at `conf/php_todo_finder.yml`. To customize this config, copy that file to your project's `conf/` directory and add the build property: | ||
|
||
``` | ||
phptodo.config=conf/php_todo_finder.yml | ||
``` |