13/05
2014
Wallogit.com
2017 © Pedro Peláez
Drupal Code Sniffer
Drupal standards for PHP_CodeSniffer. This is a copy from Coder module's Code Sniffer. It's a prototype of seeing if it would be possible to abstract it away from Coder and Drush entirely. This allows the Drupal Code Sniffer standard definition to be managed and run completely independently from Coder or Drush., (*1)
There are number of benefits from running the code independently from the Coder module and Drush:, (*2)
drush dl composer-8.x drush composer require global robloach/php_codesniffer_drupal @dev
composer require global robloach/php_codesniffer_drupal @dev
~/.composer/vendor/bin/drupalcs /path/to/module
phpcs --standard ~/.composer/vendor/robloach/php_code_sniffer_drupal /path/to/module
phpunit