Skip to content

RobLoach/PHP_CodeSniffer_Drupal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drupal Code Sniffer Build Status

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

About

An abstracted port of Drupal's PHP_CodeSniffer definitions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published