function coder_review_drush_command in Coder 7.2
Same name and namespace in other branches
- 7 coder_review/coder_review.drush.inc \coder_review_drush_command()
Implements hook_drush_command().
File
- coder_review/
coder_review.drush.inc, line 11 - Command line utility support for Coder_review module.
Code
function coder_review_drush_command() {
$items['coder-review'] = array(
'description' => dt('Run code reviews'),
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
'aliases' => array(
'coder',
'sniffer',
),
'options' => array(
'severity' => 'Show warnings at the specified level, one of major, minor, or critical.',
'major' => 'Show major and critical warnings.',
'minor' => 'Show all warnings.',
'critical' => 'Show only critical warnings.',
'reviews' => 'Run the specified review(s), "all" runs all reviews, also accepts a comma separated list (no spaces).',
'comment' => 'Run the comment review.',
'style' => 'Run the style review (default).',
'sniffer' => 'Run the CodeSniffer review.',
'i18n' => 'Run the i18n review.',
'security' => 'Run the security review.',
'sql' => 'Run the SQL review.',
'upgrade7x' => 'Run the 6.x -> 7.x upgrade review.',
'upgrade8x' => 'Run the 7.x -> 8.x upgrade review.',
'druplart' => 'Run the druplart review.',
'release' => 'Run the production-ready review.',
'sniffer' => 'Run the PHP CodeSniffer review.',
'core' => 'Review all of core.',
'contrib' => 'Review all of contrib.',
'active' => 'Review all active modules and themes.',
'all' => 'Review all modules and themes (default).',
'default' => 'Review "default" modules and themes (as defined in coder settings).',
'summary' => 'Display summary information only, no warning output.',
'no-empty' => 'Hide results that are empty, opposite of --empty.',
'empty' => 'Show or hide results that are empty, valid options are 0|no|off, on by default.',
'ignore' => 'Enable or disable Ignore handling, valid options are 0|no|off, on by default.',
'ignorename' => 'Enable display of ignore "rule names", helpful when adding ignores.',
'ignores-pass' => 'Ignores will not cause a failing shell exit code.',
'xml' => 'Output results as xml.',
'checkstyle' => 'Output results in Checkstyle xml format.',
'git' => 'Install this coder command as a .git pre-commit hook',
),
'arguments' => array(
'name' => 'Review specified module or theme name, i.e. taxonomy.',
'patch-url' => 'URL to patch file.',
'file-path' => 'Path to file or multiple files, relative to Drupal installation.',
),
);
$items['install-php-code-sniffer'] = array(
'description' => dt('Install PHP Code_Sniffer'),
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
);
return $items;
}