robloach / php_codesniffer_drupal
This package is abandoned and no longer maintained.
The author suggests using the drupal/coder package instead.
Drupal Code Sniffer
dev-master
2014-05-13 02:36 UTC
Requires
- squizlabs/php_codesniffer: 2.0.*
This package is auto-updated.
Last update: 2020-08-10 00:09:52 UTC
README
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.
Why?
There are number of benefits from running the code independently from the Coder module and Drush:
- Steps towards encapsulation
- Travis tests
- Can be run without needing Coder or Drush installed
- Can have releases independent from Coder module
Installation
Drush
drush dl composer-8.x
drush composer require global robloach/php_codesniffer_drupal @dev
Composer
composer require global robloach/php_codesniffer_drupal @dev
Usage
Shell
~/.composer/vendor/bin/drupalcs /path/to/module
PHP_CodeSniffer
phpcs --standard ~/.composer/vendor/robloach/php_code_sniffer_drupal /path/to/module
Test
phpunit