HACKING: add instructions about installing the Drupal style in PHP_CodeSniffer
authorAntonio Ospite <ao2@ao2.it>
Tue, 14 Feb 2017 08:41:35 +0000 (09:41 +0100)
committerAntonio Ospite <ao2@ao2.it>
Tue, 14 Feb 2017 08:41:35 +0000 (09:41 +0100)
HACKING

diff --git a/HACKING b/HACKING
index 14fba7e..8345eaf 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -5,6 +5,13 @@ Style compliance can be checked using the Coder Sniffer extension to the PEAR
 PHP_CodeSniffer project, for instructions about how to install Coder Sniffer
 see https://www.drupal.org/node/1419988
 
 PHP_CodeSniffer project, for instructions about how to install Coder Sniffer
 see https://www.drupal.org/node/1419988
 
-Use this command to check the style:
+TL;DR: install drupla/coder and enable the Drupal coding standard in
+PHP_CodeSniffer:
+  
+  $ composer global require drupal/coder
+  $ export PATH="$HOME/.config/composer/vendor/bin:$PATH"
+  $ phpcs --config-set installed_paths $HOME/.config/composer/vendor/drupal/coder/coder_sniffer/
+
+And then use this command to check the style:
 
   $ phpcs --standard=Drupal .
 
   $ phpcs --standard=Drupal .